public class AdvancedShooting extends SimpleShooting
act, worldView
agent, controller, eventBus, log
Constructor and Description |
---|
AdvancedShooting(UT2004Bot agent,
Logger log)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
reset()
Resets the agent module so it may be reused.
|
void |
shoot()
Bot will start shooting his current weapon (Issues GB SHOOT command)
|
void |
shoot(Player target)
Bot will start shooting with his current weapon at the target provided.
|
void |
shoot(UnrealId target)
Bot will start shooting with his current weapon at the target provided.
|
void |
shootPrimary(ILocated location)
Bot will start shooting his current weapon with primary firing mode at
the location specified.
|
void |
shootPrimary(Player target)
Shortcut for 'shootPrimary(player.getId())', see
shootPrimary(UnrealId) . |
void |
shootPrimary(UnrealId target)
Bot will start shooting his current weapon with primary firing mode at
the target specified.
|
void |
shootPrimaryCharged(ILocated location,
double chargeTime)
This method can be used for UT2004 charging weapons.
|
void |
shootPrimaryCharged(Player target,
double chargeTime)
Shortcut for 'shootPrimaryCharged(player.getId())', see
shootPrimaryCharged(UnrealId, double) . |
void |
shootPrimaryCharged(UnrealId target,
double chargeTime)
This method can be used for UT2004 charging weapons.
|
void |
shootSecondary()
Bot will start shooting his current weapon with selected mode.
|
void |
shootSecondary(ILocated location)
Bot will start shooting his current weapon with secondary firing mode at
the location specified.
|
void |
shootSecondary(Player target)
Shortcut for 'shootSecondary(player.getId())', see
shootSecondary(UnrealId) . |
void |
shootSecondary(UnrealId target)
Bot will start shooting his current weapon with secondary firing mode at
the target specified.
|
void |
shootSecondaryCharged(ILocated location,
double chargeTime)
This method can be used for UT2004 charging weapons.
|
void |
shootSecondaryCharged(Player target,
double chargeTime)
Shortcut for 'shootSecondaryCharged(player.getId())', see
shootSecondaryCharged(UnrealId, double) . |
void |
shootSecondaryCharged(UnrealId target,
double chargeTime)
This method can be used for UT2004 charging weapons.
|
void |
shootWithMode(boolean secondaryMode)
Bot will start shooting his current weapon with selected mode.
|
void |
stopShoot()
Deprecated.
|
void |
stopShooting()
The bot will stop shooting completely (regardless on the mode of shooting).
|
shoot
cleanUp, getComponentId, getLog, getState, initComponentId, isRunning, kill, pause, resume, start, stop, toString
public void stopShooting()
(issues GB STOPSHOOT command)
stopShooting
in class SimpleShooting
SimpleShooting.shoot()
,
SimpleShooting.shoot(UnrealId)
public void shootWithMode(boolean secondaryMode)
(issues GB SHOOT command)
secondaryMode
- If true secondary firing mode will be issued.public void shootSecondary()
(issues GB SHOOT command)
secondaryMode
- If true secondary firing mode will be issued.public void shootPrimary(ILocated location)
(issues GB SHOOT command)
location
- Location we will be shooting at.shootPrimary(UnrealId)
public void shootPrimary(UnrealId target)
(issues GB SHOOT command)
target
- Object in the environment we will shoot at.shootPrimary(ILocated)
public void shootPrimary(Player target)
shootPrimary(UnrealId)
.
(issues GB SHOOT command)
target
- Player the bot wants to shoot at.public void shootSecondary(ILocated location)
(issues GB SHOOT command)
location
- Location we will be shooting at.shootSecondary(UnrealId)
public void shootSecondary(UnrealId target)
(issues GB SHOOT command)
target
- Object in the environment we will shoot at.shootSecondary(ILocated)
public void shootSecondary(Player target)
shootSecondary(UnrealId)
.
(issues GB SHOOT command)
target
- Player the bot wants to shoot at.public void shootPrimaryCharged(ILocated location, double chargeTime)
This method can be also used for non-charing (primary) firing mode of the weapon - then it will work as burst fire - the bot will continue firing for the amout of seconds specified.
So if the current weapon primary firing mode is charging, the bot will release the projectiles once. With normal primary firing mode the bot will fire a burst.
Note: We will shoot at location specified. The bot will continue to aim on the location in the environment (for the time of charging or bursting) as long as other commands won't change his focus (strafe(), turnTo()..). If they will the bot will still shoot on location until he will turn from it more then approx 15 - 30 degrees. Then he won't be able to hit the location anymore.
(issues GB SHOOT command)
location
- Location we will be shooting at.chargeTime
- In seconds - how long we will charge the weapon (or how long
will be the burst fire).shootPrimaryCharged(UnrealId, double)
public void shootPrimaryCharged(UnrealId target, double chargeTime)
This method can be also used for non-charing (primary) firing mode of the weapon - then it will work as burst fire - the bot will continue firing for the amout of seconds specified.
So if the current weapon primary firing mode is charging, the bot will release the projectiles once. With normal primary firing mode the bot will fire a burst.
Note: The target for shooting should exist in the environment. The bot will track the target in the environment (for the time of charging or bursting) as long as other commands won't change his focus (strafe(), turnTo()..). If they will the bot will still shoot on target location until he will turn from target more then approx 15 - 30 degrees. Then he won't be able to hit the target location anymore.
(issues GB SHOOT command)
target
- Object in the environment we will shoot at (basic tracking
provided).chargeTime
- In seconds - how long we will charge the weapon (or how long
will be the burst fire).shootPrimaryCharged(ILocated, double)
public void shootPrimaryCharged(Player target, double chargeTime)
shootPrimaryCharged(UnrealId, double)
.
(issues GB SHOOT command)
target
- Player the bot wants to shoot at.public void shootSecondaryCharged(ILocated location, double chargeTime)
This method can be also used for non-charing (secondary) firing mode of the weapon - then it will work as burst fire - the bot will continue firing for the amout of seconds specified.
So if the current weapon secondary firing mode is charging, the bot will release the projectiles once. With normal secondary firing mode the bot will fire a burst.
Note: We will shoot at location specified. The bot will continue to aim on the location in the environment (for the time of charging or bursting) as long as other commands won't change his focus (strafe(), turnTo()..). If they will the bot will still shoot on location until he will turn from it more then approx 15 - 30 degrees. Then he won't be able to hit the location anymore.
(issues GB SHOOT command)
location
- Location we will be shooting at.chargeTime
- In seconds - how long we will charge the weapon (or how long
will be the burst fire).shootSecondaryCharged(UnrealId, double)
public void shootSecondaryCharged(UnrealId target, double chargeTime)
This method can be also used for non-charing (secondary) firing mode of the weapon - then it will work as burst fire - the bot will continue firing for the amout of seconds specified.
So if the current weapon secondary firing mode is charging, the bot will release the projectiles once. With normal secondary firing mode the bot will fire a burst.
Note: The target for shooting should exist in the environment. The bot will track the target in the environment (for the time of charging or bursting) as long as other commands won't change his focus (strafe(), turnTo()..). If they will the bot will still shoot on target location until he will turn from target more then approx 15 - 30 degrees. Then he won't be able to hit the target location anymore.
(issues GB SHOOT command)
target
- Object in the environment we will shoot at (basic tracking
provided).chargeTime
- In seconds - how long we will charge the weapon (or how long
will be the burst fire).shootSecondaryCharged(ILocated, double)
public void shootSecondaryCharged(Player target, double chargeTime)
shootSecondaryCharged(UnrealId, double)
.
(issues GB SHOOT command)
target
- Player the bot wants to shoot at.protected void reset()
reset
in class AgentModule<UT2004Bot>
public void shoot()
SimpleShooting
shoot
in class SimpleShooting
SimpleShooting.stopShoot()
,
SimpleShooting.shoot(UnrealId)
,
SimpleShooting.shoot(ILocated)
public void shoot(UnrealId target)
SimpleShooting
shoot
in class SimpleShooting
target
- Target (that should be ILocated) the bot will shoot at. Bot
will track the target, but see note above.SimpleShooting.stopShoot()
,
SimpleShooting.shoot()
public void shoot(Player target)
SimpleShooting
shoot
in class SimpleShooting
target
- Player the bot wants to shoot at.SimpleShooting.stopShoot()
,
SimpleShooting.shoot()
@Deprecated public void stopShoot()
SimpleShooting
SimpleShooting.stopShooting()
instead!stopShoot
in class SimpleShooting
SimpleShooting.shoot()
,
SimpleShooting.shoot(UnrealId)
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.