Life

Talk about making games.

Life

Postby Behdadsoft » Thu Feb 04, 2010 10:24 pm

Hello . would like for the player to do a few lives. When certain player to damage his vision of life is low. Thanks!
There is no possible way, if we found will make a way.

http://behdadsoft.com/
*******************************************************************
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0
User avatar
Behdadsoft
 
Posts: 207
Joined: Wed Dec 16, 2009 9:19 pm
Score: 2 Give a positive score

Re: Life

Postby Bee-Ant » Fri Feb 05, 2010 1:10 am

Do you mean Health ???

1. Make an integer variable called "health"
2. Player->Create Actor
Code: Select all
health=45;
//this is the start set code
//set 45 to any health point you want

3. Player->Collision->Enemy
Code: Select all
health-=3;
//this is the damaging code
//set the 3 to any damage value you want

4. Player->Draw Actor
Code: Select all
if(health<=0)
{
    //dying code here
    //use what action you want to use as the dying action
}
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: Life

Postby Superbeni » Fri Feb 05, 2010 10:19 am

wouldn´t it be better to put the code for dying into the collision-code?
User avatar
Superbeni
 
Posts: 130
Joined: Sun Aug 02, 2009 1:23 pm
Location: Vienna, Austria
Score: 31 Give a positive score

Re: Life

Postby Bee-Ant » Fri Feb 05, 2010 11:52 am

Superbeni wrote:wouldn´t it be better to put the code for dying into the collision-code?

Oh yeah, you can put it there too... :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: Life

Postby Behdadsoft » Fri Feb 05, 2010 8:42 pm

Thank you. Please leave me a sample.
There is no possible way, if we found will make a way.

http://behdadsoft.com/
*******************************************************************
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0
User avatar
Behdadsoft
 
Posts: 207
Joined: Wed Dec 16, 2009 9:19 pm
Score: 2 Give a positive score

Re: Life

Postby Bee-Ant » Sat Feb 06, 2010 4:10 pm

Here, hope it helps
Attachments
HealthAndLiveDemo.zip
(20.28 KiB) Downloaded 66 times
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: Life

Postby Behdadsoft » Sun Feb 07, 2010 5:42 pm

Thank you my friend this is what I want.
There is no possible way, if we found will make a way.

http://behdadsoft.com/
*******************************************************************
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0
User avatar
Behdadsoft
 
Posts: 207
Joined: Wed Dec 16, 2009 9:19 pm
Score: 2 Give a positive score

Re: Life

Postby Behdadsoft » Fri Feb 12, 2010 7:41 pm

Hello
When your script I use in my game I can run and play with get this error message .
Attachments
1.png
There is no possible way, if we found will make a way.

http://behdadsoft.com/
*******************************************************************
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0
User avatar
Behdadsoft
 
Posts: 207
Joined: Wed Dec 16, 2009 9:19 pm
Score: 2 Give a positive score

Re: Life

Postby Bee-Ant » Sat Feb 13, 2010 2:11 am

Hmm...
Are you sure you have made the variable???
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: Life

Postby Behdadsoft » Sat Feb 13, 2010 6:46 pm

OK. I Forget this Work.
There is no possible way, if we found will make a way.

http://behdadsoft.com/
*******************************************************************
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0
User avatar
Behdadsoft
 
Posts: 207
Joined: Wed Dec 16, 2009 9:19 pm
Score: 2 Give a positive score

Re: Life

Postby Behdadsoft » Sat Feb 13, 2010 7:14 pm

I make in a game I'm exactly the same Space Invaders. But when my ship eats a bullet is completely destroyed. Please tell me the problem is work. Thanks
There is no possible way, if we found will make a way.

http://behdadsoft.com/
*******************************************************************
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0
User avatar
Behdadsoft
 
Posts: 207
Joined: Wed Dec 16, 2009 9:19 pm
Score: 2 Give a positive score

Re: Life

Postby Bee-Ant » Sat Feb 13, 2010 7:26 pm

The problem may be in your start health, or collision with bullet.

Try this :
1. Ship - CreateActor - ScriptEditor :
health=5;

2. Ship - Collision - Bullet - ScriptEditor :
health-=1;
DestroyActor("Collide Actor");
if(health<=0){DestroyActor("Event Actor");}

3. Make sure you have only 1 action for each event. Check it by click edit. See how much action you have in Collision event.
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: Life

Postby Camper1995 » Sat Feb 13, 2010 10:32 pm

I see its hard to explain something using internet.

Here is demo:
health.zip
(98.28 KiB) Downloaded 75 times


Press space to shoot.

CAmPeR :P
Say hello to my little friend.
User avatar
Camper1995
 
Posts: 707
Joined: Tue Dec 30, 2008 7:20 pm
Location: Lost in the past.
Score: 44 Give a positive score

Re: Life

Postby Behdadsoft » Sun Feb 14, 2010 9:14 pm

Thanks, your help, but instead I had a problem and I need to remove part. I play almost one stage to have finished but you need help. First, I create a menu for your game, including
Load, save, New Game and Quit Game.
Second, after the loss of enemies automatically go to the next stage.
If I can help my game will be finished, because I do not know programming and would like to help you.
Thank you all
There is no possible way, if we found will make a way.

http://behdadsoft.com/
*******************************************************************
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0
User avatar
Behdadsoft
 
Posts: 207
Joined: Wed Dec 16, 2009 9:19 pm
Score: 2 Give a positive score

Re: Life

Postby Camper1995 » Mon Feb 15, 2010 3:41 pm

Thats nice. I dont understand you what game are you talking about..?

But I must finish the game: CityBuilder 2oo9 (its 87% finished)

Then we can star new project... 8)

Do you want to see demo of saving game and score?

CAmPeR :arrow: :P
Say hello to my little friend.
User avatar
Camper1995
 
Posts: 707
Joined: Tue Dec 30, 2008 7:20 pm
Location: Lost in the past.
Score: 44 Give a positive score

Next

Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest