Hello,
To put you in the context, I've been trying Yanfly's Area of Effect plugin but I've told to myself that it would be a good idea if enemies could move on the battlefield. So, I created a skill that does just that.
My problem is if I can indeed change their position ("BattleManager.getSprite(user).setHome(New X position,New Y position);" through Yanfly's Battle Engine Core plugin) I can't actually make them look like they are moving. They are more like teleporting to their new position.
I tried to do it through stop motion but even that fails to work. Here is the code for those interested. The wait is set at 60 frames so I can see for sure if the wait command is working or not. The code is supposed to :
- Set a variable at 100,
- While the variable is above 0,
- Move the sprite of -10 X according to its actual position,
- Lower the value of the variable by 10,
- If the value is inferior or egal to 0,
- Break the loop.
- Else,
- Wait for 60 frames then repeat the "while" command.
What this code is actually doing is teleporting the sprite to the end destination without delays then after moving the sprite, it goes with the wait command.
What I am expecting through this topic is finding a way to actually make the sprite look like they are moving and not teleporting around. Even if it isn't done through stop motion (which would be better).
I precise that I am using a battle system with a frontview perspective. Thus, the Row Formation plugin doesn't move the sprites and action commands such as "move" doesn't work.
Thank you for your time.
To put you in the context, I've been trying Yanfly's Area of Effect plugin but I've told to myself that it would be a good idea if enemies could move on the battlefield. So, I created a skill that does just that.
My problem is if I can indeed change their position ("BattleManager.getSprite(user).setHome(New X position,New Y position);" through Yanfly's Battle Engine Core plugin) I can't actually make them look like they are moving. They are more like teleporting to their new position.
I tried to do it through stop motion but even that fails to work. Here is the code for those interested. The wait is set at 60 frames so I can see for sure if the wait command is working or not. The code is supposed to :
- Set a variable at 100,
- While the variable is above 0,
- Move the sprite of -10 X according to its actual position,
- Lower the value of the variable by 10,
- If the value is inferior or egal to 0,
- Break the loop.
- Else,
- Wait for 60 frames then repeat the "while" command.
Code:
<After Eval>
$gameVariables.setValue(15, 100);
while ($gameVariables.value(15) > 0) {
BattleManager.getSprite(user).setHome(user.homeX()-10,user.homeY());
$gameVariables.setValue(15, $gameVariables.value(15)-10);
if ($gameVariables.value(15) <= 0) {
break;
} else {
BattleManager._actionList.push(['WAIT', '60']);
}
}
</After Eval>
What this code is actually doing is teleporting the sprite to the end destination without delays then after moving the sprite, it goes with the wait command.
What I am expecting through this topic is finding a way to actually make the sprite look like they are moving and not teleporting around. Even if it isn't done through stop motion (which would be better).
I precise that I am using a battle system with a frontview perspective. Thus, the Row Formation plugin doesn't move the sprites and action commands such as "move" doesn't work.
Thank you for your time.