Player touch & Event touch in one Event?

Pooky

LadyDusk
Member
Joined
Sep 9, 2019
Messages
10
Reaction score
5
First Language
german
Primarily Uses
RMMV
Hey there! Been a long time since I had a question, but I've got something new. I'm not sure if a plugin would be needed for that, so I was a little lost on where to put this topic.
However, what I'm trying to do is basically when the player touches the event, that it triggers an action, but when the event touches the player first, it triggers a different action.
If you need more of an example to understand what I mean, here is one: Let's say Mary walks after Barry and catches him, then brings him to the police. But if Barry was to touch Mary first, he would knock her out, so she couldn't catch him anymore.
I hope it's a little bit clear what I mean. ^^° I didn't find anything in conditional branches that could have achieved the wanted result and I've really been all over the web to find something like that. I hope it's not too hard? I'd also be perfectly fine with it if instead of the player touching the event, the player would have to press a button.

If anyone could help me, that would be great! Thank you in advance!
 

Hyouryuu-Na

Sapphire Sodium
Veteran
Joined
Jun 15, 2017
Messages
947
Reaction score
2,213
First Language
Not English
Primarily Uses
RMMV
You can make a different parallel event that will check for this:
Code:
$gameMap.distance($gamePlayer.x, $gamePlayer.y, $gameMap.event(id).x, $gameMap.event(id).y)==1 && Input.isTriggered('ok')
So when you're within 1 tile of the event and press 'enter', you can catch the event. You can leave the event trigger as event touch.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,087
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
In case you're interested, Galv has a handy plugin for this:
 

Pooky

LadyDusk
Member
Joined
Sep 9, 2019
Messages
10
Reaction score
5
First Language
german
Primarily Uses
RMMV
You can make a different parallel event that will check for this:
Code:
$gameMap.distance($gamePlayer.x, $gamePlayer.y, $gameMap.event(id).x, $gameMap.event(id).y)==1 && Input.isTriggered('ok')
So when you're within 1 tile of the event and press 'enter', you can catch the event. You can leave the event trigger as event touch.
Wow! That was fast, ha ha! Thank you so much, it works great and is exactly what I was searching for! :)

In case you're interested, Galv has a handy plugin for this:
Ah, thank you as well! I will definitely make sure to get my hands on that one!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top