TSR_MoveEvent

Here is a screen grab to show what I'm referring to. The party has just transferred to a new map using a vanilla transfer event.
Ok, I see... Thanks for the details.
Yet, I cannot reproduce that in a blank project with only the moveEvent plugin.
You said you use a 'vanilla' transfer event, but did you test it in a vanilla project?
I'd like to help, but I really need to be able to reproduce that bug in order to nail it. I'm also wondering how the slight changes added to the last version could freeze the game by itself...

Regards.
I've found the cause. Basic error. I was testing this using existing save files. Once I started testing with a new game, adding all my plugins bit by bit, everything went without a hitch.

I'm so sorry to have wasted your time with this.
Thanks for reporting that.
Shouldn't happen anymore with this version:


Regards ,
TSR

I apologize, I failed to include the error report before.
I'm still getting this error:
Screenshot 2023-04-17 140643.jpg
@Okralord
Ok, this is not very easy to reproduce since the thrown event only stay "-mid-air" a few frames, you need a very hight encounter rate or be very lucky/unlucky to get that bug...

Anyway, I can think of 2 quick solutions:
1) I disable the encounters while the player is holding/throwing an event.
2) I disable the encounters only while the event are "mid-air" to avoid the bug. If you get an encounter while holding a pickup event, the player drops it before entering battle (last update).

the 2 options above are like a 15 sec edit, but this will only disable the random encounter. If you somewhat go into battle using a event 'batte process" command, (before the event land, which is probably very unlikely), you'll still get the bug.

If you also want to disable the event battles while holding and/or throwing, that'll need a bit more modification, so it'll have to wait some more time since I'm kind of busy.

Regards,
TSR
@Okralord
Ok, this is not very easy to reproduce since the thrown event only stay "-mid-air" a few frames, you need a very hight encounter rate or be very lucky/unlucky to get that bug...

Anyway, I can think of 2 quick solutions:
1) I disable the encounters while the player is holding/throwing an event.
2) I disable the encounters only while the event are "mid-air" to avoid the bug. If you get an encounter while holding a pickup event, the player drops it before entering battle (last update).

the 2 options above are like a 15 sec edit, but this will only disable the random encounter. If you somewhat go into battle using a event 'batte process" command, (before the event land, which is probably very unlikely), you'll still get the bug.

If you also want to disable the event battles while holding and/or throwing, that'll need a bit more modification, so it'll have to wait some more time since I'm kind of busy.

Regards,
TSR

Ah, yes. I have encounters triggered by events, not the default random encounter system. So players will often encounter the bug :-/

I think for my purposes it would be best for the encounters to be disabled while the thrown event is in mid air.

I'm happy to wait, I appreciate people like you making awesome plugins!
while I also have it as event, another work around it, when picked up the event,
Switch D is ON (of if you use YEP_selfSwVar, switch E-Z and the enemy cannot
trigger you into battle.

that is the event battle encounter workaround (only for the one in the room).
Hello again @Okralord
I made some additional tests cause there was something bothering me with that bug. The crash occurs after you get back from battle, the map is reloaded and we can see that the event has correctly landed...
So I check the code again and realize that I forgot to reset the player property _hasThrew in the last version. So when we come back from battle, this make the plugin think there's still some events flying around and is looking for the landing coordinates, which were reset before battle.

Try this version (slight mod from the last version) which allow battles while holding and throwing. Shouldn't crash anymore.​


Let me know how it goes. If you still find some bug, or it doesn't suit you as it is, then I'll go for disabling the battles entirely (both random ones and events triggered) while pickup, whenever I'll have more time.​

Regards,
TSR
@TSR
It works! Thank you so much! Now to put throwable stuff everywhere in my project...lol
Hello TSR the frog from the north, Thanks for all your plugins. But I have a problem with this plugin, it is not working at all, I have even disabled all other plugins and it is still not working, I can't find where the problem is 🙁
Here is the plugin parameters:
Spoiler: parameters
1683260371105.png
and here is the event I am trying to make movable
Spoiler: event
1683260445813.png
I have even tried the other note codes and none of them worked, I don't know what i am doing wrong
Hello @abdo97z
The plugin use 'comment tags', not notetags...
Capture d’écran, le 2023-05-05 à 08.09.30.png

This way, the tag is specific to the current event page.

Regards
TSR
Hello @abdo97z
The plugin use 'comment tags', not notetags...
View attachment 260989
This way, the tag is specific to the current event page.

Regards
TSR
Ohh i didn't know that, thank you very much Now it is working perfectly!
Hello! I just wanted to add that in version 1.4.4, the help section doesn't specify that you can add the <MOVABLE CHARACTER> tag to get the event stepping effect, e.g. an animated rolling boulder.

Love the plugin!
Hello! I just wanted to add that in version 1.4.4, the help section doesn't specify that you can add the <MOVABLE CHARACTER> tag to get the event stepping effect, e.g. an animated rolling boulder.

Love the plugin!
Thank you! I will check that.
View attachment 182356
Author:
TSR, The Northern Frog
Download:
TSR_MoveEvent
​
This plugin allows to push, pull, pick up and throw events.



Spoiler: Instructions
Code:
 *
* =========================================================================================
 * == About this Plugin ====================================================================
 * =========================================================================================
 * Use the following comment tags to turn the event page into a movable event.
 *
 * Event Comment Tags:
 * ===================
 *
 *            <MOVABLE EVENT>
 *                  Event page having this comment tag can be pushed and
 *                  pulled by the player.
 *
 *
 *            <MOVABLE MYSTERY: X>
 *                  Event page having this comment tag can be pushed and
 *                  pulled by the player. In addition, these events will
 *                  play the 'Mystery Sound' (set in parameters), and turn
 *                  ON the switch specified by X.
 *
 *                  This will happen only the first time the event is moved.
 *                  Those events will be considered as regular movable events
 *                  afterwards.
 *
 *
 *            <PICKUP EVENT>
 *                  Event page having this comment tags can be picked up and
 *                  thrown by the player.
 *
 *
 *            <MOVE EVENT OFFSET: X>
 *                  Use this tag if you need to adjust the distance the
 *                  player has to walk to get closer to the movable event.
 *                  Without the tag, the distance will be defined by the
 *                  'move event offset' parameter.
 *
 *                  This commment tag can also be used on pickup events to
 *                  set the distance between the player and the event it is
 *                  holding.
 *
 *
 * Map Note Tag:
 * =============
 *
 *      By default the thrown events respect the same passability as the player.
 *      You can throw events over some unpassable tiles by using the following
 *      tag in a map notebox.
 *
 *            <THROW REGION: x, x, x>
 *                  Use this map notetag to mark some region Id as passable
 *                  for throwing event through those regions.
 *
 *
 *
 * HOW TO USE:
 * ===========
 *
 *          TO PUSH: Hold the ARROW KEY in the direction toward the movable
 *                   event until it back off one tile.
 *
 *          TO PULL: Hold the OK BUTTON when standing next to a movable event
 *                   and facing it, and wait until it move one tile.
 *
 *              *There's a small delay when pushing or pulling. Keep holding
 *               the key and you'll see the player starting to 'run' against
 *               the movable event. Then you'll hear the 'Effort Sound' (set
 *               in parameters) and see the 'Effort Balloon' (also set in
 *               parameters). After a few more frames, the event will move
 *               and the player will move along with it.
 *
 *             **When pushing and pulling, the player will walk shortly to
 *               get closer to the movable event. The default distance is
 *               set in parameters. There's also an event comment tag to
 *               assign specific distance to some events.
 *
 *            ***The pushing and pulling event will move at the speed set in
 *               the event tab. Player will move at same speed when pushing
 *               or pulling the event.
 *
 *
 *         TO PICKUP: Stand in front of a pickable event and hold the OK
 *                    BUTTON to pick it up. Keep holding the key because
 *                    releasing it will drop the event. You can move and
 *                    dash while holding an event.
 *
 *          TO THROW: Release the OK BUTTON to drop the event the player is
 *                    holding. The event will be dropped on the tile in front
 *                    of the player. If you drop it while holding an ARROW
 *                    KEY, the event will be thrown one tile away in front
 *                    of the player. And if you drop while holding both the
 *                    DASH BUTTON and an ARROW KEY, the event will be thrown
 *                    2 tiles away in front of the player.
 *
 *
 * SCRIPT CALLS:
 * =============
 *
 *      In order to manage your movable events interaction on the map, you can
 *      use a few script calls to check events position on the map.
 *
 *     
 *      PUSH / PULL events
 *      ==================
 *
 *      Use the following default call to check an event position at any time:
 *
 *               $gameMap.event(eventId).pos(x, y)
 *
 *      It will return true or false wheter the event is at position x, y on
 *      the map. This can be checked in a parallel process event or in an
 *      autonomous movement script command.
 *
 *
 *
 *      PICK & THROW events
 *      ===================
 *
 *      These events can be a bit trickier to manage for game mechanics
 *      purposes. The plugin provide additionnal script calls to check
 *      these events positions.
 *
 *               $gamePlayer.isHolding(eventId);
 *
 *      This call will return true if the map event specified by eventId is
 *      hold (carried) by the player.
 *
 *
 *               $gamePlayer.hasBroughtEvent(eventId, x, y, d)
 *
 *      This call will return true if the map event specified by eventId is
 *      hold by the player on tile x, y and turned in direction d.
 *
 *
 *               $gamePlayer.hasGaveEvent(eventId, targetEventId)
 *
 *      This call will return true if the map event specified by eventId is
 *      hold by the player on the tile in front of the map event specified
 *      by targetEventId The player must be facing the target event.
 *
 *
 *              $gamePlayer.hasThrownEvent(eventId, x, y)
 *
 *      This one will returm true if the player has actually thrown or
 *      drop the map event specified by evenId on that exact tile at
 *      position x, y.
 *   
 *
 *
*
​
Code:
===========================================================

ToU:

Use in any independant RPG Maker MZ or MV projects, including commercials.

Credit is required for using this Plugin. For crediting, use 'TSR' along with one of the following terms: 'The Northern Frog' or 'A frog from the north'

Do not change the Header or the Terms of usage.

DO NOT REDISTRIBUTE! If you want to share it, share the link to my itch.io account:  https://the-northern-frog.itch.io/

Sending me a copy of your completed game using my plugin would be appreciated,  but there's no obligation.

===========================================================

Regards!
TSR

Hello there, Northen Frog!

I loved this plugin and I'll probably use it in my game. Playing around with it a bit I found a few things I wanted to personalize but couldn't find a way to do it within the plugin manager, and unfortunately, I'm a total noob in javascrpt and couldn't make heads or tails of the code, so I thought I'd come to the expert who actually made the plugin and ask!


First is the delay before pushing or pulling, I couldn’t find a way to control how long it takes.

Second is when picking up any object the player character moves forward to the spot of the thing they picked up, and I couldn’t make the pickup be a stationary action.

Then is when picking up something that has the priority bellow or above the character, the picked object changes to same as character and stays on this priority after being put back down.

The last one is when trying to drop a picked item to an occupied or blocked space front of the player character, the dropped item jumps to the opposite direction, behind the player (or one of the sides if that is also blocked). Do you think I'd be possible to change this so that the dropped object lands on the same space the player is standing? I tested a bit and when there is no available place to drop it at all, that is what happens. Ideally If the forward option is blocked I’d like for this to be the immediate solution, not the last resort.


Anyway, I was wondering if I missed something, or if you could instruct, or help me with these changes, if they are at all possible.

Have a great day!
@GustoSerpe
Hello and thank you for your comments.

This sound more like a commission rather than a simple request. Everythings you ask is possible through modification of the code, but for obvious reasons, I'm not doing a personnal version for someone, just like that.
You can't make heads or tails of the code because it is encrypted. If you're interested in obtaining the editable version, it is something that can be discussed through PM on discord.

Regards,
TSR
@GustoSerpe
Hello and thank you for your comments.

This sound more like a commission rather than a simple request. Everythings you ask is possible through modification of the code, but for obvious reasons, I'm not doing a personnal version for someone, just like that.
You can't make heads or tails of the code because it is encrypted. If you're interested in obtaining the editable version, it is something that can be discussed through PM on discord.

Regards,
TSR
Thanks for the response! I'll be sure contact you on Discord
Hi @TSR !

First off thanks for your work, I have an issue where the player speed gets broken (the player movement get slower) after interacting (pull or push) with and event, seems like it change player speed during interaction but doesn't reset (I'm using custom move speed), and I just saw a comment on your itch page from emogal having the same issue.

Is there any way around it ?
Thanks again
@jackass__ I need to test this as normal works.

in case your speed is higher or lower then than default, the best works around is set the player speed
back on the end of the event, or if it changes, inside a variable and set this back on the end of the event.

this has to be tested, but it's the best way I can come up with at the moment (best call a common event)
so you can set it to all push/pull able object.
Hello @jackass__
The plugin store the normal speed of the player (default 4) so it can be set back after interacting with movable events. You have this issue because you use a different normal speed, but the plugin set it back to 4 after moving an event. I added a parameter to set the normal speed of the player. The new version has been uploaded on my itch, you can download it and see if it does the job.
**Emogal also use a different player speed, that why they had a similar issue. But they bought the unobfuscated version of the plugin so they can make the change themselves along with other stuff they needed to tweaks...


Regards.
TSR
Hello @jackass__
The plugin store the normal speed of the player (default 4) so it can be set back after interacting with movable events. You have this issue because you use a different normal speed, but the plugin set it back to 4 after moving an event. I added a parameter to set the normal speed of the player. The new version has been uploaded on my itch, you can download it and see if it does the job.
**Emogal also use a different player speed, that why they had a similar issue. But they bought the unobfuscated version of the plugin so they can make the change themselves along with other stuff they needed to tweaks...


Regards.
TSR
Thanks a lot for this, I just tried the new version but It doesn't change the issue, after using <MOVABLE EVENT> it break the player speed, but I'm using san analog move and half move plugins so maybe it clash with it.
I store the player move speed in a variable $gamePlayer.setMoveSpeed($gameVariables.value(47)+1);

Original thread: https://forums.rpgmakerweb.com/threads/tsr_moveevent.134254/