- Jan 28, 2021
- Reaction score
- First Language
- Primarily Uses
Good day. I'm trying to figure out how SRPG_AIControl works. The script contains target formulas and move formulas. If everything is clear with the first ones, then I cannot figure out the move formulas.
Tell me with an example, what am I doing wrong?
the formula itself is in the enemy's comment:
<aiMove: a.hpRate ()> 0.5? nearestOpponent: nearestFlag ['heal']>
<aiFlag: heal> - is in the comment of the event.
In theory, as soon as the enemy takes more than 50% of the damage, he should run back to the flag, but he does not run away. What am I doing wrong?
The problem is that Move AI only applies when there are no targetable enemies around. Otherwise it will always attack like in normal mode.
You can try my MoveMethod plugin which allows you to define some modes that will skip enemy searching just like mode absregionup.
Another problem is that your:
<aiMove: a.hpRate ()> 0.5? ....
the > will be recognized as a bracket:
<aiMove: a.hpRate ()>
which doesn't make sense.
Its a problem that comes with rpgmaker. You can either use < to compare or try to write some simple code with my move Method plugin.