enemy health and levels

Game Editor comments and discussion.

enemy health and levels

Postby J Slayer67 » Tue Jun 12, 2007 4:21 pm

hey can anyone help me with my enemy health and levels for my charecter. kind of like an rpg?

here's my code for collision with knif on the base-enemy (knife collides with enemy)
Code: Select all
if (eh = 3)
{
    DestroyActor("Event Actor");
}
else if (eh = 4)
{
    DestroyActor("Event Actor");
}


here is my create actor code:
Code: Select all
eh = 0;


and finally my draw actor for my enemy:
Code: Select all
if (eh = 3)
{
    DestroyActor("Event Actor");
}
else if (eh = 4)
{
    DestroyActor("Event Actor");
}


PS: eh is my var for enemy health and lvel is my var for my charecters level. im trying to make it so that the higher my level is the more the knife hurts. in the beginning when i start the game my enemis all destroy. (i have clones)

thx in advance
Zelda junkie!!
A
AA
User avatar
J Slayer67
 
Posts: 44
Joined: Fri Jun 08, 2007 8:40 pm
Score: 1 Give a positive score

Postby Sgt. Sparky » Tue Jun 12, 2007 5:07 pm

you must use == not = :D
oh, and enemy health:
I have a demo here.
http://game-editor.com/forum/tp-3579-Fi ... Game-.html
:D
oh, and you use this code if you make your level stuff and my code,
Code: Select all
health -= (5 + levl);

: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 J Slayer67 » Tue Jun 12, 2007 5:46 pm

oh yeah duh how come i remember i did this before but i always forget the stupid == :oops: :lol: DUH thanks a ton sparky
Zelda junkie!!
A
AA
User avatar
J Slayer67
 
Posts: 44
Joined: Fri Jun 08, 2007 8:40 pm
Score: 1 Give a positive score

Postby Sgt. Sparky » Tue Jun 12, 2007 6:53 pm

J Slayer67 wrote:oh yeah duh how come i remember i did this before but i always forget the stupid == :oops: :lol: DUH thanks a ton sparky

you are welcome, any time! :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


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron