Status
Not open for further replies.

Nspace

Warper
Member
Joined
Oct 19, 2021
Messages
4
Reaction score
3
First Language
Korean
Primarily Uses
RMMV
I used a translator because I was not fluent in English. I'm so sorry.
---------------------------------------------------------------------------------------------------------

I am a Pixel Movement Plugin and Cross engine user.
My goal is Top Down 2D Action Adventure Game.

-----------------------------------------------------------------

I'm using the Script Command to create an event where Player Characters are forcibly pushed out.

Code:
$gamePlayer.locate($gamePlayer.x,$gamePlayer.y + 0.05);

This is the code. Push the player out with the parallel event.
This was possible with the function of returning coordinates below decimal points made possible by Plugins.

So far, it's working well. Almost.

The problem is that Player Character's Walk Animation does not work when Event is active.
No bugs were found in Console Log.


It seems that the Script Command is resetting Player's Sprite Animation.

I think there might be a way to solve this problem somewhere in Default js,
but I'm a beginner in Java Script, so I don't know what to do. Please help me.



----------------------------------------------------------------------------------------------------------



I don't think this is an error involving Plugin, but I'll attach a plugin link.
Yanfly Core Plugin to get rid of minor bugs

Altimit Pixel Movement 0.50 beta

Chrono engine
Unfortunately, Chrono Engine's Original Post has disappeared.
It seems that MOG is rebuilding blogs.
I attached an alternative link, but it includes multiple plugins.

This is an archive link.

Cross engine


I also attached a demo, so please refer to it if necessary.

The default js Script version of the demo is 1.5.0.
It is running on editor version 1.6.1.


Thank you for any advice.
 

Attachments

  • forced pulling test.zip
    1.7 MB · Views: 0

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,341
Reaction score
8,765
First Language
German
Primarily Uses
RMMV
It seems that the Script Command is resetting Player's Sprite Animation.
yes
any regular move command has to start with the first step, and changing that would be much more complex.

have you tried adding waits to the parallel process? Those will not only reduce lag, they also allow for the character to continue or complete the move animation.
 

Nspace

Warper
Member
Joined
Oct 19, 2021
Messages
4
Reaction score
3
First Language
Korean
Primarily Uses
RMMV
yes
any regular move command has to start with the first step, and changing that would be much more complex.

have you tried adding waits to the parallel process? Those will not only reduce lag, they also allow for the character to continue or complete the move animation.
Thank you for your answer.
It took time to smooth out grammar and words.

As a result of the test,
Walk animation began to play from 10 frames.
Walk Animation worked normally when wait 40 frames.
As you said, the load has also decreased.

However, it took too long to be pushed out.
I added coordinate values in the code, but it became like a teleport.

I've experimented with tricks that put events on top of players, but it doesn't seem easy to play motions other than walking.
(In the final version, it swings a sword and jumps)
Now I'm looking inside for modify the core script, but I haven't achieved any significant results yet.

Is there any other alternative functions or tricks?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,341
Reaction score
8,765
First Language
German
Primarily Uses
RMMV
Is there any other alternative functions or tricks?
go a completely different route:

activate the stepping animation on the player with a tergeted set moveroute command. That will make it look as if the player is walking in place.
then simply block the movement by passability.

the tricky part of that solution is to disable the stepping animation in time when the player stops trying to walk or walks in a different direction. If you disable stepping too late it will look as if he is walking in other places when trying to stand.

EDIT:
one solution might be to take the control away from the player for a short while.
trigger the barrier event on player touch
give the player stepping animation
wait 60 frames
remove stepping animation from player

that will take away the control from the player for that 60 frames and it will look to the player as if the actor tried to go there for a second before giving movement control back to the player.
 
Last edited:

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
2,979
Reaction score
2,303
First Language
EN
Primarily Uses
RMMZ
Two ideas:
  1. Use setPosition instead of locate, e.g.
    JavaScript:
    $gamePlayer.setPosition($gamePlayer.x, $gamePlayer.y + 0.05);
    locate is basically setPosition plus some refreshes (stepping frame + bush depth).

  2. Or you could try something like this:
    JavaScript:
    $gamePlayer._y += 0.05;
    It needs to be _y because the y property is read-only.
 

Nspace

Warper
Member
Joined
Oct 19, 2021
Messages
4
Reaction score
3
First Language
Korean
Primarily Uses
RMMV
Thank you for answers guys.

EDIT:
one solution might be to take the control away from the player for a short while.
trigger the barrier event on player touch
give the player stepping animation
wait 60 frames
remove stepping animation from player

that will take away the control from the player for that 60 frames and it will look to the player as if the actor tried to go there for a second before giving movement control back to the player.
Depending on the adjustment, it will be a good alternative.
It's sad to move away from real-time, but I think it's a better way compared to giving up Feature.

Thank you for your advice.


Now I'm looking at Plugin Scripts as a last resort and looking for Functions.

Two ideas:
  1. Use setPosition instead of locate, e.g.
    JavaScript:
    $gamePlayer.setPosition($gamePlayer.x, $gamePlayer.y + 0.05);
    locate is basically setPosition plus some refreshes (stepping frame + bush depth).
I just found the same function from chrono engine.js.
I'll test it and come back again.
 

Nspace

Warper
Member
Joined
Oct 19, 2021
Messages
4
Reaction score
3
First Language
Korean
Primarily Uses
RMMV
Yes!

'setPosition' is right!

Now Walk Animation works perfectly with features!

Thank you for help, caethyril, Andar!


Your answers made me not to give up on this issue.

Thank you so much Again!
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,180
Reaction score
15,543
First Language
English
Primarily Uses
RMMV

@Nspace, please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.



This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.



(You can just report your post and let us know you have a solution - then we will close the thread for you)
 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

My new 49" monitor has been dispatched from the warehouse. Will it arrive tomorrow? The day after? I love that we can track packages now, even if it does only tell me when it's left that end and when it's arrived at the local centre. As long as it doesn't end up in Melbourne again, which has happened before ...
My friend's doing a surprise stream of my game Origin Hunt on Twitch here ! Feel free to stop by :yhappy:
Me, designing it a long time ago: Having an optional boss fight as a random chance to trigger when you fish in a certain spot with a certain type of bait is fun! Cool idea!
Me, trying to playtest everything again: oh god just let me see the boss, my bag is so full of fish!
both love and pain have no boundaries

Forum statistics

Threads
117,222
Messages
1,105,622
Members
153,369
Latest member
Marvomix
Top