Sensor how

Talk about making games.

Sensor how

Postby Loods » Fri Jan 27, 2006 1:52 pm

hey i am new here I have question, I do sensors but my enemy is gone,and pleae can somebod explain how to do actor have 3 lifes.
Thanks.
Loods
 
Posts: 3
Joined: Fri Jan 27, 2006 1:44 pm
Score: 0 Give a positive score

.

Postby pigz96 » Fri Jan 27, 2006 2:22 pm

u need some code to script editor. but i know only some moving codes :?
pigz96
 
Posts: 15
Joined: Mon Jan 16, 2006 5:36 pm
Score: 0 Give a positive score

Postby Loods » Fri Jan 27, 2006 4:55 pm

Somebody,please
Loods
 
Posts: 3
Joined: Fri Jan 27, 2006 1:44 pm
Score: 0 Give a positive score

Postby Game A Gogo » Fri Jan 27, 2006 9:34 pm

create a variable, and on create actor, set your var like this: [your Var name]=3;
then when the enemy is hit do this code: [your Var name]=[your Var name]-1;

that should work.

if you to make a variable, in the scritp editor, select the variable buttons and click create
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Loods » Fri Jan 27, 2006 11:54 pm

Thanks
Loods
 
Posts: 3
Joined: Fri Jan 27, 2006 1:44 pm
Score: 0 Give a positive score

Postby Game A Gogo » Sat Jan 28, 2006 5:24 pm

np
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby ALK3_Steph » Sun Jan 29, 2006 1:06 am

You could also do [your name var=-1] for a shortcut with the same results
"Take your wings outside, you cant fly in here, besides purple skies are betting soaring for you my angel, you're an angel, you little devil. As for me I'll be just fine as I stay inside and watch from the window" -Alkaline Trio (Goodbye Forever)
ALK3_Steph
 
Posts: 27
Joined: Sat Sep 10, 2005 2:40 am
Location: Norfolk, VA
Score: 0 Give a positive score

Postby Game A Gogo » Sun Jan 29, 2006 7:43 pm

no, because lets say you have 200 healt and if you do the scritp [your name var] = -1, your health will be now -1.

see what i mean??
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Novice » Sun Jan 29, 2006 11:13 pm

I think he ment
Code: Select all
[your name var]-=1;

or you can do
Code: Select all
[your name var]--;
Why do i always get stuck?
User avatar
Novice
 
Posts: 399
Joined: Mon Aug 29, 2005 10:54 am
Location: Relative
Score: 5 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest