Movement - JohnDoeAntler/LF2-AI-Abstraction GitHub Wiki
A class that includes plenty of movement presets such as tracing, dodging and surrounding specified target.
Movement(Entity@ me);
// examples
Movement@ movement = Movement(Entity(self));
No property available.
reset keys.
void init();
// examples
movement.init();
forcing AI to face to specified target.
void face(Position@ pos);
// examples
movement.face(Position(target));
forcing AI run forward, run to left if facing left, else facing right.
void run();
// examples
movement.run();
forcing AI to stop running if AI is running, does nothing if AI is not running.
void stopRunning();
// examples
movement.stopRunning();
forcing AI to dash if AI is running, does nothing if AI is not running.
void dash();
// examples
movement.dash();
void DfA();
// examples
movement.DfA();
void DfA(Position@ pos);
// examples
movement.DfA(Position(target));
void DfJ();
// examples
movement.DfJ();
void DfJ(Position@ pos);
// examples
movement.DfJ(Position(target));
surrounding to specified target, remaining certain distance at the same time.
void surround(Position@ pos, int x, int z);
void surround(Position@ pos, int x, int z, int runbuffer, int walkbuffer);
// examples
movement.surround(Position(target), 120, 30);
movement.surround(Position(target), 120, 30, 40, 1);
go towards into specified target without any distancing.
void trace(Position@ pos);
// examples
movement.trace(Position(target));
dodge specified target.
void dodge(Position@ pos);
// examples
movement.dodge(Position(target));
void goto(int x, int z);
// examples
movement.goto(bg_width / 2, bg_zwidth1 / 2 + bg_zwidth2 / 2); // goto the center of the map
it is very useful to catch stunned enemy, goto the position of on-ground item.
// definition
void goto(Position@ obj);
// examples
movement.goto(Position(target));
No snippets available.