Chase and Damage

sillowette

Villager
Member
Joined
Sep 28, 2014
Messages
7
Reaction score
1
First Language
English
Primarily Uses
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.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
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.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
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
 
Last edited by a moderator:

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,923
Reaction score
534
First Language
English
Primarily Uses
N/A
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
 

sillowette

Villager
Member
Joined
Sep 28, 2014
Messages
7
Reaction score
1
First Language
English
Primarily Uses
Thanks everyone, I got it working. I feel like an idiot for not figuring it out sooner. ^w^;
 

BardicHeart

Veteran
Veteran
Joined
Mar 21, 2014
Messages
34
Reaction score
12
First Language
English
Primarily Uses
Don't feel bad, I just sorted out the same problem.  LOL
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,867
Messages
1,017,061
Members
137,575
Latest member
akekaphol101
Top