Coopziana

Veteran
Veteran
Joined
Jan 18, 2016
Messages
115
Reaction score
51
First Language
English
Hi,

I'm looking into making my battles a little more tactical, as such I'd like to make enemies "Home Position" Change after each attack to a random location within the battle window. Reason for this is i'm also going to be using AOE spells, so having the enemy move after each attack will really help to mix battles up a bit.

Not really sure where to start with this one. Could anyone help me out?
 

Coopziana

Veteran
Veteran
Joined
Jan 18, 2016
Messages
115
Reaction score
51
First Language
English
Hi,

Since digging around on google it seems a few people have asked this same question. But I'm yet to find a solution, which is a shame.
I'm using Yanfly's Action Sequence so I figured I might be able to use an "Eval" to make this work. I found a guy here talking about it and he used:

<After Eval>
BattleManager.getSprite(user).setHome(user.homeX()-100,user.homeY());
</After Eval>

But after trying that, I just get errors. I'm sure it's on the right tracks, however I have no idea what eval script i'm going to need to make this work.
Looking at the Eval above It's not really what I want anyway, since I want my enemies to perform an attack and then move to a random location within a set area (Left side of the screen but not floating in the sky or below the actor panel at the bottom.), which the one above does not do, it merely shifts the enemy back 100 Pixels. But as I say, it's along the right lines.

Can anyone help me with a working Eval or perhaps a script that will let me accomplish this? I'm pretty sure a lot of people will be glad to find a solution for this!
 

clitvin

Veteran
Veteran
Joined
Oct 26, 2015
Messages
111
Reaction score
16
Primarily Uses
Well the code is easy, the hard part is figuring out the math for getting a random number withing a specific box.
 

Coopziana

Veteran
Veteran
Joined
Jan 18, 2016
Messages
115
Reaction score
51
First Language
English
Well the code is easy, the hard part is figuring out the math for getting a random number withing a specific box.

Well depending on the code I may be able to use math.random to achieve what I want. First and foremost I need the code so I can have something working that I can build upon and play around with.
 

Latest Threads

Latest Posts

Latest Profile Posts

My Overworld might be a mix of inspiration from 2D Final Fantasy games, Breath of Fire, Battlechasers: Nightwar, Super Mario World, and Pillars of Eternity. If I can make it more in-depth than just walking from point A to point B, that might do a lot for the gameplay experience. Hmm...
Terribly depressed. Worst birthday I've had in years, no motivation to work on anything. Still no income. At least I've got my computer running again.
Doing RPG Maker News for 19th September 2021

Stream will be live with some Dark Souls 3, followed by a session of the Interactive Text Adventure! Feel free to drop by!

Forum statistics

Threads
115,198
Messages
1,088,020
Members
149,778
Latest member
kamikun95
Top