How do I make an event run in sync with the player?

TidusMK

Villager
Member
Joined
Mar 13, 2021
Messages
8
Reaction score
5
First Language
german
Primarily Uses
Other
Hello,
my event is a shadow and should run synchronously under my player. Unfortunately it runs only delayed. I did not put the shadow in the player sprite because it will have other properties.

RedditSchatten.png

The event runs with "toward player" behind the player. However, this causes the event to run delayed.

I think I should run the event with the same command that runs the player. The player follower does not run delayed either. Is there any way to do this? That the event reacts on the same command as the player?

I hope someone can help me. This is a very important function for my game.

Greetings
Matthias
 

SGHarlekin

Orc Jester
Veteran
Joined
Jun 29, 2020
Messages
957
Reaction score
1,076
First Language
German
Primarily Uses
RMMV
Probably easier to make an extra spritesheet for that. Slap your shadow onto the character, and change the player image, done.
 

ct_bolt

Creator
Veteran
Joined
May 3, 2012
Messages
1,367
Reaction score
970
First Language
Javascript
Primarily Uses
RMMZ
Probably easier to make an extra spritesheet for that. Slap your shadow onto the character, and change the player image, done.
I did not put the shadow in the player sprite because it will have other properties.
@SGHarlekin Good solution but OP said they have a reason they chose not to do that.

(I suspect the shadow is likely to interact with the player perhaps, if so that sounds pretty cool of an idea)

... ... ...
The event runs with "toward player" behind the player. However, this causes the event to run delayed.

I think I should run the event with the same command that runs the player. The player follower does not run delayed either. Is there any way to do this? That the event reacts on the same command as the player?
Yep no prob.
I have a couple great ways to do this.. I'll post asap when I get to my PC in a couple hours.

Also curious, is your event movespeed/frequency set to the highest?
...if not, that might even already solve your issue.
 

TidusMK

Villager
Member
Joined
Mar 13, 2021
Messages
8
Reaction score
5
First Language
german
Primarily Uses
Other
Hello, thank you for your answers. ct_bolt has already recognized well that I can't include the shadow in the spritesheet.

Also curious, is your event movespeed/frequency set to the highest?
...if not, that might even already solve your issue.
I have already tried that, it makes it worse. The shadow reacts too late and then accelerates too fast.

Yep no prob.
I have a couple great ways to do this.. I'll post asap when I get to my PC in a couple hours.

If you can help me solve the problem, you are my hero!

And yes i use RPG Maker MZ
 

ct_bolt

Creator
Veteran
Joined
May 3, 2012
Messages
1,367
Reaction score
970
First Language
Javascript
Primarily Uses
RMMZ
Hello, thank you for your answers. ct_bolt has already recognized well that I can't include the shadow in the spritesheet.


I have already tried that, it makes it worse. The shadow reacts too late and then accelerates too fast.



If you can help me solve the problem, you are my hero!

And yes i use RPG Maker MZ
No prob :)

Try this out... not sure what exactly you need though.. so I might have to make it different to suit your specific needs... but I made a plugin that "binds" any event to any character (players, events, etc.)


Works best with my core plugin:

Place core plugin above all my other plugins :)
1677108637130.png

Well see how that works for ya :)
Let me know how it goes :cutesmile:
Edit:
Also just made it work with X/Y offsets something like this:
1677110982452.pngOffsets are in terms of the tile size so .25 is 25% of the tile size. 1 is a whole tile size

Edit:
idk.. wasn't quite working the way I wanted it to
...changed version to be 0.70 & now this is an "in development stage" plugin
working a bit differently now then my original posted plugin, but functions well still

Edit (again):
lol okay updated now to back up to a version 0.80 & am pretty happy with the results.

...let me know how it goes :)
... also now there is actually a lot more functionality to this plugin then I've described
but I will wait for your reply back before I go further into details on that
 
Last edited:

TidusMK

Villager
Member
Joined
Mar 13, 2021
Messages
8
Reaction score
5
First Language
german
Primarily Uses
Other
Thanks for your effort. Tried the plug in, the shadow no longer runs delayed. Very cool! Only one thing is there, the shadow flashes when it moves. Probably because it always refreshes itself. Is there any way to solve this problem?
 

ct_bolt

Creator
Veteran
Joined
May 3, 2012
Messages
1,367
Reaction score
970
First Language
Javascript
Primarily Uses
RMMZ
Thanks for your effort. Tried the plug in, the shadow no longer runs delayed. Very cool! Only one thing is there, the shadow flashes when it moves. Probably because it always refreshes itself. Is there any way to solve this problem?
That's good to hear

Flashes when it moves?
& no it doesn't refresh itself.. I do have it animate as the player is "walking", so if you have blank spaces in your sprite sheet that would be what causes the flashing.. but I can also make it not do that

...can I see an example of the sprite sheet image you're using?
And your no longer using any move route stuff correct? (Since this plugin replaces the need to do any of that)

If you can, can I see your sprite sheet image & screenshot of the event?
 

TidusMK

Villager
Member
Joined
Mar 13, 2021
Messages
8
Reaction score
5
First Language
german
Primarily Uses
Other
I made a short video of what it looks like. Next to it runs another shadow event and this one works smoothly.



And my sprite sheet is here

SpriteSheet.png

My character has a speed of 4.6, if I slow him down, the problem is less.

I hope this information helps you
 

TidusMK

Villager
Member
Joined
Mar 13, 2021
Messages
8
Reaction score
5
First Language
german
Primarily Uses
Other
And here is the Event. The event is set to speed 4.6 by another EVent so that it is as fast as the player.
Event.png
 

ct_bolt

Creator
Veteran
Joined
May 3, 2012
Messages
1,367
Reaction score
970
First Language
Javascript
Primarily Uses
RMMZ
Ahhh I see I never tested on a scrolling map.
Changed it up a little, I believe it should work as needed now now :)

Test it out, let me know how it goes.

Sidenote:
Also I did notice the sprite you gave me has a slight graphic issue with the left/right/down frames:
1677184776911.png

Edit:
Well no more flickering so that's good

...but sadly after more testing it's still not quite perfect...
..seems to not quite line up 100% if the player is "running"
Well test it out see how it goes, but I'm gonna play with this more to get it more 100% perfect
..it's so close but, looking into it further I may need to rewrite the whole thing with a different approach

Edit:
Sucess I think it's 100% perfect now (lol I hope)

I did remove the bindPageTo script call & now it is just bindTo instead
like this:
JavaScript:
this.bindTo($gamePlayer)

Example:
Page_Code: <this.bindTo($gamePlayer)/>

Now instead there is an unbind code:
JavaScript:
this.unbind()

Comment Tag would then be like this
Page_Code: <this.unbind()/>

Edit:
Dang... everything works great but now somehow this broke touch movement
...so if you don't use touch movement, that's great but if you do I'm working on a fix for that now
 
Last edited:

TidusMK

Villager
Member
Joined
Mar 13, 2021
Messages
8
Reaction score
5
First Language
german
Primarily Uses
Other
Oh my god yes, it works! Thank you so much! So it is perfect for me! :--)
 

fizzly

Veteran
Veteran
Joined
Mar 23, 2012
Messages
1,465
Reaction score
1,046
First Language
Polish
Primarily Uses
RMMZ
Oh wow, @ct_bolt, it's super useful plugin! Can I also use this? What about TaC of this? Thank you!
 

TidusMK

Villager
Member
Joined
Mar 13, 2021
Messages
8
Reaction score
5
First Language
german
Primarily Uses
Other
@fizzly
I think if you follow his terms of use, it should be fine. ^^

@ct_bolt
Hey, one last thing. I want to move the shadow down a bit because I want the shadow to be bigger. I tried it and it didn't work. The shadow has disappeared. I send here a screenshot how I did it.

Would be very happy if you could answer me again.

Code.png
 

BK-tdm

Waifumancer
Veteran
Joined
Jun 21, 2018
Messages
517
Reaction score
1,581
First Language
English
Primarily Uses
RMMV
Quick question as the plugin itself looks like an interesting solution:
@ct_bolt Can this be used to bind an event so it acts lile a follower?
 

TidusMK

Villager
Member
Joined
Mar 13, 2021
Messages
8
Reaction score
5
First Language
german
Primarily Uses
Other

@BK-tdm

Yes, it can. I have solved the problem myself. You have to write the code like this: Page_Code: <this.bindTo($gamePlayer,.0,.480)/>

Then the event will be moved to the bottom. If you want to have a follower, you have to change the numbers.
 

EonRDK

Veteran
Veteran
Joined
Mar 10, 2022
Messages
50
Reaction score
13
First Language
English
Primarily Uses
RMMZ
Hello, I tried binding it into an event but it does not work. 1679179817559.png
 

Latest Threads

Latest Profile Posts

gCcZIwO.gif

Expressions! Curse GIFs color limitation.
Collecting Stream thumbnails, don't mind me. :kaopride:



now you can smash up cars on the street lol...
finally got the right prompt for stable diffusion
1679983618086.png
Never say something is impossible.
There's always an idiot who doesn't know it's impossible and they'll do it.

Forum statistics

Threads
129,897
Messages
1,206,093
Members
171,083
Latest member
Maxell
Top