This script allows you to move your enemy’s sprites around in battle using
script calls. It simply slides the image across the screen.
Script: download here
Place this script below Materials and above Main
Make one of the following script calls during battle
position_enemy(enemy_index, x, y) move_enemy(enemy_index, x, y)
The enemy_index is the index of the enemy, where 1 is the first enemy,
2 is the second enemy, and so on.
x, y is the position they will move to.
The first call is an absolute position relative to the top-left corner of
The second call is relative to the sprite’s current position. So if you say
x = 100, then it will shift it to the right 100 pixels.
Do you have a way to make this compatible with Yami’s Engine Symphony? The enemies are repositioned but as soon as they do anything that makes them move, they are brought back to their original position.
There’s not much I can do. You’d basically need to change the way that battle system is done since it assumes all animations will return the enemy to its “original position”
Anyone know of a script that WILL move the position of the enemy, and not just the sprite?
This script changes the position of the enemy as well.
Hi, Hime~ I wanna give a skill the ability to change positions of the enemy. However, how can I get the enemy_index of the certain enemy the skill applies to?
If you have a reference to the target (eg: in a damage formula), b.index will return the target’s index in the unit.
Clearly, that's why I originally asked if I had used the wrong syntax or put the call in the wrong place
Well it's in the correct place and the syntax is correct. It works for me when I copy and paste it into a troop event. Your event probably isn't even running.
removed Yami's and the enemies still aren't being repositioned
Then your script call isn't running.
the only other script im using for battles is Yami's Battle Symphony
That script automatically re-positions the enemy so your changes would be replaced.
Hi I'm having some trouble with your script, most likely I'm just not experienced enough with them, but I can't get the enemy sprite to change their positions. I went into the troop tab and under script put
position_enemy(1, 50, 224)
If this is the improper syntax or place for it please let me know
If you have scripts that automatically position enemies then it doesn't work.
I am wondering just how easy it would be to make it so it randomizes the enemy position. I have only experience in slightly tweaking existing scripts and think that something like
enemy.x = -randmo_x +(random(random_x*2)
Clearly the syntax is incorrect but you get what I mean, is that something that is even possible? I am using Yanfly Area Effect, so sometimes I want the troops to be clustered, other times, not, lol.
The sprite’s position on the screen has nothing to do with the enemy’s position in the troop.