Easter egg

Talk about making games.

Easter egg

Postby The achievement » Wed Mar 08, 2006 12:53 am

Ok hi people again, i was wondering, i added a easter egg and i want my player to hit it and the score goes up by +80. how do i do that?
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby DilloDude » Wed Mar 08, 2006 1:10 am

If you are using a variable for score, add a collision event to the egg, on collision with any side of player.
Code: Select all
scoreVar+=80;
DestroyActor("Event Actor");
This will increase the score by 80 and destroy the egg so you can't keep collecting it and get an infinite supply of points. If you are using a just a text actor 'Score' to show the score, type
Code: Select all
Score.textNumber+=80;
DestroyActor("Event Actor");
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby The achievement » Wed Mar 08, 2006 1:11 am

ya im using a variable
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby The achievement » Wed Mar 08, 2006 2:01 am

thank you dillo dude! your theory worked! lol But you didnt answer me about the rain animation, can i just do y=+1?
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby Troodon » Wed Mar 08, 2006 1:26 pm

If you are not using a rain animation you can put in each water drop the code DilloDude gave you. This will make all drops fall down. Then make clones of drop and put them in the up corner of the screen. When they hit something in the down corner of the screen make them to return back to the up corner.
You can also make a "cloud" actor wich moves on a path and drop drops with random timer. (remember to destroy drops when out of vision!)
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby DilloDude » Wed Mar 08, 2006 11:53 pm

tekdino wrote:You can also make a "cloud" actor wich moves on a path and drop drops with random timer. (remember to destroy drops when out of vision!)

Yeah, that's a good idea.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest