Ive been googling and searching these forms and cant seem to find an exact answer to what im trying to do so im sorry if this is a repost...
But what im trying to do is make a statue moveable by character actions and when it hits a certain spot on the map it stops and will trigger an event when the others are moved to their spots as well.
I have the movement down i just cant figure out how to make the event hit the right spot and stop.
Any and all help is much appreciated! Thank you in advance!
So it's a puzzle where you have to move certain objects onto certain tiles? Do you move it once and it continues in that direction until it hits the right spot (or a wall)? Or do you have to push it every tile you want it to move?
I have it set to where it moves one spot depending on which side of it you are on
and having it hit the certain tiles is what im aiming for
Sounds like all you have to do is check in the statue's event what its current X & Y coordinate on the current map is, and if its at the correct values then don't allow the "push" to change the statue's position anymore. (Event Commands / tab 1 "Game Progression" Control Variables / "Operand" Game Data / "Character" This Event - Map X, and another variable for Map Y)
Personally, I'd allow the player to mess up and push the statue anywhere they want, and have your autorun event that's checking for all the statues in the correct locations just wait patiently until they get it right. I hope you have some way to reset all the statues in case they get pushed into places where they can't be retrieved.
You wouldn't use an autorun event, because if you did, the player wouldn't be able to push the statues at all. I wouldn't even use a parallel process event.
If you have X number of statues and X spots to put them, and it doesn't matter which statue goes on which spot, do something like this:
Use the Region layer to draw the same region id on all the spots.
On each event, have the movement followed by a Common Event command - all events will call the same common event.
On each event, add a second page conditioned by self switch A, with the statue, but no movement commands (this is so when the event is on the correct spot, you can activate that event page and the player can't push it any more).
In the common event, use Control Variables > Game Data > Character > This Event's > X to put the X coordinate into a variable. Do the same with the Y coordinate.
Then use Get Location Info with those two variables to put the region id into a third variable.
Finally use Conditional Branch to see if the third variable is equal to the region id you put onto the spots - if it is, turn on self switch A.
Another advantage to Shaz's solution is that the logic is being executed only when it needs to be executed - when the statue location changes. A parallel event (again, an autorun would not work here) would execute 60 times per second. While I doubt that checking the X and Y position would cause any noticeable lag, it's good to have in mind whether something needs to be done 60 times a second or not - enough of these small things could add up and start to slow down a game.
I appreciate all the help!
Shaz im trying to follow your way but im getting a little lost at the get location part... could you elaborate a little bit the way ive been trying to do it either one move and it activates whether its in the right spot or not or it just keeps being able to move
get location info needs three variables. one variable to store the info you want, and two variables to give the coordinates of the mapposition you want to see info from.
The two coordinate variables need to get the x and y of the current position of the statue - that is done by control variable before you use the get location info command.
then you use the get location info command with these two variables to get the info about the position into the third variable - in this case the region ID of that position.
And then you check the number you gained from the region ID. If that is the number you placed on the target position then you know that the statue is placed where it is supposed to trigger something.
Glad you got it sorted. Your event in the previous post had a LOT of issues - I didn't watch the video, but I hope going through that helped you understand why your event would not work.
If your problem is solved, you can report your first post and let the mods know, and they'll close the thread.