random animation

Game Editor comments and discussion.

random animation

Postby jagheera nex » Sat Sep 08, 2007 9:33 pm

in my stickman game thing im making it so when you kill an enimy, the enimy drops a random amount of money, like 3-7, and im using diffrent aniations and i need to know how to make a random animation when the actor is created and the game also needs reconize the aimation and add that much when the main player picks it up =)
User avatar
jagheera nex
 
Posts: 46
Joined: Sat Jul 28, 2007 4:13 pm
Location: dik
Score: 1 Give a positive score

Re: random animation

Postby Rux » Sun Sep 09, 2007 7:43 pm

Pretty Easy. 1st on the create actor event of the coins, in script editor,
Code: Select all
int n;
n = rand(//Here you put how many animations for the coins there are say there are 3 so this part would be 3\\)
if(n==0)//Change the animation event to one of your coin animations\\
if(n==1)//Change the animation event to one of your coin animations\\
if(n==2)//Change the animation event to one of your coin animations\\
ect.

Dont type anything in the // \\ Good Luck, I made a random tutorial if this isn't explaining much.
http://game-editor.com/forum/viewtopic.php?f=6&t=3815
I'm not good at coming up with signatures...
User avatar
Rux
 
Posts: 645
Joined: Sun Apr 29, 2007 9:26 pm
Location: Sitting on your moniter invisable.
Score: 35 Give a positive score

Re: random animation

Postby jagheera nex » Mon Sep 10, 2007 2:05 pm

wow thanks means alot, lol im reaplying with my wii :D
User avatar
jagheera nex
 
Posts: 46
Joined: Sat Jul 28, 2007 4:13 pm
Location: dik
Score: 1 Give a positive score

Re: random animation

Postby jagheera nex » Tue Sep 11, 2007 1:16 am

now that i know how to make a random animation how do i make it so hen he picks up the coins it adds that many coins? 8)
User avatar
jagheera nex
 
Posts: 46
Joined: Sat Jul 28, 2007 4:13 pm
Location: dik
Score: 1 Give a positive score

Re: random animation

Postby Rux » Tue Sep 11, 2007 2:14 am

Make a Var called coinamount10(you'll have to make multiple vars for each amount)

Then on a coin actor (they all can't be clones so you'll have to make several different actors for the different coin amounts only one actor per coin amount)Player collision with a coin actor, (you'll have to do repete these steps for each coin actor)
Code: Select all
coinamount10 = coinamount10 + 10;
Keep on doing the different amounts until finished.

Then add a textNumber to count the coins with (Go to text in the actor control panel of your goldcount and type a random amount of zeros or just one)and on the draw actor event script editor,
Code: Select all
textNumber = coinamount10 + coinamount20 //or whatever the rest of your amounts are\\//(NOTE: It's easier to do this in one script instead of several scripts)\\


Hope this helps! :D :D :D :P
I'm not good at coming up with signatures...
User avatar
Rux
 
Posts: 645
Joined: Sun Apr 29, 2007 9:26 pm
Location: Sitting on your moniter invisable.
Score: 35 Give a positive score

Re: random animation

Postby jagheera nex » Tue Sep 11, 2007 2:48 am

DUDE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ur a frecken genuis!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
man it works and its simpole omg thank you so much!!!!!!!!!!!!!!!!!!!!!!! :D :D :D :D :D :D :D :D :D :D :D :D :D :D
User avatar
jagheera nex
 
Posts: 46
Joined: Sat Jul 28, 2007 4:13 pm
Location: dik
Score: 1 Give a positive score

Re: random animation

Postby Rux » Wed Sep 12, 2007 1:02 am

I haven't even been working with GE for a year yet! About 9 months! This January it will be a year.
I can learn things pretty easily. (Not Bragging just an opinion)
I'm not good at coming up with signatures...
User avatar
Rux
 
Posts: 645
Joined: Sun Apr 29, 2007 9:26 pm
Location: Sitting on your moniter invisable.
Score: 35 Give a positive score

Re: random animation

Postby jagheera nex » Wed Sep 12, 2007 3:00 am

lol wow
User avatar
jagheera nex
 
Posts: 46
Joined: Sat Jul 28, 2007 4:13 pm
Location: dik
Score: 1 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron