That is not RGSS3. It's just pseudocode - you can do it all with event commands.
- Get Location Info
- Conditional Branch (variable)
- Jump to Label
- Label
In your editor, there's an icon to do map editing, an icon to edit events, and the next icon is to edit the regions. Hit that, choose a single region from the palette, and click on all the destination tiles with it. Then you can use Get Location Info to get the region id of an event, and see if the event is on one of those tiles.
Oh wait - there's a mistake there. I thought you could select events and get the region id. You can't - it requires coordinates. So prior to each Get Location Info, you'd have to do a Change Variables to get each event's X and Y value, and use the variables in the Get Location Info to retrieve the region id.
Oooh I see...
I'm still really confused. I best learn through being provided examples, if that's not too much trouble. I need to know what event commands to put on the tiles, the movable events, and for the door.
Yeah, I'm just doing it up now. And I realize you don't even need to use regions - if you're not using them for anything else, you can just assign a unique terrain tag to the map tile that you use for 'destinations', and poll that instead.
I'll post some screenshots in a couple of minutes (after I confirm that it's actually working properly).
Do you mind if I do this up as a tutorial and share with the community?
Ah well, I'm going through the steps and posting images for you anyway, so I may as well put it over in tutorials instead of a support thread 🙂
I'll update here when it's done.
Shaz, would it be possible to simply set up X number of parallel process events that check to see if they are occupied by said object (i.e. the boulder) and while they are increment a single shared variable that when it equals the number of boulders (using a constant for that puzzle) it would run the puzzle solved event?
ex.
- There are 4 boulders in the room and 4 "hotspots" to place them.
- Each "hotspot" is an event that checks to see if the boulder is above them (as a parallel process)
- If the "hotspot" is occupied, then increment the 'puzzlevariable' by 1.
- Else, wait a few frames and try again.
- When 'puzzlevariable' reaches 4, the door opens, or a chest unlock SE plays (you could even allow it to temporarily increment by 1 when the player steps on the 'hotspot', especially if it's a floor switch).
- In the case of the player stepping on the last 'hotspot' to "complete" the puzzle, you could have the 'hotspot' decrement the variable every time it finds that nothing is on top of it (thus playing the unlock/open SE when the player steps on it, but then playing a close/lock SE when they step off, requiring them the use the boulders/boxes).
I hope my explanation is clear. 1 variable, 4 moveable objects (boulders/crates), 4 hotspots/switches