Main Menu
  • Welcome to The RPG Maker Resource Kit.

Trigger event when behind sprite (Resolved)

Started by Theodie12345, August 20, 2008, 05:09:35 PM

0 Members and 1 Guest are viewing this topic.

Theodie12345

Hi, I am hoping for someone to help me on:
I am trying to figure out how to have an event activated when the event is facing up and you are behind the event facing the event. The thing is, is that the event has a route so the trigger is on event touch. I have tried this:

@>Conditional Branch: This event is facing Up
   @>Conditional Branch: Player is facing Up

However when I used this, the event still activates when I'm facing up and the event walks into me heading up. What I want is to have the event only activated when I'm behind the event. (Using RPG Maker Xp)

Thank you,
Theodie12345

Kokowam

You'll need to set four variables.

They would be EventX, EventY, HeroX, HeroY.

First, set conditional branch to see if the event and player are facing up. Then, store the event's X and Y position to the corresponding variables. Same for the hero. Then check if EventX + 1 = HeroX (might be EventX-1. Probably +1, though) and if EventY = HeroY.

Do whatever is needed for the other directions.

Grafikal

Alright well, I have a demo here you can use for this. But note that it only works while each the player and the event face up and that you're behind the event. Also, the event has to have Direction Fix checked ON. For some reason, XP likes to automatically have events face the player when it's activated by a player touch or action button, which would make sense if the action were to display a text, however, it's not...

I don't really see a use for this, but if it's for something like a Pickpocket system, you're better off finding one already made for XP. I've seen a couple around. There might be one in the event systems of XP.

Also, the demo has any kind of explanations you might be looking for in comments inside the event.

Theodie12345

Alright I think I get it. Thanks for all for the help!