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

Package class diagram package 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<UDKBot>
          extended by cz.cuni.amis.pogamut.udk.bot.command.BotCommands
              extended by cz.cuni.amis.pogamut.udk.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.

Author:
Michal 'Knight' Bida

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(UDKBot agent, 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(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 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(UDKBot agent,
              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

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(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


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.