QUOTE (Mustaklaki @ Apr 15 2012, 11:01 AM)
Here's your demo
Be warned though, there are a ton of restrictions, that might just make the developer look sloppy or lazy. I listed them all in a autorun eventDemo
Thanks for the help. Didn't work well at all but it got me to the train of thought I needed to figure it out.
Turns out it was simpler than everything I was trying. What I ended up doing was this:
- Create two variables for the player's coordinates (one for X coordinate, one for Y).
- Create four conditional branches ("if [direction] is pressed"] for the four directions available to the player. Note: The first branch is run by default, the other three are run by the "Else" branch of the previous condition.
- For each condition, have the event re-check the variables (resulting in constant updating of the player's coordinates) then add or subtract 1 from the necessary coordinate. ("Up" subtracts from Y, "Left" subtracts from X, etcetera).
- Set the event location to the new coordinates.
- Check the "Through" box, otherwise the event object will remain solid and block the player's movement.
- Set the event to "Parallel Process"; This is just for convenience in the demo. For the actual project, I'll probably be setting it up to function via buttons and switches.
It still needs a bit of refining but the basic need is met. There's a tiny delay between the player moving and the event relocating that I would rather not have but it's no big issue. Anyway, here's the result: http://www.gamefront.com/files/21572178/BarrelTiles.exe
Oh, and you can disregard the old guy NPC. I was testing some other things. Something I noticed messing with events for the old guy is the "if [x] button is being pressed" condition doesn't seem to work. Even if you hold the necessary button down, it will only run the commands in the "Else" branch.
This post has been edited by Xios: Apr 17 2012, 06:11 AM