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

illuminatigirl.png
Illuminati may be just a cover-up for the actual secret society of Illuminaughty. :kaojoy:
Got distracted... again. So now I'm on project.... 5? 6? I can't even remember off the top of my head how many plugins I have in the works. Though I blame the latest two on a coding youtuber I watch occasionally. He codes in C++ but walks through the process well enough that it inspires me to do similar things for JS plugins. So... blame him for my lack of activity. lol
It's my birthday today! Mom and I went to my favorite Japanese restaurant for lunch and they gave me a Japanese dessert as a birthday surprise. Their salad is SO GOOD. Now we're back home chilling!
Game Theory is great to practice and all... but it is zero substitute for playtesting a game and saying, "Am I having fun?".

Forum statistics

Threads
113,758
Messages
1,077,232
Members
147,790
Latest member
Fercha-AT
Top