Chase and Damage

● ARCHIVED · READ-ONLY
Started by sillowette 6 posts View original ↗
  1. Okay, so it took me forever to even figure out how to get an NPC to chase your character, what I need to do now is make it so that if the NPC catches you, it depletes some of your health, but ONLY when it touches you. I've tried doing it via "player touch" but then he doesn't chase you. I'm sure its something simple that I'm overlooking, but I'm frustrated to the point of tears with this game already.
  2. Set the event trigger to event touch. Then, when the event is next to the player, it will trigger whatever you have it trigger. Also, make sure your chase is set under set move route, with the move route set to move towards player (that will force a chase).

    However, you may want to put a delay in the event so it doesn't trigger 60 times when it does touch the player (you can do this with the wait command), as it will check that every frame, and the game runs at 60 fps by default. This means if you don't put a delay in, and you have it do -100 HP per touch, if it is by the player for 1 second, the player will lose 6000 HP.
  3. sillowette said:
    Okay, so it took me forever to even figure out how to get an NPC to chase your character, what I need to do now is make it so that if the NPC catches you, it depletes some of your health, but ONLY when it touches you.
    Let me guess - you aren't using autonomous movement?
    Because if you did, this would be very easy to do...


    In the event pretending to be the NPC (there are no NPCs, only events on the map), set the trigger to "event touch" and change autonomous movement from the default "fixed" to "approach".


    In the content area, only place the commands of what should happen when the event touches the player (damage command on the actors).


    Finished, nothing more is needed - you only need more if you want to add delays, conditions or other things.


    Edit: If you don't know autonomous movement - that are the settings above trigger/priority, between the graphic and the content area
  4. you could also make the NPC push the player forward when it touches or the npc delays movment for a half a second when it touches
  5. Thanks everyone, I got it working. I feel like an idiot for not figuring it out sooner. ^w^;
  6. Don't feel bad, I just sorted out the same problem.  LOL