Page 1 of 1

help with randomizing

PostPosted: Sun Jun 03, 2007 12:33 pm
by DarkParadox
how do you make it so that a actor randomlys chooses an animation?

PostPosted: Sun Jun 03, 2007 3:32 pm
by Fuzzy
animpos = rand(nframes);

fill in the number or range of frames that you want to select from, or use that variable.

PostPosted: Sun Jun 03, 2007 6:17 pm
by DarkParadox
no i want it so he changes to a different animation not speed

PostPosted: Mon Jun 04, 2007 2:43 am
by DilloDude
Code: Select all
ChangeAnimation("Event Actor", getAnimName(round(rand(lnum + .99999) - .5)), FORWARD);

replace 'lnum' with the number of your last animation (ie if there are three anims, lnum should be 2. Rather than using lnum +.99999 you could do this yourself, ie 2.99999)