Page 1 of 1
Random animation on random actor?

Posted:
Mon Mar 29, 2010 12:52 pm
by CrimsonTheDarkBat
Ok, heres what I need help with:
I have two seperate actors which each play back an animation to trigger an enemies attack. One actor's animation triggers one attack and the other actor's animation triggers the other attack. Now, is there a way to randomise which actor and animation to use after a player attacks?
Re: Random animation on random actor?

Posted:
Mon Mar 29, 2010 12:54 pm
by MrJolteon
Well, i know only how to create one actor with random animation.
Re: Random animation on random actor?

Posted:
Mon Mar 29, 2010 1:11 pm
by CrimsonTheDarkBat
Hmm, well tell me how to do that and I'll try it out.
Re: Random animation on random actor?

Posted:
Mon Mar 29, 2010 1:32 pm
by MrJolteon
This is how you do it:
- Code: Select all
CreateActor("actorName", getAnimName(rand(5)), "(none)", "(none)", 0, 0, false);
Re: Random animation on random actor?

Posted:
Mon Mar 29, 2010 3:08 pm
by CrimsonTheDarkBat
Thanks, but I'm afraid this dosen't resolve my issue.

Can anyone help me out?
Re: Random animation on random actor?

Posted:
Mon Mar 29, 2010 6:06 pm
by CrimsonTheDarkBat
Guys, please - this is really urgent!

Re: Random animation on random actor?

Posted:
Tue Mar 30, 2010 8:39 am
by MrJolteon
nvm... post is deleted...
Re: Random animation on random actor?

Posted:
Tue Mar 30, 2010 10:40 pm
by skydereign
I explained what it did, and if you look at it you can see the function call it uses to get it to work... That code creates an actor with a random animation, using getAnimName, taking an int, supplied in this case by rand(). I don't really understand what you want, or how the actors are set up so I can't really give an example. What do you mean play back an animation? What are these actors doing if not playing through the given animation? Are you trying to figure out how to have only one actor play there animation?