Random animation on random actor?

Non-platform specific questions.

Random animation on random actor?

Postby CrimsonTheDarkBat » Mon Mar 29, 2010 12:52 pm

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?
Sonic Velocity Development Thread --> http://game-editor.com/forum/viewtopic.php?f=4&t=11461

Completed Games:
Sonic: War of the Emeralds
Sonic: Empire of Nightmares
Sonic.EXE - The Game
Alice: Crimson Omen
Epsilon 27
User avatar
CrimsonTheDarkBat
 
Posts: 223
Joined: Fri Mar 21, 2008 10:54 am
Score: 20 Give a positive score

Re: Random animation on random actor?

Postby MrJolteon » Mon Mar 29, 2010 12:54 pm

Well, i know only how to create one actor with random animation.
Join us on Discord!
Game Editor 2
These are the best ways to reach me these days


Your local Community Janitor, always lurking in the shadows...
User avatar
MrJolteon
 
Posts: 2326
Joined: Sat Aug 09, 2008 3:25 pm
Location: Stranded under endless sky
Score: 105 Give a positive score

Re: Random animation on random actor?

Postby CrimsonTheDarkBat » Mon Mar 29, 2010 1:11 pm

Hmm, well tell me how to do that and I'll try it out.
Sonic Velocity Development Thread --> http://game-editor.com/forum/viewtopic.php?f=4&t=11461

Completed Games:
Sonic: War of the Emeralds
Sonic: Empire of Nightmares
Sonic.EXE - The Game
Alice: Crimson Omen
Epsilon 27
User avatar
CrimsonTheDarkBat
 
Posts: 223
Joined: Fri Mar 21, 2008 10:54 am
Score: 20 Give a positive score

Re: Random animation on random actor?

Postby MrJolteon » Mon Mar 29, 2010 1:32 pm

This is how you do it:
Code: Select all
CreateActor("actorName", getAnimName(rand(5)), "(none)", "(none)", 0, 0, false);
Join us on Discord!
Game Editor 2
These are the best ways to reach me these days


Your local Community Janitor, always lurking in the shadows...
User avatar
MrJolteon
 
Posts: 2326
Joined: Sat Aug 09, 2008 3:25 pm
Location: Stranded under endless sky
Score: 105 Give a positive score

Re: Random animation on random actor?

Postby CrimsonTheDarkBat » Mon Mar 29, 2010 3:08 pm

Thanks, but I'm afraid this dosen't resolve my issue. :(

Can anyone help me out?
Sonic Velocity Development Thread --> http://game-editor.com/forum/viewtopic.php?f=4&t=11461

Completed Games:
Sonic: War of the Emeralds
Sonic: Empire of Nightmares
Sonic.EXE - The Game
Alice: Crimson Omen
Epsilon 27
User avatar
CrimsonTheDarkBat
 
Posts: 223
Joined: Fri Mar 21, 2008 10:54 am
Score: 20 Give a positive score

Re: Random animation on random actor?

Postby CrimsonTheDarkBat » Mon Mar 29, 2010 6:06 pm

Guys, please - this is really urgent! :(
Sonic Velocity Development Thread --> http://game-editor.com/forum/viewtopic.php?f=4&t=11461

Completed Games:
Sonic: War of the Emeralds
Sonic: Empire of Nightmares
Sonic.EXE - The Game
Alice: Crimson Omen
Epsilon 27
User avatar
CrimsonTheDarkBat
 
Posts: 223
Joined: Fri Mar 21, 2008 10:54 am
Score: 20 Give a positive score

Re: Random animation on random actor?

Postby MrJolteon » Tue Mar 30, 2010 8:39 am

nvm... post is deleted...
Last edited by MrJolteon on Fri Apr 02, 2010 6:01 pm, edited 1 time in total.
Join us on Discord!
Game Editor 2
These are the best ways to reach me these days


Your local Community Janitor, always lurking in the shadows...
User avatar
MrJolteon
 
Posts: 2326
Joined: Sat Aug 09, 2008 3:25 pm
Location: Stranded under endless sky
Score: 105 Give a positive score

Re: Random animation on random actor?

Postby skydereign » Tue Mar 30, 2010 10:40 pm

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?
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest