thepsyche

Veteran
Veteran
Joined
Nov 16, 2016
Messages
404
Reaction score
203
First Language
English
Hi all,

I'm trying to create a puzzle where an event follows the player exactly in the same manner a follower does.

In this particular case, I want 1 TILE of spacing between the player and the event (as opposed to 0 tiles of spacing) at all times (as if it were the THIRD member of a party, or second follower).

To complicate things, the player must start directly 1 tile on the Y axis below the event when the puzzle begins - meaning that the player will need to create one tile of separation before the event starts to follow in this fashion.

I'm trying to set this up, but I'm having trouble figuring out the logic they should follow to imitate a follower.

Can anyone suggest how to set this up with events?

Thanks!
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
45,495
Reaction score
16,403
First Language
English
Primarily Uses
RMMV
Does the player transfer to the correct starting tile as soon as they enter the map? Or can they walk around a bit before getting there? If so, what happens to this event while waiting for the player to get on the right tile?

Do you have followers enabled?

I'm thinking something like a move route with this.moveTowardCharacter($gameParty.followers()[1]) might almost work, but I wonder what it'd do if it's already on the same tile that the 3rd party member would be on if they were visible - would it step away because it can't step any closer? Might be worth having a play with as a starting point.
 

thepsyche

Veteran
Veteran
Joined
Nov 16, 2016
Messages
404
Reaction score
203
First Language
English
Thank you for the response @Shaz

So, let me outline the progression of things for you:

1) Player is on map, no followers. They are free to do as they wish.

2) Player interacts with stationary event on map. Player will always interact with this event from exactly 1 tile on Y axis below the event, while facing it.

3) This initiates the puzzle. Event should then begin following player after the player creates 1 tile of space between them and the event.

EDIT: Essentially, I need to store player coordinates into one or more variables with every step, and then be able to call on those variables to put the event in that location. It's important the event replicates the exact same previous movements as the player.

I'm having trouble wrapping my head around the process as a whole.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
37,959
Reaction score
10,536
First Language
German
Primarily Uses
RMMV
EDIT: Essentially, I need to store player coordinates into one or more variables with every step, and then be able to call on those variables to put the event in that location. It's important the event replicates the exact same previous movements as the player.
that is exactly what the eventing command control variable is for.

what you need for your timed requirement however is a series of variables.
with each step that the player does, the storage of where the player went would have to be cycled through the variables.

something like
do movement from variable step-1
control variable step-1 = variable step -2
store player move in variable step -2

it can get a bit complex depending how the movement is stored and handled, but that would be the way to go in my opinion.
 

thepsyche

Veteran
Veteran
Joined
Nov 16, 2016
Messages
404
Reaction score
203
First Language
English
Thanks @Andar, I came up with something similar. My main problem is trying to figure out how to update a variable only ONCE per player step.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
37,959
Reaction score
10,536
First Language
German
Primarily Uses
RMMV
several possibilities, for example executing the sequence only if the player position changes.

for better help you would have to give a screenshot of the event so that we can see how exactly your variant works.
 

thepsyche

Veteran
Veteran
Joined
Nov 16, 2016
Messages
404
Reaction score
203
First Language
English
Thanks, but I don't have an event at the moment. I'm trying to get the concept down first so I know how to proceed.
 

thepsyche

Veteran
Veteran
Joined
Nov 16, 2016
Messages
404
Reaction score
203
First Language
English
Thanks everyone, I have found a "sort of" solution that will do.

I implemented the findDirectionTo function in unison with a few parallel events collecting player X & Y information.

Thanks again!
 

Latest Threads

Latest Posts

Latest Profile Posts


New sprites in my project!
Updating my stream thumbnail collection here Streaming more game dev in 30 minutes or so. :LZSexcite:

Programming languages are amazing.

Someone needed help with a problem in C#. I've got 0 experience in C#. I read 0 lines of their code. I only knew what they wanted to do. I wrote a completely generic code in Javascript containing the generic answer. But they understood what I was doing and translated that to their code. 20 seconds later, problem solved.
been using ChatGPT to write a new story. I told it to :
generate a word like gundam for a false prophet super AI

it answered :
"NOVUS" as an acronym for "New Omnipotent Virtual Unit for Synthetics"? sounds similar to "gnosis," which is a term associated with knowledge and spiritual enlightenment, fitting the theme of a false prophet.


Five traps done, more on the way!
Stay tuned!

Forum statistics

Threads
129,812
Messages
1,205,413
Members
170,926
Latest member
apkchplaycom
Top