Thread: Hunters W.I.P.
View Single Post
Old 06-27-2012, 06:01 PM   #130
Hassat Hunter
Forumite
 
Join Date: Jan 2010
Posts: 535
Well, any "standard" KOTOR2 spawn-script starts off with the following code (sub-number varies of course), I suppose the same could be done for KOTOR1...
Code:
void sub18() {
	int nRandom = d8(1);
	if ((nRandom == 1)) {
		ActionPlayAnimation(103, 1.0, 0.0);
	}
	else {
		if ((nRandom == 2)) {
			ActionPlayAnimation(102, 1.0, 0.0);
		}
		else {
			if ((nRandom == 3)) {
				ActionPlayAnimation(1, 1.0, 3.0);
			}
			else {
				if ((((nRandom == 4) || (nRandom == 5)) && (GetRacialType(OBJECT_SELF) != 5))) {
					if ((GetGender(OBJECT_SELF) == 0)) {
						sub1(intGLOB_52, 0);
						ActionPlayAnimation(24, 1.0, 20.4);
						ActionDoCommand(sub1(intGLOB_52, 1));
					}
					else {
						if ((GetGender(OBJECT_SELF) == 1)) {
							sub1(intGLOB_52, 0);
							ActionPlayAnimation(24, 1.0, 13.3);
							ActionDoCommand(sub1(intGLOB_52, 1));
						}
					}
				}
				else {
					if ((((nRandom == 6) || (nRandom == 4)) || (nRandom == 5))) {
						ActionPlayAnimation(100, 1.0, 0.0);
					}
					else {
						if ((nRandom == 7)) {
							ActionPlayAnimation(101, 1.0, 0.0);
						}
						else {
							if ((nRandom == 8)) {
								sub1(intGLOB_52, 0);
								ActionPlayAnimation(1, 1.0, 5.0);
								ActionDoCommand(sub1(intGLOB_52, 1));
							}
						}
					}
				}
			}
		}
	}
}
Hassat Hunter is offline   you may: quote & reply,