Enemy Re-position

This script allows you to move your enemy’s sprites around in battle using
script calls. It simply slides the image across the screen.

Download

Script: download here

Installation

Place this script below Materials and above Main

Usage

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 screen.

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.

You may also like...

25 Responses

  1. Joey says:

    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.

    • Hime says:

      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”

  2. Juan says:

    Anyone know of a script that WILL move the position of the enemy, and not just the sprite?

  3. bloodyliao says:

    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?

    • Hime says:

      If you have a reference to the target (eg: in a damage formula), b.index will return the target’s index in the unit.

  4. NB says:

    Clearly, that's why I originally asked if I had used the wrong syntax or put the call in the wrong place

    • Hime says:

      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.

  5. NB says:

    removed Yami's and the enemies still aren't being repositioned

  6. NB says:

    the only other script im using for battles is Yami's Battle Symphony

  7. NB says:

    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

  8. SirCumferance says:

    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.

Leave a Reply

Your email address will not be published. Required fields are marked *