Scripting: "Get 100 gold, get 1 life"

Game Editor comments and discussion.

Scripting: "Get 100 gold, get 1 life"

Postby Bee-Ant » Sat Jun 09, 2007 7:07 am

Hi friends...
1. How to make script: "If player get 100 of gold, then player get 1 life"
And in what menu (collision, draw actor, create actor, or other) and actor (player or gold) I'll put it??? :lol:
2. How to make script: "If player get 3 of keys, then the door are open"
And in what menu (collision, draw actor, create actor, or other) and actor (key or door) I'll put it??? :lol:
3. I'll call you "Boss" if you can help me :cry:
thaks a lot... :D
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Scripting: "Get 100 gold, get 1 life"

Postby Sgt. Sparky » Sun Jun 10, 2007 3:39 pm

Bee-Ant wrote:Hi friends...
1. How to make script: "If player get 100 of gold, then player get 1 life"
And in what menu (collision, draw actor, create actor, or other) and actor (player or gold) I'll put it??? :lol:
2. How to make script: "If player get 3 of keys, then the door are open"
And in what menu (collision, draw actor, create actor, or other) and actor (key or door) I'll put it??? :lol:
3. I'll call you "Boss" if you can help me :cry:
thaks a lot... :D

1. make a variable called gold, make it an integer.
on the destroy Actor event of the coin,
Code: Select all
gold++;

now make another integer called lives.
on the draw actor event of some text actor,
Code: Select all
textNumber = gold;
if(gold >= 100)
{
    lives++;
    gold = 0;
}


and you can modify that code using other variables to make everything else. :D
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Thanks Boss

Postby Bee-Ant » Mon Jun 11, 2007 5:06 am

Yhanks sparky...you're my boss now...
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Thanks Boss

Postby Sgt. Sparky » Mon Jun 11, 2007 11:57 am

Bee-Ant wrote:Yhanks sparky...you're my boss now...

how many times must you say that. :lol:
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron