cz.cuni.amis.pogamut.ut2004.bot.command
Class Action

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT>
      extended by cz.cuni.amis.pogamut.base.agent.module.SensomotoricModule<UT2004Bot>
          extended by cz.cuni.amis.pogamut.ut2004.bot.command.BotCommands
              extended by cz.cuni.amis.pogamut.ut2004.bot.command.Action
All Implemented Interfaces:
IComponent

public class Action
extends BotCommands

Class providing Pogamut2 UT2004 bot action commands - throwing weapon, issuing combos, item interactions and other commands that didn't fit in other categories.


Field Summary
 
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.SensomotoricModule
act, worldView
 
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule
agent, controller, eventBus, log
 
Constructor Summary
Action(UT2004Bot agent, java.util.logging.Logger log)
          Constructor.
 
Method Summary
 void pick(UnrealId id)
          If the items are set to be picked up manualy, this command can be used to pick up the items.
 void playAnimation(java.lang.String animName)
          This command can be used to play some available bot animation.
 void respawn()
          This function will kill the bot and force him to respawn.
 void respawn(ILocated location)
          This function will kill the bot and force him to respawn.
 void respawn(ILocated location, Rotation rotation)
          This function will kill the bot and force him to respawn.
 void startCombo(java.lang.String desiredCombo)
          Causes bot to perform desired adrenaline combo (only if it has enough adrenaline usually >= 100).
 void throwWeapon()
          Throws out bots current weapon (just if he is allowed to throw this kind of weapon out - some weapons cannot be thrown e.g.
 
Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule
cleanUp, getComponentId, getLog, getState, initComponentId, isRunning, kill, pause, reset, resume, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Action

public Action(UT2004Bot agent,
              java.util.logging.Logger log)
Constructor. Setups the command module based on given agent and logger.

Parameters:
agent - AbstractUT2004Bot we will send commands for
log - Logger to be used for logging runtime/debug info.
Method Detail

startCombo

public void startCombo(java.lang.String desiredCombo)
Causes bot to perform desired adrenaline combo (only if it has enough adrenaline usually >= 100). Combo cannot be turned off when triggered. Combo will consume bot adrenaline slowly, when it reaches 0 combo stops. Combo can modify bots abilities or appearance. Combos can be xGame.ComboBerserk (bigger damage), xGame.ComboDefensive (every few seconds adds health), xGame.ComboInvis (bot is invisible and is very hard to spot) or xGame.ComboSpeed (bots speed is increased). (issues GB COMBO command)

Parameters:
desiredCombo - Holds the class name of the desired adrenaline combo (can be xGame.ComboBerserk, xGame.ComboDefensive, xGame.ComboInvis or xGame.ComboSpeed).

throwWeapon

public void throwWeapon()
Throws out bots current weapon (just if he is allowed to throw this kind of weapon out - some weapons cannot be thrown e.g. ShieldGun) and will change to best weapon available. (issues GB THROW command)


respawn

public void respawn()
This function will kill the bot and force him to respawn. He will respawn on some randomly chosen starting point in the map. (issues GB RESPAWN command)

See Also:
respawn(ILocated), respawn(ILocated,Rotation)

respawn

public void respawn(ILocated location)
This function will kill the bot and force him to respawn. He will respawn at the location supplied (if he is allowed to respawn there). Be carefull when supporting some object in the game that is ILocated, may kill other player if respawned at his positions. (issues GB RESPAWN command)

Parameters:
location - Bot will be respawned at this location (if he can). Be carefull may kill players this way. Usefull when wanted to specify NavPoint you want the bot to have respawned at.
See Also:
respawn(), respawn(ILocated,Rotation)

respawn

public void respawn(ILocated location,
                    Rotation rotation)
This function will kill the bot and force him to respawn. He will respawn at the location specified (if he is allowed to respawn there). Be carefull when supporting some object in the game that is ILocated, may kill other player if respawned at his positions. He will be respawned with supplied rotation set. (issues GB RESPAWN command)

Parameters:
location - Location where the bot will be respawned.
rotation - Initial rotation of the bot.
See Also:
respawn(), respawn(ILocated)

pick

public void pick(UnrealId id)
If the items are set to be picked up manualy, this command can be used to pick up the items. Note that the bot must be touching the item, when this command is issued to picked it up. To disable auto pickup (so the bots will pick items manually by this command) set in GameBots ini file found in UT_HOME/System directory variable bDisableAutoPickup to true (the variable should be in .RemoteBot section).

Parameters:
id - UnrealId of the item we want to pick up.

playAnimation

public void playAnimation(java.lang.String animName)
This command can be used to play some available bot animation. To see which animations are available, go to UnrealEd Actor Class browser, select Animations tab and open the .ukx file containing the animations of the model of the bot you are using in UT. Note that movement animations will always override animations issued by this command. The bot must stand still for the issued animation to finish.

Parameters:
animName - name of the animation we want to run