What is the simplest way to program the player attacking and breaking an object?

PS_VITA

Active member
On topic: I've used type trap, type enemy, type obstacle and I get some what satisfying results and I just wanna hear from any of you what has worked the best for you.


I wish type_none entities could be hurt as well, often times I've noticed that if there's an obstacle, or an enemy as a window, I have to adjust a npc a.i or make sure to delete the obstacle before clearing the stage so I can end the stage. So yeah, I'm constantly struggling with this and I wanted to see if anyone else found a way to simplify things regarding this matter.
 
What exactly are you trying to make? Something like Street Fighter 2 bonus round smashing the car? So the object will have different states/stages of damage ?

You could use ondeath script and/or takedamage script to control damage and death behaviour.


often times I've noticed that if there's an obstacle, or an enemy as a window, I have to adjust a npc a.i or make sure to delete the obstacle before clearing the stage so I can end the stage.
You could set 'offscreenkill' in the entity header so if the entity is not destroyed, it will be removed from play once you have passed that part of the stage. you would spawn it when needed offscreen when the player is approaching that section, to stop it being removed at the start, if the entity is say in the middle of a long stage.

You can also create a endlevel object or set a endlevel from a final enemy or something (like if you have a boss at the end, put endlevel after his death)
 
Back
Top Bottom