I'll try my best to explain this;
I have a puzzle element. This involves throwing a fish from the user's inventory. This puzzle element will be called many times on (likely) many different maps.
The current method I am using (and is likely not the most practical) is adding a common event to the inventory item. This common event:
First moves a "FISH" (event ID 003) underneath the player.
The common event then checks which way the player is facing, and depending on the direction the player is, the "jump" movement route will "jump" the fish 2 tiles away from the player (the "jump" command gives a convincing arc as if it had been thrown)
The common event then turns on a switch. This switch will alter the way the "FISH" event now works.
The "FISH" event will become a platform the player can walk on. So first the event will take the X and Y coordinates of itself (the "FISH" event), and with those coordinates it will move a jump pad on top of it. It will then subtract 2 from the appropriate axis (Y axis if the player is facing up or down, X axis if the player is facing left or right [this is done by just checking which cardinal direction the player is facing: left or right X, up or down is Y]) next the "FISH" event will move another jump pad to FISH event but - 2 from the players facing axis (this should place the jump pad directly beneath the player). This jump pad will allow the player to jump to the event. Next it will add 4 to that same axis so it can move a jump pad to the opposite "shore" of the player is standing on, that way this jump pad will allow the player to return and prevents this "FISH" event being a 1 way street.
It's a lot. Sorry about that, I hope my explanation was clear.
Allow me to explain the things I want to change about this that seem like they could be functions handled by a plugin;
Problem 1) The event ID in the common event. Because the common event is looking for a very specific event ID, if I make a map and later down the line (after adding many events to this map) add the "FISH" event, this new "FISH" event may not have the correct event ID, and therefore the common event will not function properly. So, if there was a plugin to either manually assign event IDs OR allow a common event to spawn an event I think that would fix this problem.
Problem 2) Regularly checking the cardinal direction the player is facing. Twice the logic of this whole event needs to check whether the player is facing up, down, left, or right - which just seems messy and inefficient. This partially needs to be done because, while there is the movement route option of "move away from player", there is not a movement route option to "jump away from player". To reiterate, the reason I chose "jump" rather than "move" is because jump has a convincing "thrown arch". So if there was a plugin that added the "jump away from player" I think that would partially fix this. While writing this it occurred to me I may be able to create a secondary common event that is designed simply to check the player's direction. It may not be more efficient, but it will be cleaner in the event 🙂 (edit: ...sort of...)
Alternatively, if there was just a plugin that added a "throw" function to the game and allowed for appending an event at location the thrown item lands, I think that would simplify this a whole lot.
Sorry for the wall of text, but hope someone can eitherhelp me think through this messiness better, or recommend a plugin or 2 to consolidate this messy logic.
I have a puzzle element. This involves throwing a fish from the user's inventory. This puzzle element will be called many times on (likely) many different maps.
The current method I am using (and is likely not the most practical) is adding a common event to the inventory item. This common event:
First moves a "FISH" (event ID 003) underneath the player.
The common event then checks which way the player is facing, and depending on the direction the player is, the "jump" movement route will "jump" the fish 2 tiles away from the player (the "jump" command gives a convincing arc as if it had been thrown)
The common event then turns on a switch. This switch will alter the way the "FISH" event now works.
The "FISH" event will become a platform the player can walk on. So first the event will take the X and Y coordinates of itself (the "FISH" event), and with those coordinates it will move a jump pad on top of it. It will then subtract 2 from the appropriate axis (Y axis if the player is facing up or down, X axis if the player is facing left or right [this is done by just checking which cardinal direction the player is facing: left or right X, up or down is Y]) next the "FISH" event will move another jump pad to FISH event but - 2 from the players facing axis (this should place the jump pad directly beneath the player). This jump pad will allow the player to jump to the event. Next it will add 4 to that same axis so it can move a jump pad to the opposite "shore" of the player is standing on, that way this jump pad will allow the player to return and prevents this "FISH" event being a 1 way street.
It's a lot. Sorry about that, I hope my explanation was clear.
Allow me to explain the things I want to change about this that seem like they could be functions handled by a plugin;
Problem 1) The event ID in the common event. Because the common event is looking for a very specific event ID, if I make a map and later down the line (after adding many events to this map) add the "FISH" event, this new "FISH" event may not have the correct event ID, and therefore the common event will not function properly. So, if there was a plugin to either manually assign event IDs OR allow a common event to spawn an event I think that would fix this problem.
Problem 2) Regularly checking the cardinal direction the player is facing. Twice the logic of this whole event needs to check whether the player is facing up, down, left, or right - which just seems messy and inefficient. This partially needs to be done because, while there is the movement route option of "move away from player", there is not a movement route option to "jump away from player". To reiterate, the reason I chose "jump" rather than "move" is because jump has a convincing "thrown arch". So if there was a plugin that added the "jump away from player" I think that would partially fix this. While writing this it occurred to me I may be able to create a secondary common event that is designed simply to check the player's direction. It may not be more efficient, but it will be cleaner in the event 🙂 (edit: ...sort of...)
Alternatively, if there was just a plugin that added a "throw" function to the game and allowed for appending an event at location the thrown item lands, I think that would simplify this a whole lot.
Sorry for the wall of text, but hope someone can eitherhelp me think through this messiness better, or recommend a plugin or 2 to consolidate this messy logic.