public interface ActionInterface
void unitCommand(Tag unitTag, Ability ability) - batches a unitCommand that will be dispatched when
#sendActions() is called. unitCommand has many overloaded functions, you can call it with most combinations of Unit
types (the Unit object or tag), ability types and targets (a 2d position or tag).
Abilities
,
Unit
,
Point2d
,
sendActions()
Modifier and Type | Method | Description |
---|---|---|
java.util.List<Tag> |
commands() |
Returns a list of unit tags that have sent commands out in the last call to SendActions.
|
boolean |
sendActions() |
This function sends out all batched unit commands.
|
ActionInterface |
sendChat(java.lang.String message,
ActionChat.Channel channel) |
Sends a message to the game chat.
|
ActionInterface |
toggleAutocast(Tag unitTag,
Ability ability) |
Enables or disables autocast of an ability on a unit.
|
ActionInterface |
toggleAutocast(java.util.List<Tag> unitTags,
Ability ability) |
Enables or disables autocast of an ability on a list of units.
|
ActionInterface |
unitCommand(Unit unit,
Ability ability,
boolean queuedCommand) |
Issues a command to a unit.
|
ActionInterface |
unitCommand(Unit unit,
Ability ability,
Point2d point,
boolean queuedCommand) |
Issues a command to a unit.
|
ActionInterface |
unitCommand(Unit unit,
Ability ability,
Unit target,
boolean queuedCommand) |
Issues a command to a unit.
|
ActionInterface |
unitCommand(java.util.List<Unit> units,
Ability ability,
boolean queuedMove) |
Issues a command to multiple units (prefer this where possible).
|
ActionInterface |
unitCommand(java.util.List<Unit> units,
Ability ability,
Point2d point,
boolean queuedCommand) |
Issues a command to multiple units (prefer this where possible).
|
ActionInterface |
unitCommand(java.util.List<Unit> units,
Ability ability,
Unit target,
boolean queuedCommand) |
Issues a command to multiple units (prefer this where possible).
|
ActionInterface unitCommand(Unit unit, Ability ability, boolean queuedCommand)
unit
- The unit to send the command to.ability
- The ability id of the command.ActionInterface unitCommand(Unit unit, Ability ability, Point2d point, boolean queuedCommand)
unit
- The unit to send the command to.ability
- The ability id of the command.point
- The 2D world position to target.ActionInterface unitCommand(Unit unit, Ability ability, Unit target, boolean queuedCommand)
unit
- The unit to send the command to.ability
- The ability id of the command.target
- The unit that is a target of the unit getting the command.ActionInterface unitCommand(java.util.List<Unit> units, Ability ability, boolean queuedMove)
ActionInterface unitCommand(java.util.List<Unit> units, Ability ability, Point2d point, boolean queuedCommand)
ActionInterface unitCommand(java.util.List<Unit> units, Ability ability, Unit target, boolean queuedCommand)
java.util.List<Tag> commands()
ActionInterface toggleAutocast(Tag unitTag, Ability ability)
unitTag
- The unit to toggle the ability on.ability
- The ability to be toggled.ActionInterface toggleAutocast(java.util.List<Tag> unitTags, Ability ability)
unitTags
- The units to toggle the ability on.ability
- The ability to be toggled.ActionInterface sendChat(java.lang.String message, ActionChat.Channel channel)
message
- Text of message to send.channel
- Which players will see the message.boolean sendActions()
Copyright © 2017–2018 Ocraft Project. All rights reserved.