Page 1 of 1

several noob questions

PostPosted: Sat May 12, 2007 8:54 pm
by gokuryudragon
just like in naruto , ninja acadamy for gba, at the end of the level, you have to battle a boss and i want my game to be like that (grammar). anyways, i have no idea how to program a cpu to like fight and take certain random paths...

also, how do u program a health bar and "magic" or "mana" bar?

plz help, this is the first time i asked 4 help in a topic and i have a hard time makin a game with buncha naruto characters in it.

P.S. does anybody have a good program for animating sprites from a spritesheet?

PostPosted: Sat May 12, 2007 9:00 pm
by d-soldier
Questions like this should be in the General or Development sections of the forums. Most of your questions can be addressed pretty easily however.

Regarding your health/magic bar, see:
http://game-editor.com/forum/viewtopic.php?t=3133

As far as having smart bad guys, thats more tricky. I would do a search of the forum, and sift through the various posts regarding scripting for enemies and find the things you like and would like to include in your game.

Re: several noob questions

PostPosted: Sat May 12, 2007 9:01 pm
by Caaz Games
gokuryudragon wrote: how do u program a health bar and "magic" or "mana" bar?
To Make Any Kind Of Bar Use this http://game-editor.com/forum/tp-3133-Ea ... h-Bar.html
Just Change The Destroy Actor To Event Disable

PostPosted: Sat May 12, 2007 10:36 pm
by Rux
Speaking of health bars,
does anyone think they can solve a problem.
My question is, Why does my health bar cause it's effect only once?
When my health bar runs out it causes the effect the first time, I regenerate the health bar, and when it runs out it doesn't cause the effect?? :? ??
I dont get it!
Can anyone help me?! :?: :?: :? :?: :?:

how bout

PostPosted: Sat May 12, 2007 10:55 pm
by d-soldier
It would be easier to figure out if you would post the scripts you have in place for the healthbar...

Your players drawactor script should have something like:

if (udi_health.animpos>6)
CreateTimer("Event Actor", "smokerise", 500);
if (udi_health.animpos<6)
DestroyTimer("smokerise");
if (udi_health.animpos>9)
DestroyActor("player");

This script continues to work throughout the players many lives because it's a constant IF (being in the DRAW ACTOR section). Basically it says that if the healthbar gets past frame 6, make my player start smoking (so you know he's in bad shape without looking at your health). If he gets a power-up and his health goes back below 6, stop the smoke. Frame 10 or more of the healthbar destroys the player... My players create-actor event resets the healthbar back to frame 1.

PostPosted: Sun May 13, 2007 7:51 pm
by Rux
It's for my pokemon game I just did this,

Code: Select all
MewFX.textNumber = MewFX.textNumber + 1;
EventDisable("Mew", EVENTKEYDOWN);



Then I said wait for frame, 10; for the health bar (HP1).
Any suggestions?

PostPosted: Sun May 13, 2007 8:21 pm
by d-soldier
.. that code doesnt tell me much. Either adjust it with what I posted (obviously changing the actor names and such) or post the script that actually tells GE what to do if the healthbar does whatever... How did you "say wait for frame"...

PostPosted: Sun May 13, 2007 8:25 pm
by Rux
I want the health bar to add to a textNumber when the health bar runs out and I also want it to Disable the key down event for mew.
And when I press Z (Heal) it adds 1 frame of health to the health bar and it Enables the keydown event for mew.
Get it now?
And I didn't say anything to it, I meant to command it. :lol: :oops:

PostPosted: Sun May 13, 2007 8:42 pm
by d-soldier
... So it's NOT a healthbar then, it's a text object that displays the player's health? A HealthMeter?

PostPosted: Sun May 13, 2007 8:55 pm
by Rux
Look at this screenshot. :|
I want it to do it over and over again. OK!
Can anyone else help D-Soldier understand?

PostPosted: Sun May 13, 2007 10:05 pm
by makslane
Try somethin like this (in the hp actor):

Code: Select all
if(animpos >= nframes)
{
  MewFX.textNumber = MewFX.textNumber + 1;
}

PostPosted: Sun May 13, 2007 10:36 pm
by Rux
It didn't work. :( :( :( :( :( :( :( :( :( :( :( :( :( :(
Maby I should send the ged to you.?

EDIT: Never mind I did create actor instead of draw actor, but there is one problem. If I make it add one, it just keeps on adding realy fast. untill I heal.

PostPosted: Mon May 14, 2007 2:54 am
by Rux
Huh I guess I fixed it. :D :D