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 Profile Posts

Us:
"This game is awesome! I wish there are more games like this in the future."
Also us:
"I hate how games stopped being original and start copying other successful games."
Should've done this a few days ago but...
PRI_200136808.jpg
Rest in Peace, Sir Clive Sinclair
1940 - 2021
Entrepreneur, Technologist, Father of the Modern British Computing Industry, and protagonist of Legend of ZUN.

Without you, England's games and tech industry wouldn't be where it is.
Woof, haven't touched any game-making elements in a couple of weeks I think.
Doing a thing in MV...

R3PuRjF.png

Forum statistics

Threads
115,285
Messages
1,088,629
Members
149,906
Latest member
MechaWitch
Top