CRaPI - Correct Robust and Perfect API

BasicActions.DashToObject Method (Player, FieldObject, Int32, Command)

public static void DashToObject(
   Player pPlayer,
   FieldObject pObject,
   int pPower,
   out Command pAction
);

Parameters

pPlayer
The player
pObject
The object to dash to
pPower
The power to dash with. Should not exceed MaxPower and MinPower.
pAction
The action command for the dash

Remarks

Dashes to the object if the angle to the object is +/- 10 degress. If the angle exceeds the 10 degree margin, a turn command is created so the angle to the object will be 0 degrees in the next cycle, provided that that neither the player nor the object has changed position.

This method does not send any command to the server, it is therefore up to the agent to execute the command on the server.

See Also

BasicActions Class | TeamYaffa.CRaPI Namespace | BasicActions.DashToObject Overload List | DashToPoint