jmonkey106

Villager
Member
Joined
Jun 15, 2020
Messages
10
Reaction score
0
First Language
English
Primarily Uses
RMMV
Basically I want an event to spawn/teleport in front of the player after their first random encounter. But since this is a random encounter they could be anywhere when this happens. I think I may have some idea on how to do this but don't know how to write it, I'd want to find the x and y of the player and then teleport the event to in front of that location.

I'm assuming I'll have to use the script button to do this, can anyone help?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,388
Reaction score
8,099
First Language
German
Primarily Uses
RMMV
no need for scripts, this can be done with eventing alone.

you'll need two variables for x and y. use control variable:game data to get the player coordinates into them (change map id to map x of player and map y of player).
then four conditional branches checking the facing of the player, adding or substracting one from the coordinates to get the coordinate the player looks at.
use those two modified variables for the change event location command.
 

Latest Threads

Latest Profile Posts

It seems that I have to change the order with which I make the fantasy games on my bucket list, because the intended title is used as a story element in the first two games in the line, and somebody else might take the title for their own game because the term uses real words. I can't risk going over the apparent three year limit for registering trademark ahead of time.
I am interested in collaborations so if you like my art, hit up my messages! :wub
unknown.png

Making good progress with the second chapter. :)

Still work in progress.

(Real life, it is chronically the fourth chapter that I am making.)
constructionworkconcept.pngezgif-2-0acb620ecf8d.gifezgif-2-afeaf16ebb8d.gif "The Great Wall is great. But, most people can only be the slaves who built it, leaving their bones underneath that wall. They spent their whole life to build that wall and the empire, an empire that enslaves them." :kaoswt2: I'm just going to turn it into a modern-day sad tale.

Forum statistics

Threads
110,676
Messages
1,055,104
Members
143,796
Latest member
ShadyBrain_Entertainment
Top