okay, there are 2 things for this topic...
1) If i have the same variable for more than one mob (health/maxhealth) how would i go about resetting the variable after i kill a mob. like, i kill a mob and the hp is the maxhealth again after it dies so i can kill another one.i figured this one out! now just the second one, please! :)
2) if i kill a mob and an overlay has it so it is laying on the ground dead, how can i make it so that if i shoot it again, the first mob wont pop up again?
thanks for your help! :)
ID:163433
![]() Aug 27 2007, 4:55 pm (Edited on Aug 29 2007, 4:23 pm)
|
|
im using rifhaven's shooting demo. so here it is...
mob there you have it... if you need anything else just tell me and ill post it for you. :) P.S. i changed the density to 0 and im still able to shoot it... |
there is no need for an overlay. Just spawn a new obj with the same characteristics as the mob who died(i.e the mob's icon state & icon). And then relocate the original mob who died.
|
No. You relocate the mob to where it would normally be relocated, like if it is a player mob he/she would be relocated to his/her respawn point. Right after that you create an obj with the same icon and possibly icon_state depending on whether you have a "dead" icon_state. According to Lucifer the OBJ should be bypassed when shooting.
Hope that helps, KirbyAllStar |
mob Hope this helps, KirbyAllStar |
now it's making sense. respawn the mob and put the corpse object where the mob was... i get it. i thought he meant like overlays or something...
|
im trying to code it now. im just used to overlays so its a little challenging.
thanks for everything! :) |
Anytime. And good job on not just trying to copy-paste the code. :-)
Just so you know, make the corpse Obj density=0. The shooting code will delete the bullet if it hits a solid atom. |
Is the mob a player? I would just slam an overlay over the top of it if it is dead; I'd change the icon. We can't really help without seeing what you've coded for shooting. Chances are changing the mob's density to 0 would help (as bullets would just fly straight past it) but that really does depend on how you've done the shooting bit.
~Ease~