Page 1 of 1

enemy health and levels

PostPosted: Tue Jun 12, 2007 4:21 pm
by J Slayer67
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

PostPosted: Tue Jun 12, 2007 5:07 pm
by Sgt. Sparky
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

PostPosted: Tue Jun 12, 2007 5:46 pm
by J Slayer67
oh yeah duh how come i remember i did this before but i always forget the stupid == :oops: :lol: DUH thanks a ton sparky

PostPosted: Tue Jun 12, 2007 6:53 pm
by Sgt. Sparky
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