scardoc;Squad

scardoc;Squad
Functions

 separated( or not, SGroupID smallvector<SGroup, SGroupID sgroup, Boolean spawnedOnly, Real idealSquadRadius )
 

尝试对小队进行分组,返回彼此之间至少相隔理想小队范围的分组。【功能:小队分组】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2167) 

 SGroup_CalculateClusterSeparation( SGroupID sgroup, Boolean spawnedOnly, Integer numClusters )
 

尝试将给定的小队列表分组为集群,并返回这些集群之间的平均距离。如果发生任何错误则返回-1。【功能:计算集群间距】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2079) 

 SGroup_FacePosition( SGroupID sgroup, Position pos )
 

类似于Squad_FacePosition。所有小队将面向同一方向,由最靠近中心的小队决定方向。【功能:小队组朝向位置】

This function works on spawned squads only.

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1990) 

 SGroup_SnapFacePosition( SGroupID sgroup, Position pos )
 

类似于SGroup_FacePosition,但没有插值。所有小队将面向同一方向,由最靠近中心的小队决定方向。【功能:小队组瞬间朝向位置】

This function works on spawned squads only.

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2027) 

 Squad_AddAbility( SquadID squad, ScarAbilityPBG ability )
 

允许小队使用此技能。【功能:添加技能】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2593) 

 Squad_AddAllResources( SquadID squad, Real amount )
 

将指定数量的所有类型资源添加到指定小队,具体添加到SquadResourceExt。【功能:添加所有资源】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2793) 

 Squad_AddSlotItemToDropOnDeath( SquadID squad, ScarSlotItemPBG pbg, Real dropChance, Boolean exclusive )
 

添加到小队被消灭时掉落的槽位物品列表。【功能:添加死亡掉落物品】

Drop chance is percentage chance the item will drop (0.0-1.0) exlusive means the squad would only drop this item, thus erasing all previous items in list example: local item = Util_GetSlotItemID( "slot_item/allies_m9bazooka.lua" ) Squad_AddSlotItemToDropOnDeath( squadid, item, false )

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1640) 

 Squad_AdjustAbilityCooldown( SquadID squad, Integer tickAmount )
 

推进技能冷却时间。【功能:调整技能冷却】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2624) 

 Squad_CanAttackEntity( SquadID attacker, EntityID target, Boolean checkFOW, Boolean checkVis )
 

检查小队是否可以攻击目标。【功能:检查攻击能力】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (401) 

 Squad_CanCaptureStrategicPoint( SquadID squad, EntityID entity )
 

如果小队可以占领战略点则返回true。【功能:检查占领战略点能力】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1525) 

 Squad_CanCaptureTeamWeapon( SquadID pSquad, EntityID pEntity )
 

如果小队可以夺取实体同步武器则返回true。【功能:检查夺取班组武器能力】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1537) 

 Squad_CanCastAbilityOnEGroup( SquadID caster, Integer ability, EGroupID target_egroup )
 

测试小队是否可以被命令对目标EGroup的任何成员使用此技能。【功能:检查对实体组施放技能】

  Source: [E:\P4Share\engine\assets\engine\scar\squad.scar] (237) 

 Squad_CanCastAbilityOnEntity( SquadID castingSquad, ScarAbilityPBG abilityPBG, EntityID targetEntity )
 

测试小队是否可以被命令对目标实体使用此技能。【功能:检查对实体施放技能】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1787) 

 Squad_CanCastAbilityOnPosition( SquadID castingSquad, ScarAbilityPBG abilityPBG, Position targetPos )
 

测试小队是否可以被命令在目标位置使用此技能。【功能:检查对位置施放技能】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1827) 

 Squad_CanCastAbilityOnSGroup( SquadID caster, Integer ability, SGroupID target_sgroup )
 

测试小队是否可以被命令对目标SGroup的任何成员使用此技能。【功能:检查对小队组施放技能】

  Source: [E:\P4Share\engine\assets\engine\scar\squad.scar] (228) 

 Squad_CanCastAbilityOnSquad( SquadID castingSquad, ScarAbilityPBG abilityPBG, SquadID targetSquad )
 

测试小队是否可以被命令对目标小队使用此技能。【功能:检查对小队施放技能】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1807) 

 Squad_CancelProductionQueueItem( SquadID squad, Integer index )
 

取消生产队列中的项目。索引0是当前正在生产的项目。【功能:取消生产队列项目】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2544) 

 Squad_CanHold( SquadID squad )
 

检查小队是否可以容纳任何小队。【功能:检查驻扎能力】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1713) 

 Squad_CanInstantReinforceNow( SquadID squad )
 

如果小队可以立即增援则返回true。【功能:检查即时增援能力】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1014) 

 Squad_CanLoadSquad( SquadID squad, SquadID loadthis, Boolean assumeEmpty, Boolean assumeVisible )
 

检查小队是否可以装载另一个小队。【功能:检查装载能力】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1719) 

 Squad_CanPickupSlotItem( SquadID pSquad, EntityID pEntity )
 

如果小队可以拾取实体槽位物品则返回true。【功能:检查拾取槽位物品能力】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1531) 

 Squad_CanRecrew( SquadID pSquad, EntityID pEntity )
 

如果小队可以重新操作该实体则返回true。【功能:检查重新操作能力】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1543) 

 Squad_CanSeeEntity( SquadID squad, EntityID entity )
 

如果目标实体与源小队之间的距离小于小队的视距则返回true。不进行视线或战争迷雾检查。【功能:检查视野内实体】

Try Player_CanSeeEntity() if you care about LOS or FOW.

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1269) 

 Squad_CanSeeSquad( SquadID squad, SquadID target )
 

如果目标小队与源小队之间的距离小于小队的视距则返回true。不进行视线或战争迷雾检查。【功能:检查视野内小队】

Try Player_CanSeeSquad() if you care about LOS or FOW.

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1285) 

 Squad_CanTargetEntity( Squad& squad, Entity& target, Boolean checkFOW )
 

检查小队是否可以瞄准并攻击给定实体。【功能:检查瞄准实体能力】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1299) 

 Squad_CanTargetSquad( Squad& squad, Squad& target, Boolean checkFOW )
 

检查小队是否可以瞄准并攻击给定目标小队中至少一个实体。【功能:检查瞄准小队能力】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1305) 

 Squad_ClearPostureSuggestion( SquadID squad )
 

清除之前对小队做出的任何姿态建议。【功能:清除姿态建议】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2991) 

 Squad_ClearStateModelEnumTableTarget( SquadID squad, String key, Integer tableRowIndex )
 

清除小队状态模型中对应给定键和表行索引(从0开始)的目标句柄值。【功能:清除状态模型枚举表目标】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3475) 

 Squad_ClearStateModelTarget( SquadID squad, String key )
 

清除小队状态模型中对应给定键的目标句柄值。【功能:清除状态模型目标】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3259) 

 Squad_CompleteUpgrade( SquadID pSquad, ScarUpgradePBG upgradePBG )
 

立即为给定小队添加升级。【功能:完成升级】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2248) 

 Squad_Count( SquadID squad )
 

返回小队中当前的单位数量(包括已生成和已取消生成的!!)。【功能:获取小队单位数量】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (302) 

 Squad_CreateAndSpawnToward( ScarSquadPBG sbp, PlayerID player, Integer loadoutCount, Position pos, Position toward )
 

创建一个小队,生成它并将其分配给玩家。【功能:创建并朝向生成小队】

This will create a squad of size 'loadoutCount' and of unit type 'unit_base' (from squad blueprint)\n Note: loadoutCount will be clipped to loadoutMin and loadoutMax from the squad blueprint. A loudoutCount of zero means create the whole squad as is.

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (646) 

 Squad_DeSpawn( SquadID squad )
 

在当前位置取消生成整个小队。【功能:取消生成小队】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (292) 

 Squad_Destroy( SquadID squad )
 

从世界中移除小队并销毁它。【功能:销毁小队】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (239) 

 Squad_EnableProductionQueue( SquadID squad, Boolean enable )
 

设置小队是否可以生产任何东西(包括升级)。【功能:启用生产队列】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2468) 

 Squad_EnableSurprise( SquadID squad, Boolean enable )
 

启用或禁用给定小队的突袭功能。【功能:启用突袭功能】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1257) 

 Squad_ExtensionCount( )
 

返回小队扩展总数。【功能:获取扩展数量】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2881) 

 Squad_ExtensionEnabled( SquadID pSquad, ComponentDependencyIndex extID )
 

如果小队启用了特定扩展则返回true。【功能:检查扩展是否启用】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2904) 

 Squad_ExtensionName( SquadID pSquad, ComponentDependencyIndex extID )
 

返回小队上给定扩展的字符串名称。【功能:获取扩展名称】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2888) 

 Squad_FacePosition( SquadID squad, Position pos )
 

设置小队中所有单位的旋转以面向该位置。【功能:面向位置】

The center of the squad will face the position and all other troops will use the same rotation as the from center vector.\n\n This function works on spawned squads only.

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1962) 

 Squad_FaceSquad( SquadID squad1, SquadID squad2 )
 

让两个小队互相面向。此函数仅适用于已生成的小队。【功能:小队互相对视】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1969) 

 Squad_FindCover( SquadID squad, Position pos, Real coverSearchRadius )
 

尝试在位置的一定半径内寻找掩体。如果未找到掩体,则返回用于搜索的位置。【功能:寻找掩体】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2433) 

 Squad_FindCoverCompareCurrent( SquadID squad, Position pos, Real coverSearchRadius, Real maxPathDistanceFromGoal, Boolean compareToCurrentCover )
 

尝试在位置的一定半径内寻找掩体,行进最大距离到达那里,并可能与当前位置的掩体进行比较。如果未找到掩体,则返回用于搜索的位置。【功能:寻找并比较掩体】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2386) 

 Squad_FromID( Integer id )
 

从任务编辑器ID获取小队。【功能:从ID获取小队】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (454) 

 Squad_GetActiveUpgrades( Squad& squad )
 

返回此小队拥有的所有活动升级。【功能:获取活动升级】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2276) 

 Squad_GetAttackTargets( SquadID squad, SGroupID sgroup )
 

查找小队成员当前或强制的目标。sgroup被清空,找到的任何攻击目标小队被添加到sgroup。建筑物等实体目标被忽略。【功能:获取攻击目标】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1233) 

 Squad_GetBlueprint( SquadID squad )
 

返回小队的蓝图(来自属性编辑器)。【功能:获取小队蓝图】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (427) 

 Squad_GetDestination( SquadID squad )
 

如果小队正在移动,返回其目的地。重要:只有在Squad_HasDestination返回true时才能调用此函数。【功能:获取目的地】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2351) 

 Squad_GetFirstEntity( SquadID squad )
 

获取小队中的第一个实体(索引0)。【功能:获取第一个实体】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (328) 

 Squad_GetHeading( SquadID squad )
 

返回小队中已生成单位的平均朝向。朝向目前是一个包含三个条目(x、y、z)的lua表。【功能:获取朝向】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (257) 

 Squad_GetHealth( SquadID squad )
 

返回小队的当前生命值。【功能:获取生命值】

The current health of the squad is the total health of each entity in that squad.

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (798) 

 Squad_GetHealthMax( SquadID squad )
 

返回小队的最大生命值。【功能:获取最大生命值】

The max health of a squad is the max health of each entity in that squad. This means that the max health of a squad may change when entities are added or removed from the squad.\n\n

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (807) 

 Squad_GetHealthPercentage( SquadID squad, Boolean bIncludeBonuses )
 

返回原始小队剩余的生命值百分比,计入死亡(例如:3名步枪兵的小队将是50%生命值,因为它们开始时有6名成员)。注意:这是UI使用的相同百分比。【功能:获取生命值百分比】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (816) 

 Squad_GetHealthPercentageWithShields( SquadID squad, Boolean includeBonuses )
 

返回小队剩余生命值的百分比。【功能:获取含护盾生命值百分比】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (830) 

 Squad_GetHoldEntity( SquadID squad )
 

获取小队驻扎在哪栋建筑(实体)中。【功能:获取驻扎建筑】

Error if squad is not garrisoned in a building Please use Squad_IsInHold() to check first

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1652) 

 Squad_GetHoldSquad( SquadID squad )
 

获取小队驻扎在哪辆载具(小队)中。【功能:获取驻扎载具】

Error if squad is not garrisoned in a vehicle squad Please use Squad_IsInHold() to check first

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1666) 

 Squad_GetID( SquadID squad )
 

返回包含此小队唯一ID的整数。【功能:获取小队ID】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (444) 

 Squad_GetInvulnerable( SquadID squad )
 

检查小队是否无敌。【功能:检查无敌状态】

  Source: [E:\P4Share\engine\assets\engine\scar\squad.scar] (113) 

 Squad_GetInvulnerableEntityCount( SquadID squad )
 

返回无敌成员的数量。【功能:获取无敌成员数量】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1434) 

 Squad_GetInvulnerableMinCap( SquadID squad )
 

返回小队生命值下限或小队成员中最高的无敌下限百分比。【功能:获取无敌下限】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1395) 

 Squad_GetLastAttacker( SquadID squad, SGroupID sgroup )
 

查找对此小队的最后一个小队攻击者。如果找到,该小队被添加到sgroup。【功能:获取最后攻击者】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1175) 

 Squad_GetLastAttackers( SquadID squad, SGroupID group, Real timeSeconds )
 

查找在指定秒数内攻击此小队的小队攻击者。sgroup被清空,然后找到的任何小队被添加到sgroup。建筑攻击者被忽略。【功能:获取最近攻击者】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1202) 

 Squad_GetLastEntityAttacker( SquadID squad, EGroupID egroup )
 

查找对此小队的最后一个实体攻击者。如果找到,该实体被添加到egroup。【功能:获取最后实体攻击者】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1188) 

 Squad_GetMax( SquadID squad )
 

返回小队允许的最大单位数量。【功能:获取最大单位数】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (308) 

 Squad_GetMaxEntityDropOffDistance( SquadID targetSquad )
 

如果存在且实体有状态模型扩展,返回小队中所有实体的resourceDropOffDistance状态模型值之和。否则返回0.0f。【功能:获取最大资源卸载距离】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3553) 

 Squad_GetMinArmor( SquadID squad )
 

返回小队的当前最小护甲值。【功能:获取最小护甲】

The current armor of the squad is the minimum armor amongst all entities in that squad.

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (873) 

 Squad_GetNumSlotItem( SquadID squad, ScarSlotItemPBG pbg )
 

获取小队拥有的具有相同ID的槽位物品数量。【功能:获取槽位物品数量】

example: local item = Util_GetSlotItemID( "slot_item/allies_m1918_bar.lua" ) Squad_GetNumSlotItem( squadid, item )

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1561) 

 Squad_GetOffsetPosition( SquadID squad, Integer offset, Real distance )
 

返回相对于小队当前位置和方向的位置。有关'offset'参数的说明,请参阅ScarUtil.scar。【功能:获取偏移位置】

  Source: [E:\P4Share\engine\assets\engine\scar\squad.scar] (172) 

 Squad_GetPlayerOwner( SquadID squad )
 

返回给定小队的玩家所有者。小队不能由世界拥有。【功能:获取玩家所有者】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (363) 

 Squad_GetPosition( SquadID squad )
 

返回小队中已生成单位的平均位置。位置目前是一个包含三个条目(x、y、z)的lua表。【功能:获取位置】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (250) 

 Squad_GetPositionDeSpawned( SquadID squad )
 

返回小队中已取消生成和已生成单位的平均位置。【功能:获取含取消生成单位的位置】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (264) 

 Squad_GetProductionQueueItem( SquadID squad, Integer index )
 

返回具有索引的生产队列项目的蓝图。【功能:获取生产队列项目】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2489) 

 Squad_GetProductionQueueItemType( SquadID squad, Integer index )
 

返回具有索引的生产队列项目的生产类型(PITEM_Upgrade、PITEM_Spawn、PITEM_SquadUpgrade、PITEM_SquadReinforce、PITEM_PlayerUpgrade)。【功能:获取生产队列项目类型】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2517) 

 Squad_GetProductionQueueSize( SquadID squad )
 

返回小队生产队列中的项目数量。【功能:获取生产队列大小】

It is an error to call this function on a squad that does not have a production queue.\n Use Squad_HasProductionQueue to check that the squad has a queue.

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2476) 

 Squad_GetRace( SquadID squad )
 

返回给定小队的种族属性包组。【功能:获取种族】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (433) 

 Squad_GetShieldPercentage( SquadID squad )
 

返回小队剩余护盾的百分比。【功能:获取护盾百分比】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (844) 

 Squad_GetSlotItemAt( SquadID squad, Integer index )
 

返回槽位物品的ID。使用Squad_GetSlotItemCount确定小队有多少槽位物品。第一个索引是1。【功能:获取指定槽位物品】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1588) 

 Squad_GetSlotItemCount( SquadID squad )
 

返回此小队有多少槽位物品。【功能:获取槽位物品总数】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1574) 

 Squad_GetSlotItemsTable( SquadID squadid )
 

返回此小队当前拥有的槽位物品ID表。【功能:获取槽位物品表】

  Source: [E:\P4Share\engine\assets\engine\scar\squad.scar] (140) 

 Squad_GetSquadDoingDisableOnSquad( SquadID pSquad )
 

返回使传递的小队进入禁用状态的小队。【功能:获取禁用来源小队】

Disable states are: knocked back, stunned, levitate, stasis

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1780) 

 Squad_GetSquadsHeld( SquadID squad, SGroupID sgroup )
 

清空sgroup,然后将'squad'容纳的所有小队添加到其中。【功能:获取容纳的小队】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1734) 

 Squad_GetStateModelBool( SquadID squad, String key )
 

从小队的状态模型返回对应给定键的布尔值。【功能:获取状态模型布尔值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3078) 

 Squad_GetStateModelEntityTarget( SquadID squad, String key )
 

从小队的状态模型返回对应给定键的实体值。【功能:获取状态模型实体目标】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3116) 

 Squad_GetStateModelEnumTableBool( SquadID squad, String key, Integer tableRowIndex )
 

从小队的状态模型返回对应给定键和表行索引(从0开始)的布尔值。【功能:获取状态模型枚举表布尔值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3146) 

 Squad_GetStateModelEnumTableEntityTarget( SquadID squad, String key, Integer tableRowIndex )
 

从小队的状态模型返回对应给定键和表行索引(从0开始)的实体值。【功能:获取状态模型枚举表实体目标】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3190) 

 Squad_GetStateModelEnumTableFloat( SquadID squad, String key, Integer tableRowIndex )
 

从小队的状态模型返回对应给定键和表行索引(从0开始)的浮点值。【功能:获取状态模型枚举表浮点值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3160) 

 Squad_GetStateModelEnumTableInt( SquadID squad, String key, Integer tableRowIndex )
 

从小队的状态模型返回对应给定键和表行索引(从0开始)的整数值。【功能:获取状态模型枚举表整数值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3153) 

 Squad_GetStateModelEnumTablePlayerTarget( SquadID squad, String key, Integer tableRowIndex )
 

从小队的状态模型返回对应给定键和表行索引(从0开始)的玩家值。【功能:获取状态模型枚举表玩家目标】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3174) 

 Squad_GetStateModelEnumTableSquadTarget( SquadID squad, String key, Integer tableRowIndex )
 

从小队的状态模型返回对应给定键和表行索引(从0开始)的小队值。【功能:获取状态模型枚举表小队目标】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3182) 

 Squad_GetStateModelEnumTableVector3f( SquadID squad, String key, Integer tableRowIndex )
 

从小队的状态模型返回对应给定键和表行索引(从0开始)的Vector3f值。【功能:获取状态模型枚举表向量值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3167) 

 Squad_GetStateModelFloat( SquadID squad, String key )
 

从小队的状态模型返回对应给定键的浮点值。【功能:获取状态模型浮点值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3090) 

 Squad_GetStateModelInt( SquadID squad, String key )
 

从小队的状态模型返回对应给定键的整数值。【功能:获取状态模型整数值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3084) 

 Squad_GetStateModelPlayerTarget( SquadID squad, String key )
 

从小队的状态模型返回对应给定键的玩家值。【功能:获取状态模型玩家目标】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3102) 

 Squad_GetStateModelSquadTarget( SquadID squad, String key )
 

从小队的状态模型返回对应给定键的小队值。【功能:获取状态模型小队目标】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3109) 

 Squad_GetStateModelVector3f( SquadID squad, String key )
 

从小队的状态模型返回对应给定键的Vector3f值。【功能:获取状态模型向量值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3096) 

 Squad_GetVehicleMobileDriverSquad( SquadID pSquad )
 

从载具小队获取移动驾驶员小队。【功能:获取载具驾驶员小队】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (504) 

 Squad_GetVeterancy( SquadID squad )
 

获取当前小队经验等级。【功能:获取经验值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1892) 

 Squad_GetVeterancyRank( SquadID squad )
 

获取当前小队经验等级。【功能:获取经验等级】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1880) 

 Squad_GiveSlotItem( SquadID squad, ScarSlotItemPBG pbg )
 

将槽位物品给予小队。可能因槽位不足而失败。【功能:给予槽位物品】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1615) 

 Squad_GiveSlotItemsFromTable( SquadID squadid, LuaTable itemTable )
 

将表中的所有槽位物品给予小队。该表应来自Squad_GetSlotItemsTable。【功能:从表给予槽位物品】

  Source: [E:\P4Share\engine\assets\engine\scar\squad.scar] (159) 

 Squad_HasAbility( SquadID squad, ScarAbilityPBG ability )
 

测试小队是否拥有某技能。【功能:检查是否拥有技能】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2635) 

 Squad_HasAcceptedCommands( SquadID squad )
 

如果小队有已接受的命令将在接下来尝试执行则返回true。【功能:检查是否有已接受命令】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (900) 

 Squad_HasActiveCommand( SquadID squad )
 

如果小队当前有活动命令则返回true。【功能:检查是否有活动命令】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (941) 

 Squad_HasBlueprint( SquadID squad, SBP/SquadType/Table blueprints )
 

检查小队是否属于指定的任何蓝图或小队类型。【功能:检查蓝图类型】

Blueprint can be a single Blueprint, a single SquadType, or a table of multiple Blueprints or SquadTypes. If you want to see if a squad has ALL of a set of SquadTypes, then wrap them all in a sub-table.

  Source: [E:\P4Share\engine\assets\engine\scar\squad.scar] (15) 

 Squad_HasBuilding( SquadID pSquad )
 

如果给定小队中有建筑(包括班组武器)则返回true。【功能:检查是否有建筑】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (498) 

 Squad_HasDestination( SquadID squad )
 

返回此小队是否正在移动并有目的地,在发出移动请求的同一帧不会返回true。【功能:检查是否有目的地】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2332) 

 Squad_HasEntityWithNInteractors( SquadID targetSquad, String interactionTypeName, Integer minAttachedCount )
 

返回小队是否包含至少有minAttachedCount个interactionTypeName类型附加交互物的实体。【功能:检查是否有N个交互物】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3530) 

 Squad_HasHeavyWeapon( SquadID pSquad )
 

如果给定小队有重型武器(非移动式架设武器)则返回true。【功能:检查是否有重型武器】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (510) 

 Squad_HasInfantry( SquadID pSquad )
 

如果给定小队中至少有一个步兵单位(包括班组武器)则返回true。【功能:检查是否有步兵】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (486) 

 Squad_HasProductionQueue( SquadID squad )
 

如果小队有生产队列则返回true。【功能:检查是否有生产队列】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2462) 

 Squad_HasSetupTeamWeapon( SquadID pSquad )
 

如果给定小队已架设班组武器准备攻击则返回true。【功能:检查是否已架设班组武器】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (520) 

 Squad_HasSlotItem( SquadID squad, SlotItemID slotItem )
 

检查小队是否有特定的槽位物品。【功能:检查是否有槽位物品】

  Source: [E:\P4Share\engine\assets\engine\scar\squad.scar] (123) 

 Squad_HasTeamWeapon( SquadID pSquad )
 

如果给定小队有班组武器则返回true。【功能:检查是否有班组武器】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (530) 

 Squad_HasUpgrade( SquadID squad, ScarUpgradePBG pbg )
 

如果小队已购买指定升级则返回true。【功能:检查是否有升级】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2264) 

 Squad_HasVehicle( SquadID pSquad )
 

如果给定小队中有载具(包括班组武器)则返回true。【功能:检查是否有载具】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (492) 

 Squad_HasWeaponHardpoint( SquadID pSquad, String hardPointName )
 

如果给定小队至少有一个实体拥有指定武器硬点则返回true。【功能:检查是否有武器硬点】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (536) 

 Squad_IncreaseVeterancy( SquadID squad, Real veterancy, Boolean silent, Boolean applyModifiers )
 

增加当前小队经验值。【功能:增加经验值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1914) 

 Squad_IncreaseVeterancyRank( SquadID squad, Integer numranks, Boolean silent )
 

提升当前小队经验等级。【功能:提升经验等级】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1904) 

 Squad_InstantSetupTeamWeapon( SquadID squad )
 

停止当前小队活动并立即架设班组武器(如果有的话)。【功能:立即架设班组武器】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1933) 

 Squad_IsAbilityActive_CS( SquadID squad, ScarAbilityPBG pbg )
 

如果技能处于活动状态则返回true。【功能:检查技能是否活动】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1847) 

 Squad_IsAlive( SquadID squad )
 

检查小队是否存活。【功能:检查是否存活】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (480) 

 Squad_IsAttacking( SquadID squad, Real time )
 

如果小队中任何单位在指定时间内正在攻击则返回true。【功能:检查是否正在攻击】

Time is in seconds

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1156) 

 Squad_IsAttackMoving( SquadID squad )
 

如果小队当前正在攻击移动则返回true。【功能:检查是否攻击移动】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (995) 

 Squad_IsCamouflaged( SquadID squad )
 

返回小队中是否有任何实体处于伪装状态。【功能:检查是否伪装】

  Source: [E:\P4Share\engine\assets\engine\scar\squad.scar] (179) 

 Squad_IsCapturing( SquadID squad )
 

如果小队当前正在占领则返回true。【功能:检查是否正在占领】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (977) 

 Squad_IsCasualty( SquadID squad )
 

如果小队中任何已生成实体是伤亡者则返回true。【功能:检查是否有伤亡】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (961) 

 Squad_IsConstructing( SquadID squad )
 

如果小队当前正在建造则返回true。【功能:检查是否正在建造】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (983) 

 Squad_IsDoingAbility( SquadID squad, ScarAbilityPBG pbg )
 

如果小队当前正在执行给定技能则返回true。【功能:检查是否正在执行技能】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1869) 

 Squad_IsFemale( SquadID squad )
 

返回传入的小队是否为女性。【功能:检查是否为女性】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2300) 

 Squad_IsGatheringResourceType( SquadID targetSquad, Integer type )
 

返回小队是否包含正在执行特定单位角色的实体。【功能:检查是否正在采集资源】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3581) 

 Squad_IsHoldingAny( SquadID squad )
 

检查小队是否容纳了任何东西(用于载具)。【功能:检查是否容纳任何东西】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1707) 

 Squad_IsHoldingPosition( SquadID squad )
 

如果小队正在坚守位置则返回true。【功能:检查是否坚守位置】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3612) 

 Squad_IsIdle( SquadID squad )
 

如果小队处于空闲状态则返回true。【功能:检查是否空闲】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2927) 

 Squad_IsInBackground( SquadID pSquad )
 

返回小队是否在后台。默认返回false(如果小队为空)。【功能:检查是否在后台】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2943) 

 Squad_IsInCover( SquadID squadId, Boolean all )
 

如果小队中所有或任何士兵处于掩体中则返回true。【功能:检查是否在掩体中】

Set all to true to check if all troopers are in cover or set to false to check if any.

  Source: [E:\P4Share\engine\assets\engine\scar\squad.scar] (68) 

 Squad_IsInHoldEntity( SquadID squad )
 

检查小队是否驻扎在实体(建筑)中。【功能:检查是否驻扎在建筑中】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1678) 

 Squad_IsInHoldSquad( SquadID squad )
 

检查小队是否装载在小队(载具)中。【功能:检查是否装载在载具中】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1695) 

 Squad_IsInMeleeCombat( SquadID pSquad )
 

如果小队处于近战战斗中则返回true。【功能:检查是否近战】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1162) 

 Squad_IsKnockedBack( SquadID squad )
 

如果小队当前正在被击退则返回true。【功能:检查是否被击退】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1772) 

 Squad_IsMoving( SquadID squad )
 

如果小队中任何单位当前正在移动则返回true。【功能:检查是否移动】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1149) 

 Squad_IsOfType( SquadID squad, String type )
 

确定此小队是否属于给定类型。类型在squad_type_ext/squad_type_list中定义。【功能:检查小队类型】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3010) 

 Squad_IsOnWalkableWall( SquadID squad, Boolean all )
 

如果小队的任何实体(all=false)或整个小队(all=true)在可行走城墙上则返回true。【功能:检查是否在城墙上】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3606) 

 Squad_IsOwnedByPlayer( SquadID squad, PlayerID player )
 

如果给定小队由给定玩家拥有则返回true。【功能:检查玩家所有权】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3625) 

 Squad_IsReinforcing( SquadID squad )
 

如果小队当前正在增援则返回true。如果小队没有增援扩展,此函数将返回false。【功能:检查是否正在增援】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1008) 

 Squad_IsRetreating( SquadID squad )
 

如果小队正在撤退则返回true。【功能:检查是否撤退】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1001) 

 Squad_IsSBPOfType( ScarSquadPBG sbp, String type )
 

如果给定蓝图属于给定类型则返回true。类型在squad_type_ext/squad_type_list中定义。【功能:检查蓝图类型】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3034) 

 Squad_IsSettingDemolitions( SquadID squad )
 

如果小队当前正在放置炸药则返回true。【功能:检查是否放置炸药】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (989) 

 Squad_IsSiege( ScarSquadPBG pbg )
 

如果提供的小队蓝图是攻城单位则返回true。【功能:检查是否攻城单位】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3591) 

 Squad_IsStunned( SquadID squad )
 

如果小队当前处于眩晕状态则返回true。【功能:检查是否眩晕】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1765) 

 Squad_IsUnderAttack( SquadID squad, Real time )
 

如果小队中任何单位在指定时间内受到攻击则返回true。【功能:检查是否受攻击】

Time is in seconds

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1107) 

 Squad_IsUnderAttackByPlayer( SquadID squad, PlayerID pAttackerOwner, Real time )
 

如果小队受到来自特定玩家的敌人攻击则返回true。【功能:检查是否受特定玩家攻击】

Time is in seconds

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1169) 

 Squad_IsUnderAttackFromDirection( SquadID squad, Integer offset, Real timeSeconds )
 

如果小队从某个方向受到攻击则返回true(8种偏移类型,参见ScarUtil.scar)。【功能:检查攻击方向】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1113) 

 Squad_IsUpgrading( SquadID squad, ScarUpgradePBG upgrade )
 

如果小队当前正在升级特定东西则返回true。【功能:检查是否正在升级】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1020) 

 Squad_IsUpgradingAny( SquadID squad )
 

如果小队当前正在升级任何东西则返回true。【功能:检查是否正在升级任何东西】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1063) 

 Squad_IsValid( Integer id )
 

检查是否可以在世界中找到具有给定ID的小队。【功能:检查小队有效性】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (469) 

 Squad_Kill( SquadID squad )
 

杀死整个小队。将生命值设为0,并触发死亡效果。【功能:杀死小队】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (920) 

 Squad_NumUpgradeComplete( SquadID squad, ScarUpgradePBG upgradePBG )
 

返回此小队拥有的升级数量。【功能:获取已完成升级数量】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2270) 

 Squad_Population( SquadID squad, CapType type )
 

获取小队人口消耗,使用CT_Personnel、CT_Vehicle、CT_Medic作为上限类型。【功能:获取人口消耗】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3000) 

 Squad_RemoveAbility( SquadID squad, ScarAbilityPBG ability )
 

移除之前通过Squad_AddAbility添加的技能。不能移除静态技能(来自AE:squad_ability_ext)。【功能:移除技能】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2610) 

 Squad_RemoveSlotItemAt( SquadID squad, Integer index, Boolean bInstantWeaponChange )
 

从小队移除槽位物品。【功能:移除槽位物品】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1625) 

 Squad_RemoveStateModelListBool( SquadID squad, String key, Boolean value )
 

移除小队状态模型列表中对应给定键的布尔值。【功能:移除状态模型列表布尔值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3347) 

 Squad_RemoveStateModelListEntityTarget( SquadID squad, String key, EntityID value )
 

移除小队状态模型列表中对应给定键的实体目标句柄值。【功能:移除状态模型列表实体目标】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3383) 

 Squad_RemoveStateModelListFloat( SquadID squad, String key, Real value )
 

移除小队状态模型列表中对应给定键的浮点值。【功能:移除状态模型列表浮点值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3359) 

 Squad_RemoveStateModelListInt( SquadID squad, String key, Integer value )
 

移除小队状态模型列表中对应给定键的整数值。【功能:移除状态模型列表整数值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3353) 

 Squad_RemoveStateModelListPlayerTarget( SquadID squad, String key, PlayerID value )
 

移除小队状态模型列表中对应给定键的玩家目标句柄值。【功能:移除状态模型列表玩家目标】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3371) 

 Squad_RemoveStateModelListSquadTarget( SquadID squad, String key, SquadID value )
 

移除小队状态模型列表中对应给定键的小队目标句柄值。【功能:移除状态模型列表小队目标】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3377) 

 Squad_RemoveStateModelListVector3f( SquadID squad, String key, Position value )
 

移除小队状态模型列表中对应给定键的Vector3f值。【功能:移除状态模型列表向量值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3365) 

 Squad_RemoveUpgrade( SquadID squad, ScarUpgradePBG upgrade )
 

从小队移除升级。【功能:移除升级】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2583) 

 Squad_RewardActionPoints( SquadID squad, Real actionPoint )
 

给予小队行动点数。【功能:奖励行动点数】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2439) 

 Squad_SBPEntityAt( ScarSquadPBG sbp, Integer index )
 

从小队蓝图中获取实体蓝图(从0开始索引)。【功能:获取蓝图实体】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (343) 

 Squad_SBPGetMax( ScarSquadPBG sbp )
 

返回小队蓝图中允许的最大单位数量。【功能:获取蓝图最大单位数】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (318) 

 Squad_SetAnimatorAction( SquadID squadid, String actionName )
 

触发小队的动画动作。请仅用于简单动画。【功能:设置动画动作】

  Source: [E:\P4Share\engine\assets\engine\scar\squad.scar] (204) 

 Squad_SetAnimatorEvent( SquadID squadid, String actionName )
 

触发小队的动画事件。请仅用于简单动画。【功能:设置动画事件】

  Source: [E:\P4Share\engine\assets\engine\scar\squad.scar] (215) 

 Squad_SetAnimatorState( SquadID squadid, String stateMachineName, String stateName )
 

设置小队状态机的动画状态。请仅用于简单动画。【功能:设置动画状态】

  Source: [E:\P4Share\engine\assets\engine\scar\squad.scar] (193) 

 Squad_SetBackground( SquadID pSquad, Boolean isInBackground )
 

将小队设置为在后台或前台。默认情况下,所有小队都在前台。【功能:设置前后台】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2917) 

 Squad_SetExtEnabled( SquadID pSquad, String extID, Boolean enabled )
 

启用或禁用小队的UI扩展(控制与小队相关的所有UI元素)。【功能:设置扩展启用状态】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2875) 

 Squad_SetHealth( SquadID squad, Real healthPercent )
 

设置小队中所有单位的生命值。生命值必须在[0.0, 1.0]范围内。【功能:设置生命值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (851) 

 Squad_SetInvulnerable( SquadID squad, Boolean enable, Real reset_time )
 

设置小队的无敌状态。重置时间以秒为单位。如果为非负数,无敌状态将在该时间后过期。【功能:设置无敌状态】

  Source: [E:\P4Share\engine\assets\engine\scar\squad.scar] (95) 

 Squad_SetInvulnerableEntityCount( SquadID squad, Integer invEntityCount, Real resetTime )
 

当成员数量降至或低于指定数量时,使小队对物理伤害无敌。【功能:设置无敌成员数量阈值】

member count, 0 means squad is vulnerable; above 0 means number of alive entities will not go below this count resetTime is the time in seconds that vulnerability will be restored.; zero time for reset time means the buff will last forever

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1421) 

 Squad_SetInvulnerableMinCap( SquadID squad, Real minHealthPercentage, Real resetTime )
 

使小队对物理伤害无敌。【功能:设置无敌下限】

percentage of 0.0 means squad is vulnerable; percentage of 1.0 sets the squad in god mode resetTime is the time in seconds that vulnerability will be restored.; zero time for reset time means the buff will last forever

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1366) 

 Squad_SetMoodMode( SquadID squad, SquadCombatBehaviourMoodMode mood )
 

设置士兵情绪模式。【功能:设置情绪模式】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2321) 

 Squad_SetMoveType( SquadID squad, ScarMoveTypePBG movetypePBG )
 

设置小队的移动类型。【功能:设置移动类型】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1549) 

 Squad_SetPlayerOwner( SquadID squad, PlayerID owner )
 

更改给定小队的所有者。【功能:设置玩家所有者】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (378) 

 Squad_SetPosition( SquadID squad, Position pos, Position positionFacingToward )
 

将小队移动到新位置,并将小队成员吸附到网格单元格中心。【功能:设置位置】

`positionFacingToward` is passed in from the script as the position that they want the squad to face toward.

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (742) 

 Squad_SetPosition3D( SquadID squad, Position pos, Position toward )
 

将小队移动到任意新的3D位置。【功能:设置3D位置】

Note that the squad will still have the same properties, so any squad that snaps to the terrain (most land based squads) will interpolate to the terrain height immediately after this move. This function should really only be used for skimmers and other units that require the y axis to be specified. Use Squad_SetPosition() otherwise.

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (758) 

 Squad_SetRecrewable( SquadID squad, Boolean capturable )
 

设置小队内的实体在被遗弃时是否可重新操作。【功能:设置可重新操作】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2306) 

 Squad_SetResource( SquadID squad, Integer resourceType, Real newAmount )
 

此函数使用小队资源而非实体资源。对于给予单位资源,最好使用Entity_AddResource(位于luaentity.cpp)。【功能:设置资源】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2808) 

 Squad_SetStateModelBool( SquadID squad, String key, Boolean value )
 

在小队的状态模型中设置对应给定键的布尔值。【功能:设置状态模型布尔值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3217) 

 Squad_SetStateModelEntityTarget( SquadID squad, String key, EntityID value )
 

在小队的状态模型中设置对应给定键的实体目标句柄值。【功能:设置状态模型实体目标】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3253) 

 Squad_SetStateModelEnumTableBool( SquadID squad, String key, Integer tableRowIndex, Boolean value )
 

在小队的状态模型中设置对应给定键和表行索引(从0开始)的布尔值。【功能:设置状态模型枚举表布尔值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3414) 

 Squad_SetStateModelEnumTableEntityTarget( SquadID squad, String key, Integer tableRowIndex, EntityID value )
 

在小队的状态模型中设置对应给定键和表行索引(从0开始)的实体目标句柄值。【功能:设置状态模型枚举表实体目标】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3468) 

 Squad_SetStateModelEnumTableFloat( SquadID squad, String key, Integer tableRowIndex, Real value )
 

在小队的状态模型中设置对应给定键和表行索引(从0开始)的浮点值。【功能:设置状态模型枚举表浮点值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3428) 

 Squad_SetStateModelEnumTableInt( SquadID squad, String key, Integer tableRowIndex, Integer value )
 

在小队的状态模型中设置对应给定键和表行索引(从0开始)的整数值。【功能:设置状态模型枚举表整数值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3421) 

 Squad_SetStateModelEnumTablePlayerTarget( SquadID squad, String key, Integer tableRowIndex, PlayerID value )
 

在小队的状态模型中设置对应给定键和表行索引(从0开始)的玩家目标句柄值。【功能:设置状态模型枚举表玩家目标】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3450) 

 Squad_SetStateModelEnumTableSquadTarget( SquadID squad, String key, Integer tableRowIndex, SquadID value )
 

在小队的状态模型中设置对应给定键和表行索引(从0开始)的小队目标句柄值。【功能:设置状态模型枚举表小队目标】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3457) 

 Squad_SetStateModelEnumTableVector3f( SquadID squad, String key, Integer tableRowIndex, Position value )
 

在小队的状态模型中设置对应给定键和表行索引(从0开始)的Vector3f值。【功能:设置状态模型枚举表向量值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3439) 

 Squad_SetStateModelFloat( SquadID squad, String key, Real value )
 

在小队的状态模型中设置对应给定键的浮点值。【功能:设置状态模型浮点值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3229) 

 Squad_SetStateModelInt( SquadID squad, String key, Integer value )
 

在小队的状态模型中设置对应给定键的整数值。【功能:设置状态模型整数值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3223) 

 Squad_SetStateModelListBool( SquadID squad, String key, Boolean value, Boolean allowDuplicates )
 

在小队的状态模型列表中设置对应给定键的布尔值。【功能:设置状态模型列表布尔值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3305) 

 Squad_SetStateModelListEntityTarget( SquadID squad, String key, EntityID value, Boolean allowDuplicates )
 

在小队的状态模型列表中设置对应给定键的实体目标句柄值。【功能:设置状态模型列表实体目标】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3341) 

 Squad_SetStateModelListFloat( SquadID squad, String key, Real value, Boolean allowDuplicates )
 

在小队的状态模型列表中设置对应给定键的浮点值。【功能:设置状态模型列表浮点值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3317) 

 Squad_SetStateModelListInt( SquadID squad, String key, Integer value, Boolean allowDuplicates )
 

在小队的状态模型列表中设置对应给定键的整数值。【功能:设置状态模型列表整数值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3311) 

 Squad_SetStateModelListPlayerTarget( SquadID squad, String key, PlayerID value, Boolean allowDuplicates )
 

在小队的状态模型列表中设置对应给定键的玩家目标句柄值。【功能:设置状态模型列表玩家目标】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3329) 

 Squad_SetStateModelListSquadTarget( SquadID squad, String key, SquadID value, Boolean allowDuplicates )
 

在小队的状态模型列表中设置对应给定键的小队目标句柄值。【功能:设置状态模型列表小队目标】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3335) 

 Squad_SetStateModelListVector3f( SquadID squad, String key, Position value, Boolean allowDuplicates )
 

在小队的状态模型列表中设置对应给定键的Vector3f值。【功能:设置状态模型列表向量值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3323) 

 Squad_SetStateModelPlayerTarget( SquadID squad, String key, PlayerID value )
 

在小队的状态模型中设置对应给定键的玩家目标句柄值。【功能:设置状态模型玩家目标】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3241) 

 Squad_SetStateModelSquadTarget( SquadID squad, String key, SquadID value )
 

在小队的状态模型中设置对应给定键的小队目标句柄值。【功能:设置状态模型小队目标】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3247) 

 Squad_SetStateModelVector3f( SquadID squad, String key, Position value )
 

在小队的状态模型中设置对应给定键的Vector3f值。【功能:设置状态模型向量值】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (3235) 

 Squad_SetVeterancyDisplayVisibility( SquadID squad, Boolean visible )
 

打开/关闭单位肖像经验等级星星的显示。【功能:设置经验等级显示】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1923) 

 Squad_SetWorldOwned( SquadID squad )
 

使小队变为中立。【功能:设置为世界所有】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (415) 

 Squad_Spawn( SquadID squad, Position pos, String spawnType )
 

在给定位置生成整个小队。【功能:生成小队】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1519) 

 Squad_SpawnToward( SquadID squad, Position pos, Position toward, String spawnType )
 

在给定位置生成整个小队。【功能:朝向生成小队】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1511) 

 Squad_Split( SquadID squad, Integer int )
 

将小队分成两部分。新小队的大小由传入的数字指定。【功能:分割小队】

The new squad size is specified by the number passed in.

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (1313) 

 Squad_StopAbility( SquadID squad, ScarAbilityPBG ability, Boolean bIsEarlyExit )
 

突然停止活动技能。【功能:停止技能】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2574) 

 Squad_SuggestPosture( SquadID squad, Integer posture, Real duration )
 

向小队建议姿态,持续传入的时间。【功能:建议姿态】

Posture of 0 is prone, 1 is kneel/crouch, and 2 is standing. Duration is in seconds, negative means indefinate.

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (2981) 

 Squad_TryFindClosestFreePosition( SquadID squad, Position targetPosition )
 

返回小队距离目标位置最近的空闲位置。【功能:查找最近空闲位置】

  Source: [E:\P4Share\engine\source\runtime\presentation\public\presentation\lua\lualibs\unsorted\LuaSquad.cpp] (776) 

 Squad_WarpToPos( SquadID squad, Position pos )
 

立即将小队传送到新位置。【功能:传送小队】

  Source: [E:\P4Share\engine\assets\engine\scar\squad.scar] (86)