Warhorse ScripBind documentation
ContentsIndexHome
PreviousUpNext
RequestAttack
Syntax
C++
int RequestAttack(IFunctionHandler * pH);
Parameters 
Description 
entityId 
AI's entity id which group/leader is determined 
unitProperties 
binary mask of unit properties type for which the attack is requested (in the form of UPR_* + UPR* i.e. UPR_COMBAT_GROUND + UPR_COMBAT_FLIGHT) see IAgent.h for definition of unit properties UPR_* 
attackTypeList 
a lua table which contains the list of preferred attack strategies (Leader action subtypes), sorted by priority (most preferred first) the list must be in the format {LAS_*, LAS_*,..} i.e. (LAS_ATTACK_ROW,LAS_ATTACK_FLANK} means that first an Attack_row action will be tried, then an attack_flank if the first ends/fails. see IAgent.h for definition of LeaderActionSubtype (LAS_*) action types 
duration 
(optional) max duration in sec (default = 0) 

Syntax: AI.RequestAttack( entityId, unitProperties, attackTypeList [,duration] ) 

in a group with leader, the entity requests for a group attack behavior against the enemy The Cleader later will possibly create an attack leader action (CLeaderAction_Attack_*)

Copyright (c) 2012. All rights reserved.