zelthegamer

Villager
Member
Joined
May 12, 2016
Messages
10
Reaction score
2
First Language
English
Primarily Uses
RMVXA
 Hello!


 I am new at RPG maker, and I don't know if this is obvious, but is there a way I can make something specific happen when an even touches a block?


 What I have done so far, is make it so that the event is movable by a player touching it.


 Here are the commands I have put in the event so far;


Untitled.png


I am trying to make it so that when the player moves the event in a certain spot, it will trigger a door opening.


Is this possible? If so, how?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,868
Reaction score
8,583
First Language
German
Primarily Uses
RMMV
yes, you'll need to add a check after each move to see if the event is in the correct place.


Usually done with two control variable commands to load the x and y of the event position into them, followed by two conditional branches to check which values they are.
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,502
Reaction score
412
First Language
German
Primarily Uses
RMMV
Maybe this Copy Paste from another thread helps you?


Pseudo Eventcode:


Set Move Route: Turn away from Player and Move one Step. (Skip if Cannot Move must be marked and Wait for Completion)


Control Variable 1 and 2 - Game Data - Charackter - This Event -  Map X and Y


Conditional Branch Variable 1 == 5 (chosen MapX)


Conditional Branch Variable 2 == 8 (chosen MapY)


If yes than


Do your vent stuff here.


than Turn Self Switch A ON


Dont forget to Create a seccond Eventpage with Self Switch A as Condition (Or use normal Switches  if needed)


Thisway its with direct coordinates and only to  push it into correct location one Time.


Ahh, while Map is reloading so do Eventpositions, but therefor also existing workarounds if needed.
 
Last edited by a moderator:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,660
Reaction score
15,290
First Language
English
Primarily Uses
RMMV
FYI, you don't need to make the event 'turn' away from the player before you make it 'move' away from the player.  If it's not facing away from the player prior to the move, it will turn automatically before it moves.
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,502
Reaction score
412
First Language
German
Primarily Uses
RMMV
FYI, you don't need to make the event 'turn' away from the player before you make it 'move' away from the player.  If it's not facing away from the player prior to the move, it will turn automatically before it moves.

But if the Event is moving more than one Field "Move Away from Player" can cause the Event to run into the wrong direction sometimes.


For example:


If the Event travels more than 1Maptile and the Player is still able to run around, in that case the bug apears.


Also if it moves more tiles straight and than against a Wall, can also cause Event to run in wrong direction sometimes.


Maybe not in this case but maybe good to know :).
 
Last edited by a moderator:

Latest Threads

Latest Posts

Latest Profile Posts

A repost of an old meme I had made, now with music

I have a really hard time keeping all these goodies secret til December... but I swear, it is worth the wait!
Working on a Premium version of my minimap plugin that will have advanced functionalities such as drawing a Terrain map based completely on the users tilesets, whatever they may be, and drawing minimap radar icons automatically based on texture of the event the note is applied to.
Psttt come look, this is the secret technique to tenderizing steaks, it makes it extra beefy. :rwink:

pixeldailyaxemeatsheild.gif

Forum statistics

Threads
115,857
Messages
1,093,502
Members
151,072
Latest member
Nightmarer26
Top