Easy Way To Make Health Bar

Talk about making games.

Postby Markswii99 » Thu May 31, 2007 10:32 pm

Thank You very much sparkey I understand those directions.

I do have one more question though. How do I mave a variable?

I feel I am asking way too many questions sorry about that.
User avatar
Markswii99
 
Posts: 6
Joined: Mon May 28, 2007 3:42 am
Location: Who Knows...
Score: 0 Give a positive score

Postby d-soldier » Thu May 31, 2007 10:37 pm

To make a variable, all you need to do is click up on the SCRIPT tab, then GLOBAL CODE. In this area, click on the VARIABLES button (NOT THE VARIABLES/FUNCTION BUTTON), then on the ADD button. In this box you enter the name (remember that variable/scripts are CASE SENSATIVE) and you can adjust if it is a GLOBAL (default) or ACTOR variable... Click on the OK button when done, and thats all there is to it!
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Markswii99 » Thu May 31, 2007 10:42 pm

Thank You d-soldier and sparkey this will greatly improve my game :D :D :D
User avatar
Markswii99
 
Posts: 6
Joined: Mon May 28, 2007 3:42 am
Location: Who Knows...
Score: 0 Give a positive score

Postby Sgt. Sparky » Fri Jun 01, 2007 12:45 am

You are welcome. :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

Postby Markswii99 » Fri Jun 01, 2007 1:45 am

Sgt. Sparky wrote:when you shoot your enemy:
collide.health -= 5;


one last thing where do I put this part of the code?
User avatar
Markswii99
 
Posts: 6
Joined: Mon May 28, 2007 3:42 am
Location: Who Knows...
Score: 0 Give a positive score

Postby Caaz Games » Fri Jun 01, 2007 2:02 am

In The Collision Event Of The Bullet To The Other Actor
You are welcome to join my forum. 4 active members lol but it's a cool place. active... much talking :D it's fun!
http://caaz.freeforums.org/
User avatar
Caaz Games
 
Posts: 729
Joined: Wed Feb 14, 2007 9:09 am
Location: California....knows how to party!
Score: 25 Give a positive score

Postby arcreamer » Thu Jul 26, 2007 2:42 am

shockingly... errors in script when i try and do the script... "illegal structure operation..." and "undeclared healthbar"...
arcreamer
 
Posts: 398
Joined: Tue Jul 03, 2007 4:08 pm
Score: 9 Give a positive score

Postby Caaz Games » Thu Jul 26, 2007 3:17 am

Mine or sparkys?
You are welcome to join my forum. 4 active members lol but it's a cool place. active... much talking :D it's fun!
http://caaz.freeforums.org/
User avatar
Caaz Games
 
Posts: 729
Joined: Wed Feb 14, 2007 9:09 am
Location: California....knows how to party!
Score: 25 Give a positive score

Postby d-soldier » Thu Jul 26, 2007 3:55 am

arcreamer, post your code (copy and paste it from your script in GE) here... typically those kinds of errors occur when you misplaced something in the script, or try to use a variable that doesn't exist.
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby lilmuleman214 » Fri Jul 27, 2007 6:10 pm

steps 2, 3, and 4 confuse me. Coould someone explain them to me please?
Life is to good to waste
Go To http://www.Game-junkiez.us
to play/download my games.
User avatar
lilmuleman214
 
Posts: 102
Joined: Wed Jul 25, 2007 6:42 pm
Score: 5 Give a positive score

Postby Sgt. Sparky » Fri Jul 27, 2007 6:12 pm

arcreamer wrote:shockingly... errors in script when i try and do the script... "illegal structure operation..." and "undeclared healthbar"...

you must make an actor called healthbar.
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

Postby Caaz Games » Fri Jul 27, 2007 6:17 pm

ok
2.)change the animation of the healthar Actor to "STOPPED" in "Create actor".
3.)then make two actors ( for now lets just call them "A" and "B").
4.)go to "Draw Actor" of the Health Bar actor and put in the code:

Code: Select all
DestroyActor("A");


Have it "Wait For Frame Action" then put in the last frame number (mine would be 11)
Last edited by Caaz Games on Fri Jul 27, 2007 6:25 pm, edited 1 time in total.
You are welcome to join my forum. 4 active members lol but it's a cool place. active... much talking :D it's fun!
http://caaz.freeforums.org/
User avatar
Caaz Games
 
Posts: 729
Joined: Wed Feb 14, 2007 9:09 am
Location: California....knows how to party!
Score: 25 Give a positive score

Postby Sgt. Sparky » Fri Jul 27, 2007 6:20 pm

Caaz Games wrote:[code/]
DestroyActor("A");
[/code]

*
Code: Select all
[code][/code]

those brackets are for making a code box. :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

Postby lilmuleman214 » Fri Jul 27, 2007 6:54 pm

for step five, do u put the code in the health bar, or a/b actors?
Life is to good to waste
Go To http://www.Game-junkiez.us
to play/download my games.
User avatar
lilmuleman214
 
Posts: 102
Joined: Wed Jul 25, 2007 6:42 pm
Score: 5 Give a positive score

Postby Caaz Games » Fri Jul 27, 2007 6:59 pm

The A actor
You are welcome to join my forum. 4 active members lol but it's a cool place. active... much talking :D it's fun!
http://caaz.freeforums.org/
User avatar
Caaz Games
 
Posts: 729
Joined: Wed Feb 14, 2007 9:09 am
Location: California....knows how to party!
Score: 25 Give a positive score

PreviousNext

Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest