Health Potion

Talk about making games.

Health Potion

Postby Crusader » Wed Aug 17, 2005 7:02 pm

:D Pray,tell me how to crete a health potion.
Visit animationprotector.i8.com
User avatar
Crusader
 
Posts: 49
Joined: Wed Aug 17, 2005 11:15 am
Location: Bulgaria
Score: 0 Give a positive score

Postby Game A Gogo » Thu Aug 18, 2005 1:26 am

Collision on anyside of (your main caracter)
-Destroy event actor
on destoy event
(If healt is a variable)-Script:
Code: Select all
Healt=healt+30;

(If healt is an animation)-Script:
Code: Select all
Healt.anipos+=5;


hope it work, Healt can be change to the real name
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 Chai » Thu Aug 18, 2005 4:24 am

1. you created actor Healt potion
2. set collision between " player" && "Healt potion"
3. script editor write
Code: Select all
HP += 10;

* (HP = variable)* (HP += 10; / HP = HP+10; all same)
3.1 set
Code: Select all
DestroyActor("Healt potion");

4. set the Player HP = 20;

- when your player collision Healt potion HP will be 30 -

Finish

wish u luck ; u can ask if u want :wink:
User avatar
Chai
 
Posts: 361
Joined: Sat Apr 30, 2005 2:26 pm
Location: Thailand
Score: 30 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest