cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands
Class Move

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.CommandMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.Move

public class Move
extends CommandMessage

Representation of the GameBots2004 command MOVE. The bot will start moving towards FirstLocation. After reaching it will continue to SecondLocation (no delay). If no SecondLocation specified, the movement will end at FirstLocation point. You can specify some location or object you will be facing during the movement (if none specified, the bot will start looking towards its destination point). Object is specified by UnrealId. Player Ids will work, all NavPoints Ids and Movers. Respawned items should work too, but not all of the items have unique Id, thus item Ids are not recommended.


Field Summary
protected  Location FirstLocation
          The bot will start moving to this location first.
protected  Location FocusLocation
          Here you can specify location you want to face during movement.
protected  UnrealId FocusTarget
          Here you can specify UnrealId of the object you want to face during movement (typically enemy player you want to shoot at).
static java.lang.String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  Location SecondLocation
          After reaching FirstLocation, the bot will start moving to location specified here.
 
Constructor Summary
Move()
          Creates new instance of command Move.
Move(Location FirstLocation, Location SecondLocation, UnrealId FocusTarget, Location FocusLocation)
          Creates new instance of command Move.
Move(Move original)
          Cloning constructor.
 
Method Summary
 Location getFirstLocation()
          The bot will start moving to this location first.
 Location getFocusLocation()
          Here you can specify location you want to face during movement.
 UnrealId getFocusTarget()
          Here you can specify UnrealId of the object you want to face during movement (typically enemy player you want to shoot at).
 Location getSecondLocation()
          After reaching FirstLocation, the bot will start moving to location specified here.
 Move setFirstLocation(Location FirstLocation)
          The bot will start moving to this location first.
 Move setFocusLocation(Location FocusLocation)
          Here you can specify location you want to face during movement.
 Move setFocusTarget(UnrealId FocusTarget)
          Here you can specify UnrealId of the object you want to face during movement (typically enemy player you want to shoot at).
 Move setSecondLocation(Location SecondLocation)
          After reaching FirstLocation, the bot will start moving to location specified here.
 java.lang.String toHtmlString()
           
 java.lang.String toMessage()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROTOTYPE

public static final java.lang.String PROTOTYPE
Example how the message looks like - used during parser tests.

See Also:
Constant Field Values

FirstLocation

protected Location FirstLocation
The bot will start moving to this location first. If not specified, the bot won't move (even if SecondLocation is specified).


SecondLocation

protected Location SecondLocation
After reaching FirstLocation, the bot will start moving to location specified here. If not specified the movement will quit at FirstLocation point.


FocusTarget

protected UnrealId FocusTarget
Here you can specify UnrealId of the object you want to face during movement (typically enemy player you want to shoot at). Player Ids will work, all NavPoints Ids, Movers and some of the items (with unique Id). This attribute is parsed before FocusLocation attribute and if set FocusLocation attribute will be ignored.


FocusLocation

protected Location FocusLocation
Here you can specify location you want to face during movement. This attribute is parsed after FocusTarget attribute and will be ignored if FocusTarget is set.

Constructor Detail

Move

public Move(Location FirstLocation,
            Location SecondLocation,
            UnrealId FocusTarget,
            Location FocusLocation)
Creates new instance of command Move. The bot will start moving towards FirstLocation. After reaching it will continue to SecondLocation (no delay). If no SecondLocation specified, the movement will end at FirstLocation point. You can specify some location or object you will be facing during the movement (if none specified, the bot will start looking towards its destination point). Object is specified by UnrealId. Player Ids will work, all NavPoints Ids and Movers. Respawned items should work too, but not all of the items have unique Id, thus item Ids are not recommended. Corresponding GameBots message for this command is MOVE.

Parameters:
FirstLocation - The bot will start moving to this location first. If not specified, the bot won't move (even if SecondLocation is specified).
SecondLocation - After reaching FirstLocation, the bot will start moving to location specified here. If not specified the movement will quit at FirstLocation point.
FocusTarget - Here you can specify UnrealId of the object you want to face during movement (typically enemy player you want to shoot at). Player Ids will work, all NavPoints Ids, Movers and some of the items (with unique Id). This attribute is parsed before FocusLocation attribute and if set FocusLocation attribute will be ignored.
FocusLocation - Here you can specify location you want to face during movement. This attribute is parsed after FocusTarget attribute and will be ignored if FocusTarget is set.

Move

public Move()
Creates new instance of command Move. The bot will start moving towards FirstLocation. After reaching it will continue to SecondLocation (no delay). If no SecondLocation specified, the movement will end at FirstLocation point. You can specify some location or object you will be facing during the movement (if none specified, the bot will start looking towards its destination point). Object is specified by UnrealId. Player Ids will work, all NavPoints Ids and Movers. Respawned items should work too, but not all of the items have unique Id, thus item Ids are not recommended. Corresponding GameBots message for this command is MOVE.

WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!


Move

public Move(Move original)
Cloning constructor.

Parameters:
original -
Method Detail

getFirstLocation

public Location getFirstLocation()
The bot will start moving to this location first. If not specified, the bot won't move (even if SecondLocation is specified).


setFirstLocation

public Move setFirstLocation(Location FirstLocation)
The bot will start moving to this location first. If not specified, the bot won't move (even if SecondLocation is specified).


getSecondLocation

public Location getSecondLocation()
After reaching FirstLocation, the bot will start moving to location specified here. If not specified the movement will quit at FirstLocation point.


setSecondLocation

public Move setSecondLocation(Location SecondLocation)
After reaching FirstLocation, the bot will start moving to location specified here. If not specified the movement will quit at FirstLocation point.


getFocusTarget

public UnrealId getFocusTarget()
Here you can specify UnrealId of the object you want to face during movement (typically enemy player you want to shoot at). Player Ids will work, all NavPoints Ids, Movers and some of the items (with unique Id). This attribute is parsed before FocusLocation attribute and if set FocusLocation attribute will be ignored.


setFocusTarget

public Move setFocusTarget(UnrealId FocusTarget)
Here you can specify UnrealId of the object you want to face during movement (typically enemy player you want to shoot at). Player Ids will work, all NavPoints Ids, Movers and some of the items (with unique Id). This attribute is parsed before FocusLocation attribute and if set FocusLocation attribute will be ignored.


getFocusLocation

public Location getFocusLocation()
Here you can specify location you want to face during movement. This attribute is parsed after FocusTarget attribute and will be ignored if FocusTarget is set.


setFocusLocation

public Move setFocusLocation(Location FocusLocation)
Here you can specify location you want to face during movement. This attribute is parsed after FocusTarget attribute and will be ignored if FocusTarget is set.


toString

public java.lang.String toString()
Overrides:
toString in class CommandMessage

toHtmlString

public java.lang.String toHtmlString()

toMessage

public java.lang.String toMessage()