1. How do I get my player to have full health when he re spawns after being killed (Yes I know this is a very simple fix but i just spent the last few hours working on a npc attack and respawn code)
2. How do i set up a code for health regen if the player is not fighting
3. How do I factor in defense when facing enemys
ID:155369
![]() Jul 21 2011, 4:19 pm
|
|
I am going to recommend using datums for stats like that. See
http://www.byond.com/members/ DreamMakers?command=view_post&post=35530 |
On the defense thing I have it coded in and everything but when i have the item that grants defense equiped it will say the following
Monster2 attacks Test for -58 damage! then it will add hp so how would I go about fixing this issue would i use something like damage -= M.defence / 2 |
ok im workin with this defence thing and I came up with this
if(def<=0) |
2. You'd have a timer that you spawn when the player attacks. WHILE the timer is active, you'd count down, after it's done, you start to regenerate
3. You have to code it to be considered in the attack code.