AIInterface |
Functions |
Void AI_ClearAllBudgetTotals( PlayerID pPlayer ) | |
Clears all the resources for each budget and recalculate their values |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (604) |
Void AI_ClearAllBudgetWeight( PlayerID pPlayer ) | |
Clears all the budget weights that have been previously added |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (585) |
Void AI_ClearBudgetTotal( PlayerID pPlayer, String budgetname ) | |
Clear the given budget's account of all of its resources. Example budget names are BUDGET_Units, BUDGET_Tech, BUDGET_Addon and BUDGET_Secure Example: AI_ClearBudgetTotal( player4, "BUDGET_Tech" ) |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (625) |
Void AI_ClearBuildDemand( PlayerID pPlayer ) | |
Clear the build demand table |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (167) |
Void AI_ClearClassPreference( PlayerID pPlayer ) | |
Clear all class preferences that have been set up both class and anti-class |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (230) |
Void AI_ClearImportance( PlayerID pPlayer, EntityID pEntity ) | |
This clears the importance override on this military point |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (359) |
Void AI_ClearProductionLimits( PlayerID pPlayer ) | |
Clears all PBG limits that were previously set |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (422) |
Void AI_ClearTargetPlayer( PlayerID pPlayer ) | |
Clears the attack request for this player. This player will now attack any enemies. |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (502) |
Void AI_DoString( PlayerID pPlayer, String s ) | |
Run this string in the AI of player |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (106) |
Void AI_Enable( PlayerID pPlayer, Boolean enable ) | |
Enables/Disables an AI player |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (73) |
Void AI_EnableAll( Boolean enable ) | |
Enables/Disables all AI players |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (93) |
Void AI_EnableComponent( PlayerID pPlayer, Boolean enable, Integer ct ) | |
Enables/disables a component of the AI Components:<BR/> COMPONENT_Attacking<BR/> COMPONENT_Defending<BR/> COMPONENT_ForwardDefending<BR/> COMPONENT_Resourcing<BR/> COMPONENT_BuildUnits<BR/> COMPONENT_BuildStructures<BR/> COMPONENT_BuildResearch<BR/> COMPONENT_Securing<BR/> COMPONENT_BuildAddOns COMPONENT_Tactics |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (389) |
Void AI_EnablePlayerOption( PlayerID pPlayer, Boolean bEnable, Integer tp ) | |
enables or disables an AI player option (currently options are: AIOPT_Retreat) |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (751) |
Void AI_ForceAttack( PlayerID pPlayer, PlayerID pPlayerTarget ) | |
Tells the AI to take all of its units and forces them to attack the given player immediately |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (516) |
Boolean AI_IsAIPlayer( PlayerID pPlayer ) | |
Returns true if player is an AI player |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (118) |
Boolean AI_IsEnabled( PlayerID pPlayer ) | |
Returns true if player is a AIPlayer and is enabled |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (83) |
Void AI_LockEntity( PlayerID pPlayer, EntityID pEntity ) | |
Locks the entity and disables its tactics (if any) and the AI will no longer use this object |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (249) |
Void AI_LockSGroup( PlayerID ai_player, SGroup sgroup ) | |
Lock an SGroup from the ai_player |
|
Source: [WW2Data.sga/Scar/CpuPlayerUtil.scar] (31) |
Void AI_LockSquad( PlayerID pPlayer, SquadID pSquad ) | |
Locks the squad and disables its tactics (if any) and the AI will no longer use this object |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (288) |
Void AI_SetAntiClassPreference( PlayerID pPlayer, String className, Real increment ) | |
Offset the anticlass preference to increase the demand for certain unit anticlasses Classname can be: aiclass_infantry, aiclass_light_vehicle, aiclass_heavy_vehicle as defined in the AE under type_ai_class |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (209) |
Void AI_SetBudgetWeight( PlayerID pPlayer, String budgetName, Real weight ) | |
Sets the given budget to the given weight Example budget names are BUDGET_Units, BUDGET_Tech, BUDGET_Addon and BUDGET_Secure Example: AI_SetBudgetWeight( player4, "BUDGET_Tech", 50 ) |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (566) |
Void AI_SetBuildDemand( PlayerID pPlayer, Blueprint pbg, Real start, Real increment ) | |
Sets the demand for this squadasd |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (147) |
Void AI_SetBuildTable( PlayerID ai_player, Table build_table ) | |
Set a build order table for the ai_player An example build table:<BR/> local build_table =<BR/> {<BR/> {SBP.ALLIED_RIFLEMEN, 1, 5},<BR/> {SBP.ALLIED_TANKTHINGY, 2, 3}<BR/> }<BR/> The first number in each entry is the starting value -- the lowest number gets built first<BR/> The second number is the increment that happens each time the unit is built<BR/> NOTE: Setting build demand table clobbers the class preferences |
|
Source: [WW2Data.sga/Scar/CpuPlayerUtil.scar] (20) |
Void AI_SetClassPreference( PlayerID pPlayer, String className, Real increment ) | |
Offset the class preference to increase the demand for certain unit class Classname can be: aiclass_infantry, aiclass_light_vehicle, aiclass_heavy_vehicle as defined in the AE under type_ai_class |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (187) |
Void AI_SetDifficulty( PlayerID pPlayer, Integer difficultyLevel ) | |
Set the difficulty level of this AI player Levels ca be one of: AD_Easy, AD_Standard, AD_Hard, AD_Hardest |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (437) |
Void AI_SetImportance( PlayerID pPlayer, EntityID pEntity, Real importance ) | |
This overrides the default importance of the given military point |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (341) |
Void AI_SetProductionLimits( PlayerID pPlayer, Blueprint pbg, Integer limit ) | |
Sets a limit to a PBG type (buildings, squads, upgrades, etc) |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (408) |
Void AI_SetProductionLimitsTable( PlayerID ai_player, Table limits_table ) | |
Set limits to the production items that an AI can build An example production limites table:<BR/> local production_limits_table =<BR/> {<BR/> {SBP.ENGINEER_SQUAD, 2},<BR/> {EBP.ALLIED_BARRACKS, 0}<BR/> {UPG.ALLIED_MINESWEEPER, 0}<BR/> }<BR/> The first argument is the table is the blueprint, and second: the number of those items the AI can build |
|
Source: [WW2Data.sga/Scar/CpuPlayerUtil.scar] (66) |
Void AI_SetTargetPlayer( PlayerID pPlayer, Integer playerID ) | |
Tells the AI to attack only the given player. |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (471) |
Void AI_SetVictoryPointPercentage( PlayerID pPlayer, Real percentage ) | |
Set the victory point percentage - how much should we prefer victory points over resource points? Percentage should be between 0.0 and 1.0. 1.0 means 100 percent. 0.5 means choose equally between victory points and other kinds of points. |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (543) |
Void AI_UnlockAll( PlayerID pPlayer ) | |
|
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (327) |
Void AI_UnlockEntity( PlayerID pPlayer, EntityID pEntity ) | |
Unlocks this entity so that AI can use it again |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (269) |
Void AI_UnlockSGroup( PlayerID ai_player, SGroup sgroup ) | |
Unlock an SGroup from the ai_player |
|
Source: [WW2Data.sga/Scar/CpuPlayerUtil.scar] (44) |
Void AI_UnlockSquad( PlayerID pPlayer, SquadID pSquad ) | |
Unlocks the given squad so the AI can use it again |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (308) |
Void AI_UpdateStatics( PlayerID pPlayer ) | |
Re-updates the AI in regards to all the static objects in the world (if SCAR creates new strategic points dynamically this will need to be called) |
|
Source: [DLL, from file /Cross/WW2Mod/AI/LuaAI.cpp] (737) |
Balance |
Functions |
SGroupID Balance_CreateSquadsAtMarkerByResource( PlayerID playerId, String squadgroupName, String squadBlueprint, Table load_out_table, String markername, Float requisition_amount, Float power_amount ) | |
Creates the maximum number of squads of this loadout given the resources at a marker position and adds them to a squadgroup. The squadgroup will be created if it doesnt exist. Loadout will be clipped to unitMin and unitMax from the squad blueprint. |
|
Source: [WW2Data.sga/Scar/BalanceTool.scar] (32) |
Void Balance_SetInit( LuaFunction func ) | |
Set the Lua Function used to initialize each Balance Tool iteration. The function is used to set up the forces that will battle |
|
Source: [WW2Data.sga/Scar/BalanceTool.scar] (364) |
battlesim |
Functions |
Void BattleSim_DumpResults( Void ) | |
write all battle simulation result |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaBattleSim.cpp] (88) |
Void BattleSim_StartBattleSim( Void ) | |
start battle simulation screen. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaBattleSim.cpp] (57) |
Void BattleSim_WriteOneResult( const char *s ) | |
record one sentence of battle sim result |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaBattleSim.cpp] (64) |
Blueprint |
Functions |
EntityBlueprint BP_GetEntityBlueprint( String pbgPath ) | |
Returns an entity property bag group. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaBlueprint.cpp] (119) |
Integer BP_GetID( Blueprint pbg ) | |
Returns an ID that uniquely identifies this pbg. NOTE: this is an arbitrary 32bit ID, and does not start from 0. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaBlueprint.cpp] (55) |
MedalBlueprint BP_GetMedalBlueprint( String pbgPath ) | |
Returns a medal property bag group. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaBlueprint.cpp] (131) |
String BP_GetName( Blueprint pbg ) | |
Return the path name of the group Example name would be "abilities\ally_mad_minute_ability" |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaBlueprint.cpp] (49) |
Integer BP_GetPropertyBagGroupCount( Integer type ) | |
Return the number of property bag groups of the same type Example type would be PBG_Critical |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaBlueprint.cpp] (80) |
String BP_GetPropertyBagGroupPathName( Integer type, Integer id ) | |
Return the path name of the group Example name would be "abilities\ally_mad_minute_ability" |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaBlueprint.cpp] (90) |
SquadBlueprint BP_GetSquadBlueprint( String pbgPath ) | |
Returns a squad property bag group. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaBlueprint.cpp] (125) |
Boolean BP_IsPropertyBagGroupValid( String groupname ) | |
Return whether a blueprint exists at this path |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaBlueprint.cpp] (66) |
Boolean EBP_Exists( String name ) | |
Returns true if an entity blueprint exists with the given name. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaBlueprint.cpp] (105) |
Boolean SBP_Exists( String name ) | |
Returns true if a squad blueprint exists with the given name. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaBlueprint.cpp] (112) |
Camera |
Functions |
Void Camera_AutoRotate( Position target, Real distance, Real declination, Real speed ) | |
Procedurally rotates the camera around a target. Camera input will be disabled. distance is in meters, declination is in degrees, speed is in degrees/sec. |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaCamera.cpp] (364) |
Void Camera_ClampToMarker( MarkerID marker ) | |
Clamps the camera's target position to a marker |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaCamera.cpp] (332) |
Void Camera_Dump( void ) | |
Print current camera settings. |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaCamera.cpp] (145) |
Void Camera_FocusOnPosition( Position pos, Boolean bPan ) | |
Camera would move to the specified position. bPan is a boolean flag that pans the camera if set to true |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1557) |
Void Camera_FocusOnTargetPos( Position targetpos ) | |
Focus the Camera on the specificed position |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaCamera.cpp] (82) |
Void Camera_FollowEGroup( EGroupID egroup ) | |
Set the camera to follow the first entity in an EGroup. The camera will follow it until the player takes control again. |
|
Source: [WW2Data.sga/Scar/Camera.scar] (187) |
Void Camera_FollowEntity( EntityID entity ) | |
Camera will follow specified entity |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1541) |
Void Camera_FollowSelection( Void ) | |
Camera would follow current selection |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1520) |
Void Camera_FollowSGroup( SGroupID sgroup ) | |
Set the camera to follow the first squad in an SGroup. The camera will follow them until the player takes control again. |
|
Source: [WW2Data.sga/Scar/Camera.scar] (175) |
Void Camera_FollowSquad( SquadID pSquad ) | |
Camera will follow specified squad |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1533) |
Real Camera_GetDeclination( Void ) | |
Get the current camera declination (tilt) |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaCamera.cpp] (271) |
Real Camera_GetOrbit( Void ) | |
Get the current camera orbit (rotation) |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaCamera.cpp] (251) |
Position Camera_GetTargetPos( Void ) | |
Get the current target position for the camera. |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaCamera.cpp] (220) |
Real Camera_GetTuningValue( Integer tuningValue ) | |
Get values: TV_SlideTargetRate, TV_SlideTargetBase, TV_SlideTargetThreshold |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaCamera.cpp] (58) |
Real Camera_GetZoomDist( Void ) | |
Get the current zoom distance for the camera. |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaCamera.cpp] (231) |
Boolean Camera_IsDefault( Void ) | |
Returns whether the camera distance, orbit and declination are close to default values |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaCamera.cpp] (308) |
Boolean Camera_IsInputEnabled( Void ) | |
Returns the enabled/disabled state of the camera input. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1569) |
Void Camera_MoveToEGroup( EGroupID egroup[, Boolean pan, Float panRate] ) | |
Move the camera to an EGroup's location. The optional pan flag should be true if you want the camera to glide to the new location. You can specify a pan rate to use (use SLOW_CAMERA_PANNING for a default slower rate) This function can be called through a CTRL object in NISlets. |
|
Source: [WW2Data.sga/Scar/Camera.scar] (115) |
Void Camera_MoveToPosition( MarkerID/Pos position[, Boolean pan, Float panRate] ) | |
Move the camera to desired location. The optional pan flag should be true if you want the camera to glide to the new location. You can specify a pan rate to use (use SLOW_CAMERA_PANNING for a default slower rate) This function canNOT be called through a CTRL object in NISlets. |
|
Source: [WW2Data.sga/Scar/Camera.scar] (38) |
Void Camera_MoveToPositionIfClose( MarkerID/Pos position ) | |
Slightly refocus the camera to rest on a position if it's close by. This function can be called through a CTRL object in NISlets. |
|
Source: [WW2Data.sga/Scar/Camera.scar] (89) |
Void Camera_MoveToSGroup( SGroupID sgroup[, Boolean pan, Float panRate] ) | |
Move the camera to an SGroup's location. The optional pan flag should be true if you want the camera to glide to the new location. You can specify a pan rate to use (use SLOW_CAMERA_PANNING for a default slower rate) This function can be called through a CTRL object in NISlets. |
|
Source: [WW2Data.sga/Scar/Camera.scar] (145) |
Void Camera_Reload( Void ) | |
Reload all cameras' tuning values |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaCamera.cpp] (211) |
Void Camera_ResetFocus( Void ) | |
Clears state info related to camera focus |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1508) |
Void Camera_ResetToDefault( Void ) | |
Reset camera position to default home position |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaCamera.cpp] (291) |
Void Camera_SetDeclination( Real dec ) | |
Set the current camera declination (tilt) |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaCamera.cpp] (282) |
Void Camera_SetDefault( Float height, Float declination, Float angle ) | |
Helper function to set the default camera parameters If the parameter is nil, the particular property is not modified |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (1577) |
Void Camera_SetInputEnabled( Boolean enabled ) | |
Enables / Disables camera input. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1563) |
Void Camera_SetOrbit( Real orbit ) | |
Set the current camera orbit (rotation) |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaCamera.cpp] (262) |
Void Camera_SetTuningValue( Integer tuningValue, Real value ) | |
Set values: TV_SlideTargetRate, TV_SlideTargetBase, TV_SlideTargetThreshold |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaCamera.cpp] (71) |
Void Camera_SetZoomDist( Real distance ) | |
Set the current zoom distance for the camera. |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaCamera.cpp] (242) |
Void Camera_StopAutoRotating( Void ) | |
Stops the camera from procedurally rotating. Input is restored. |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaCamera.cpp] (372) |
Void Camera_Unclamp( Void ) | |
Frees up the camera (so it's not clamped to a marker anymore) |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaCamera.cpp] (352) |
Command |
Functions |
Void Cmd_AbandonTeamWeapon( SGroupID sgroupid[, Boolean preserveCrew, Boolean queued] ) | |
Order a squad group to abandon their current team weapon if they have it and they could (tuning value in attribute editor) |
|
Source: [WW2Data.sga/Scar/Command.scar] (1428) |
Void Cmd_Ability( PlayerID/EGroupID/SGroupID user, AbilityBlueprint blueprint, [Position/SGroupID/EGroupID target, Position direction, Bool skipCostPrereq, Bool queued] ) | |
Sends an ability command to a player, egroup or sgroup. extra parameters are provided if the ability requires them. |
|
Source: [WW2Data.sga/Scar/Command.scar] (1077) |
Void Cmd_AttachSquads( SGroupID sgroup, SGroupID sgroupAttachee ) | |
Attach the squad from sgroupnameAttachee to sgroupname. Both SGroups must contain only one squad. |
|
Source: [WW2Data.sga/Scar/Command.scar] (1223) |
Void Cmd_Attack( SGroupID sgroup, SGroup/EGroup/Pos/Marker target[, Boolean queued, Boolean stationary, String plan] ) | |
Issues an attack command to an SGroup |
|
Source: [WW2Data.sga/Scar/Command.scar] (420) |
Void Cmd_AttackMove( SGroupID sgroup, Position targetposition[, Boolean queued, String plan, Real coverSearchRadius] ) | |
Order a squad group to attack move to a position (anything whose position can be queried). can be queued, can follow a plan, can search for cover within a radius |
|
Source: [WW2Data.sga/Scar/Command.scar] (470) |
Void Cmd_AttackMoveThenCapture( SGroupID attacker, EGroupID target, [!Boolean!queued ] ) | |
Command attacker sgroup to attack move to strategic point target; when it is capturable, the sgroup would capture it |
|
Source: [WW2Data.sga/Scar/Command.scar] (1331) |
Void Cmd_CaptureTeamWeapon( SGroupID sgroupid, EGroupID targetid, [Boolean queued] ) | |
Order a squad group to capture team weapon entity group. |
|
Source: [WW2Data.sga/Scar/Command.scar] (1408) |
Void Cmd_Construct( SGroup sgroupid, Entity blueprint, EGroupID/Position/Marker targetid[, Position Facing, Boolean queued] ) | |
Orders a squad to contruct a building at specified position, or to continue construction on an existing building. The command also checks to see if a building already exists at the location, and the squad will continue building it, if it is of the correct type. |
|
Source: [WW2Data.sga/Scar/Command.scar] (1576) |
Void Cmd_CriticalHit( PlayerID playerid, SGroupID/EGroupID/Squad/Entity target, CriticalID criticalid, DamageID damageid ) | |
Applies critical hit to entity/squad/sgroup/egroup Player id doesn't have to be the owner as the applied entities but need to make sure the player is still alive |
|
Source: [WW2Data.sga/Scar/Command.scar] (796) |
Void Cmd_DetonateDemolitions( PlayerID player, EGroupID target[, Boolean queued] ) | |
Detonates a building's demolitions |
|
Source: [WW2Data.sga/Scar/Command.scar] (1557) |
Void Cmd_DigIn( SGroupID sgroup, Position targetposition, Position facingposition ) | |
Order a squad group to dig in the first position and facing the second position |
|
Source: [WW2Data.sga/Scar/Command.scar] (505) |
Void Cmd_DigOut( SGroupID sgroup ) | |
Order a squad group to dig out if they are already dug in |
|
Source: [WW2Data.sga/Scar/Command.scar] (555) |
Void Cmd_DoPlan( SGroupID sgroupid, String plan[, Postion pos, Boolean!queued ] ) | |
Order a squad group to execute a squad AI plan. pass in nil to execute the default plan. |
|
Source: [WW2Data.sga/Scar/Command.scar] (1474) |
EntityID or SquadID id of the destination Cmd_Garrison( SGroupID fromsgroupid, EGroupID/SGroupID togroupid, [Bool overload, Bool queued] ) | |
Order a squad group to load at a random entity or squad of the group overload is a flag that will allow the hold entity to ignore maximum slot check |
|
Source: [WW2Data.sga/Scar/Command.scar] (620) |
Void Cmd_InstantDigIn( SGroupID sgroup ) | |
Order a squad group to dig in instantly at the current position and facing This order should only be used in the beginning of missions since it skips all the dig in animation. Also, if any of the squad member is on terrain that doesn't allow dig in, the whole squad would refuse to instant dig in. |
|
Source: [WW2Data.sga/Scar/Command.scar] (523) |
Void Cmd_InstantDigOut( SGroupID sgroup ) | |
Order a squad group to dig out instantly |
|
Source: [WW2Data.sga/Scar/Command.scar] (539) |
Void Cmd_InstantGarrison( Void ) | |
See Cmd_Garrison. |
|
Source: [WW2Data.sga/Scar/Command.scar] (612) |
Void Cmd_InstantReinforceUnit( SGroupID sgroup, Integer count ) | |
Sends a instant reinforce command to all squads in a group. count represents the number of commands to send. Note: This function bypasses pre-reqs, costs and the production queue |
|
Source: [WW2Data.sga/Scar/Command.scar] (930) |
Void Cmd_InstantReinforceUnitPos( SGroupID sgroup, Integer count, MarkerID/Pos spawnlocation[, Integer checktype[, Integer failtype]] ) | |
Sends a instant reinforce command to all squads in a group. count represents the number of commands to send. spawnlocation is where the reinforced unit will spawn. You can optionally find a hidden position by specifying a checktype (CHECK_OFFCAMERA, CHECK_IN_FOW or CHECK_BOTH), and what to do if a hidden position can't be found (SPAWN_ATMARKER, SPAWN_ATSQUAD, or DO_NOTHING) - SPAWN_ATMARKER is the default. Note: This function bypasses pre-reqs and costs and the production queue |
|
Source: [WW2Data.sga/Scar/Command.scar] (1007) |
Void Cmd_InstantSetupTeamWeapon( SGroupID sgroupid, [Boolean queued] ) | |
Order a squad group to instant setup their team weapon |
|
Source: [WW2Data.sga/Scar/Command.scar] (1454) |
Void Cmd_InstantUpgrade( PlayerID/EGroupID/SGroupID target, UpgradeBlueprint/Table blueprint[, Integer count] ) | |
Sends an instant upgrade command to a player, egroup or sgroup. accepts a single upgrade or table of upgrades. |
|
Source: [WW2Data.sga/Scar/Command.scar] (1066) |
Void Cmd_Move( SGroupID sgroup, Pos/SGroupID/EGroupID/MarkerID position, [Boolean queued, MarkerID deleteWhenNearMarker, Position facing, Integer offset, Real distance, Real coverSearchRadius] ) | |
Move a squad group to a given position. Supports facing, 'offset' movement, and can find cover. The sgroup can be deleted when in proximity of a marker (it assumes a proximity of 5 if you forget to set one on the marker) |
|
Source: [WW2Data.sga/Scar/Command.scar] (28) |
Void Cmd_MoveAwayFromPos( SGroupID sgroup, Pos position, Int radius, [Boolean queued] ) | |
Move a squad group out of a position to a certain radius All squads in the group will move away from the centre position from its current position |
|
Source: [WW2Data.sga/Scar/Command.scar] (167) |
markerID Cmd_MoveToClosestMarker( SGroupID sgroup, Table markertable ) | |
Moves a squad group to the closest marker in a list/table of MarkerIDs. |
|
Source: [WW2Data.sga/Scar/Command.scar] (1291) |
Void Cmd_MoveToThenCapture( SGroupID attacker, EGroupID target, [!Boolean!queued ] ) | |
Command attacker sgroup to attack move to strategic point target; when it is capturable, the sgroup would capture it |
|
Source: [WW2Data.sga/Scar/Command.scar] (1370) |
Void Cmd_ReinforceUnit( SGroupID sgroup, Integer count ) | |
Sends a reinforce command to all squads in a group. count represents the number of commands to send. Note: To reinforce squad bypassing the pre-reqs and costs use Cmd_InstantReinforceUnit. |
|
Source: [WW2Data.sga/Scar/Command.scar] (906) |
Void Cmd_ReinforceUnitPos( SGroupID sgroup, Integer count, MarkerID/Pos spawnlocation[, Integer checktype[, Integer failtype]] ) | |
Sends a reinforce command to all squads in a group. count represents the number of commands to send. spawnlocation is where the reinforced unit will spawn. You can optionally find a hidden position by specifying a checktype (CHECK_OFFCAMERA, CHECK_IN_FOW or CHECK_BOTH), and what to do if a hidden position can't be found (SPAWN_ATMARKER, SPAWN_ATSQUAD, or DO_NOTHING) - SPAWN_ATMARKER is the default. To reinforce squads bypassing the pre-reqs and costs use Cmd_InstantReinforceUnit |
|
Source: [WW2Data.sga/Scar/Command.scar] (939) |
Void Cmd_Retreat( SGroupID sgroup[, Position location, MarkerID deleteWhenNearMarker, Boolean queued] ) | |
Order a squad group to retreat, optionally to a specific location. The sgroup can be deleted when in proximity of a marker (it assumes a proximity of 5 if you forget to set one on the marker) |
|
Source: [WW2Data.sga/Scar/Command.scar] (575) |
Void Cmd_RevertOccupiedBuilding( SGroupID sgroupid, EGroupID targetid, [Boolean queued] ) | |
Order a squad group to revert occupied building |
|
Source: [WW2Data.sga/Scar/Command.scar] (1523) |
Void Cmd_SetDemolitions( SGroupID sgroupid, EGroupID targetid[, Boolean skipCostPrereq, Boolean queued] ) | |
Orders a squad group to place demolition charges on a building (egroup). Function does nothing if egroup cannot be detonated, or player can't afford the demolitions |
|
Source: [WW2Data.sga/Scar/Command.scar] (1543) |
Void Cmd_SquadCamouflageStance( SGroupID sgroup, CamouflageStanceID stanceid ) | |
Sends an camouflage stance command to all squads in a group. stanceid should be the number returned by Util_GetCamouflageStanceID( stancename ) |
|
Source: [WW2Data.sga/Scar/Command.scar] (842) |
Void Cmd_SquadPath( SGroupID sgroup, String pathName, Boolean bFromClosest, Integer loop, Boolean bAttackMove, Float pauseTime[, MarkerID deleteWhenNearMarker, Boolean queued, Boolean bMoveForward] ) | |
Send a command to the squad to follow a path. Can wait at each waypoint. The sgroup can be deleted when in proximity of a marker if you pass in the marker as the 7th argument (it assumes a proximity of 5 if you forget to set one on the marker) loop can be: LOOP_NONE, LOOP_NORMAL, LOOP_TOGGLE_DIRECTION |
|
Source: [WW2Data.sga/Scar/Command.scar] (226) |
Void Cmd_SquadPatrolMarker( SGroupID sgroup, MarkerID marker ) | |
Causes a squad to patrol a marker attacking any enemies that come within its radius. If used on circular markers, the radius must be at least 5. To stop the squad from patrolling the marker, use Cmd_Stop. |
|
Source: [WW2Data.sga/Scar/Command.scar] (269) |
Void Cmd_Stop( EGroupID/SGroupID group ) | |
Sends a stop command to egroup or sgroup. |
|
Source: [WW2Data.sga/Scar/Command.scar] (1258) |
Void Cmd_Surrender( SGroup!sgroupid [, Integer actionpoints, Position exitpos] ) | |
Orders a squad to surrender and awards the local player with an appropriate number of action points The command will also overwrite the exit position as well, if you do not want the squads to exit at the map entry point. |
|
Source: [WW2Data.sga/Scar/Command.scar] (1648) |
Void Cmd_Ungarrison( EGroupID/SGroupID fromgroupid[, Position destination, Boolean queued] ) | |
Orders an EGroup or SGroup to kick out its occupants. If no position is specified, the occupants stay at the exit. |
|
Source: [WW2Data.sga/Scar/Command.scar] (672) |
Void Cmd_UngarrisonSquad( SGroupID sgroupid[, Position destination, Boolean queued] ) | |
Orders an sgroup to exit the building or vehicle that it's in. If no position is specified, the sgroup stays at the exit. |
|
Source: [WW2Data.sga/Scar/Command.scar] (731) |
Void Cmd_Upgrade( PlayerID/EGroupID/SGroupID user, UpgradeBlueprint/Table blueprint[, Integer count] ) | |
Sends an upgrade command to a player, egroup or sgroup. accepts a single upgrade or table of upgrades. |
|
Source: [WW2Data.sga/Scar/Command.scar] (1018) |
Void Command_Entity( PlayerID player, EGroupID egroup, Integer entityCommand ) | |
Send a entity command to a entity group(CMD_DefaultAction, CMD_Stop, CMD_Destroy, CMD_BuildSquad, CMD_CancelProduction, CMD_RallyPoint, CMD_AttackForced) Entity commands are mostly used for buildings etc. If you need to issue commands to units, use the Squad_Command function. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1216) |
Void Command_EntityAbility( PlayerID player, EGroupID egroup, AbilityBlueprint abilityPBG, Boolean skipCostPrereq, Boolean queued ) | |
Send an entity ability command (CMD_Ability) to an entity |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1459) |
Void Command_EntityEntity( PlayerID player, EGroupID egroup, Integer entityCommand, EGroupID target ) | |
Send a entity-based command to an entity group. Use this function to issue orders that require a entity to an entity group (eg. order a building to attack another building)<BR/> See Command_Entity for a list of all the possible entityCommands. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1280) |
Void Command_EntityExt( PlayerID player, EGroupID egroup, Integer entityCommand, Integer cmdparam, Boolean queued ) | |
Send a squad command to a squad group with custom data |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1396) |
Void Command_EntityPos( PlayerID player, EGroupID egroup, Integer entityCommand, Position target ) | |
Send a position command to an entity group. Use this function to issue orders that require a position to an entity group (eg. set a rally point for a building)<BR/> See Command_Entity for a list of all the possible entityCommands. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1246) |
Void Command_EntityPosAbility( PlayerID player, EGroupID egroup, Position pos, AbilityBlueprint abilityPBG, Boolean skipCostPrereq, Boolean queued ) | |
Send a positional ability command (CMD_Ability) to an entity Use this function to issue ability orders that require a position to player |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1494) |
Void Command_EntityPosDirAbility( PlayerID player, EGroupID egroup, Position pos, Position dir, AbilityBlueprint abilityPBG, Boolean skipCostPrereq, Boolean queued ) | |
Send a positional/directional ability command (CMD_Ability) to an entity Use this function to issue ability orders that require a position and a direction to player |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1530) |
Void Command_EntityPosSquad( PlayerID player, EGroupID egroup, Integer entityCommand, Position target, SGroupID sgroup ) | |
Send a dual target (position and squad) command to an entity group. Use this function to issue orders that require a position and a squad to an entity group (eg. unloading squad from hold)<BR/> See Command_Entity for a list of all the possible entityCommands. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1358) |
Void Command_EntitySquad( PlayerID player, EGroupID egroup, Integer entityCommand, SGroupID target ) | |
Send a squad-based command to an entity group. Use this function to issue orders that require a squad to an entity group (eg. order a building to attack a squad)<BR/> See Command_Entity for a list of all the possible entityCommands. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1319) |
Void Command_EntityUpgrade( PlayerID player, EGroupID egroup, UpgradeBlueprint upgrade, Boolean instant, Boolean queued ) | |
Send a squad command to a squad group with custom data |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1428) |
Void Command_Player( PlayerID player, PlayerID dest, Integer playerCommand ) | |
Send a player command to a player PCMD_Ability |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (266) |
Void Command_PlayerAbility( PlayerID player, PlayerID dest, AbilityBlueprint abilityPBG, Boolean skipCostPrereq ) | |
Send a player ability command (PCMD_Ability) to a player |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (362) |
Void Command_PlayerEntity( PlayerID player, PlayerID dest, Integer playerCommand, EGroupID target ) | |
Send an entity command to a player. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (312) |
Void Command_PlayerEntityCriticalHit( PlayerID player, EGroupID egroup, Integer playerCommand, CriticalBlueprint criticalPBG, Boolean queued, DamageBlueprint damagePBG ) | |
Send a player command to itself to act upon single with custom parameter and index data (PCMD_CriticalHit) This is a special command for SCAR and debug feature |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1612) |
Void Command_PlayerExt( PlayerID player, PlayerID dest, Integer playerCommand, Integer cmdparam, Boolean queued ) | |
Send a player command to a player with a custom flag |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (215) |
Void Command_PlayerPos( PlayerID player, PlayerID dest, Integer playerCommand, Position pos ) | |
Send a position command to a player. Use this function to issue orders that require a position to player)<BR/> See Command_Player for a list of all the possible playerCommands. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (289) |
Void Command_PlayerPosAbility( PlayerID player, PlayerID dest, Position pos, AbilityBlueprint abilityPBG, Boolean skipCostPrereq ) | |
Send a positional ability command (PCMD_Ability) to a player Use this function to issue ability orders that require a position to player |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (389) |
Void Command_PlayerPosDirAbility( PlayerID player, PlayerID dest, Position pos, Position dir, AbilityBlueprint abilityPBG, Boolean skipCostPrereq ) | |
Send a positional/directional ability command (PCMD_Ability) to a player Use this function to issue ability orders that require a position and a direction to player |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (417) |
Void Command_PlayerPosExt( PlayerID player, PlayerID dest, Integer playerCommand, Position pos, Integer cmdparam, Boolean queued ) | |
Send a position command to a player with extra info Use this function to issue orders that require a position to player<BR/> See Command_Player for a list of all the possible playerCommands. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (338) |
Void Command_PlayerSquadConstructBuilding( PlayerID player, SGroupID sgroup, EntityBlueprint ebp, Position position, Position facing, Boolean queued ) | |
Send a player command to itself to order squads in the sgroup to construct the building at specific position and facing structureBlueprint must be a valid building that can be constructed by the sgroup. This building would cost nothing and does not effect population and availability This is a special command for SCAR use |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1642) |
Void Command_PlayerSquadConstructFence( PlayerID player, SGroupID sgroup, EntityBlueprint ebp, Position posStart, Position posEnd, Boolean queued ) | |
Send a player command to itself to order squads in the sgroup to construct fences from posStart to posEnd structureBlueprint must be a valid building that can be constructed by the sgroup. This building would cost nothing and does not effect population and availability This is a special command for SCAR use |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1715) |
Void Command_PlayerSquadConstructField( PlayerID player, SGroupID sgroup, EntityBlueprint ebp, Position posStart, Position posEnd, Boolean queued ) | |
Send a player command to itself to order squads in the sgroup to construct a field ranging from posStart to posEnd structureBlueprint must be a valid building that can be constructed by the sgroup. This building would cost nothing and does not effect population and availability This is a special command for SCAR use |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1793) |
Void Command_PlayerSquadCriticalHit( PlayerID player, SGroupID sgroup, Integer playerCommand, CriticalBlueprint criticalPBG, Boolean queued, DamageBlueprint damagePBG ) | |
Send a player command to itself to act upon all entities in the sgroup with custom parameter and index data (PCMD_CriticalHit) This is a special command for SCAR & debug use |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1569) |
Void Command_PlayerUpgrade( PlayerID player, UpgradeBlueprint upgrade, Boolean instant, Boolean queued ) | |
Sends an upgrade command to a player |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (239) |
Void Command_Squad( PlayerID player, SGroupID sgroup, Integer squadCommand, Boolean queued ) | |
Send a squad command to a squad group SCMD_DefaultAction, SCMD_Move, SCMD_Stop, SCMD_Destroy, SCMD_BuildStructure, SCMD_Capture, SCMD_Attack, SCMD_ReinforceUnit, SCMD_Upgrade, SCMD_CancelProduction SCMD_AttackMove, SCMD_Ability, SCMD_Attach, SCMD_Detach SCMD_Load,SCMD_UnloadSquads, SCMD_DoPlan SCMD_SlotItemRemove, SCMD_InstantReinforceUnit, SCMD_InstantUpgrade |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (654) |
Void Command_SquadAbility( PlayerID player, SGroupID sgroup, AbilityBlueprint abilityPBG, Boolean skipCostPrereq, Boolean queued ) | |
Send a ability command (SCMD_Ability) to a squad |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (447) |
Void Command_SquadAttackMovePos( PlayerID player, SGroupID sgroup, Integer squadCommand, Position target, String planName, Boolean queued ) | |
Send a position ATTACK MOVE command to a squad group with custom data |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (935) |
Void Command_SquadDoCustomPlan( PlayerID player, SGroupID sgroup, String planFile, Boolean queued ) | |
Send a custom squad AI plan command to the squad to execute the plan specified towards the position |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1979) |
Void Command_SquadDoCustomPlanTarget( PlayerID player, SGroupID sgroup, Position pos, String planFile, Boolean queued ) | |
Send a custom squad AI plan command to the squad to execute the plan specified towards the position |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1946) |
Void Command_SquadEntity( PlayerID player, SGroupID sgroup, Integer squadCommand, EGroupID target, Boolean queued ) | |
Send an entity command to a squad group. Use this function to isssue an entity-based command to a squad group.<BR/> See Command_Squad for a list of all the possible squadCommands |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (825) |
Void Command_SquadEntityAbility( PlayerID player, SGroupID sgroup, EGroupID target, AbilityBlueprint abilityPBG, Boolean skipCostPrereq, Boolean queued ) | |
Send a entity ability command (SCMD_Ability) to a squad |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (491) |
Void Command_SquadEntityAttack( PlayerID player, SGroupID sgroup, EGroupID target, Boolean bCheckFOW, Boolean bStationary, String planName, Boolean queued ) | |
Send an entity command ATTACK to a squad group. Use this function to issue an entity-based command to a squad group with custom FOW check flag. (eg. order a squad to attack a building)<BR/> planName is the name of the custom plan file to execute. Pass in empty string to use the default<BR/> stationary flag uses SCMD_StationaryAttack instead where plan file is ignored and squad does not pursue its target See Command_Squad for a list of all the possible squadCommands |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1026) |
Void Command_SquadEntityBool( PlayerID player, SGroupID sgroup, Integer squadCommand, EGroupID target, Boolean cmdparam, Boolean queued ) | |
Send a entity command to a squad group with custom BOOLEAN data |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (898) |
Void Command_SquadEntityExt( PlayerID player, SGroupID sgroup, Integer squadCommand, EGroupID target, Integer cmdparam, Boolean queued ) | |
Send a entity command to a squad group with custom data |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (861) |
Void Command_SquadEntityLoad( PlayerID player, SGroupID sgroup, Integer squadCommand, EGroupID target, Boolean bOverLoad, Boolean bQueued ) | |
Send special squad command to a squad group with squad load parameters This is a special command for loading squads into building (entity) holds (SCMD_Load, SCMD_InstantLoad) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1909) |
Void Command_SquadExt( PlayerID player, SGroupID sgroup, Integer squadCommand, Integer cmdparam, Boolean queued ) | |
Send a squad command to a squad group with custom data |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (584) |
Void Command_SquadPos( PlayerID player, SGroupID sgroup, Integer squadCommand, Position target, Boolean queued ) | |
Send a position command to a squad group. Use this function to issue orders that require a position to a squad group (eg. order a squad to move to position, or attack position)<BR/> See Command_Squad for a list of all the possible squadCommands. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (716) |
Void Command_SquadPosAbility( PlayerID player, SGroupID sgroup, Position pos, AbilityBlueprint abilityPBG, Boolean skipCostPrereq, Boolean queued ) | |
Send a positional ability command (SCMD_Ability) to a squad |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (480) |
Void Command_SquadPosExt( PlayerID player, SGroupID sgroup, Integer squadCommand, Position target, Integer cmdparam, Boolean queued ) | |
Send a position command to a squad group with custom data |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (681) |
Void Command_SquadPosFacing( PlayerID player, SGroupID sgroup, Integer squadCommand, Position target, Position facing, Boolean queued ) | |
Send a move-facing command to a squad group |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (790) |
Void Command_SquadPositionAttack( PlayerID player, SGroupID sgroup, Position target, Boolean bCheckFOW, Boolean bStationary, String planName, Boolean queued ) | |
Send an position command ATTACK to a squad group. Use this function to issue an position-based command to a squad group with custom FOW check flag. (eg. order a squad to attack a building)<BR/> planName is the name of the custom plan file to execute. Pass in empty string to use the default<BR/> stationary flag uses SCMD_StationaryAttack instead where plan file is ignored and squad does not pursue its target See Command_Squad for a list of all the possible squadCommands |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (975) |
Void Command_SquadPosPos( PlayerID player, SGroupID sgroup, Integer squadCommand, Position target, Position target2 ) | |
Send a command to a squad group with 2 positional input Use this function to issue orders that require a position to a squad group and additional data (eg. order a squad to dig in with facing)<BR/> See Command_Squad for a list of all the possible squadCommands. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (758) |
Void Command_SquadSquad( PlayerID player, SGroupID sgroup, Integer squadCommand, SGroupID target, Boolean queued ) | |
Send an squad-based command to a squad group. Use this function to issue a squad-based command to a squad group. <BR/> See Command_Squad for a list of all the possible squadCommands |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1117) |
Void Command_SquadSquadAbility( PlayerID player, SGroupID sgroup, SGroupID target, AbilityBlueprint abilityPBG, Boolean skipCostPrereq, Boolean queued ) | |
Send a squad ability command (SCMD_Ability) to a squad |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (507) |
Void Command_SquadSquadAttack( PlayerID player, SGroupID sgroup, SGroupID target, Boolean bCheckFOW, Boolean bStationary, String planName, Boolean queued ) | |
Send an squad-based command to a squad group. Use this function to issue a squad-based command to a squad group with special boolean flag. (eg. order a squad to attack another squad)<BR/> If bCheckFOW is set to false, the squad would be able to attack other squads hidden in FOW <BR/> planName is the name of the custom plan file to execute. Pass in empty string to use the default<BR/> stationary flag uses SCMD_StationaryAttack instead where plan file is ignored and squad does not pursue its target See Command_Squad for a list of all the possible squadCommands |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1159) |
Void Command_SquadSquadExt( PlayerID player, SGroupID sgroup, Integer squadCommand, SGroupID target, Integer cmdparam, Boolean queued ) | |
Send a squad command to a squad group with custom data |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1077) |
Void Command_SquadSquadLoad( PlayerID player, SGroupID sgroup, Integer squadCommand, SGroupID target, Boolean bOverLoad, Boolean bQueued ) | |
Send special squad command to a squad group with squad load parameters This is a special command for loading squads into vehicle (squad) holds (SCMD_Load, SCMD_InstantLoad) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (1870) |
Void Command_SquadUpgrade( PlayerID player, SGroupID sgroup, UpgradeBlueprint upgrade, Boolean instant, Boolean queued ) | |
Sends an upgrade command to a squad group. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaCommand.cpp] (615) |
Core |
Functions |
Void Event_Delay( Real seconds ) | |
Pauses for a given amount of time. This function MUST be called from a CTRL object in NISlet events only! See Event_Start for more information on NISlet events. |
|
Source: [DLL, from file /Cross/SimEngine/Scar/Scar.cpp] (1349) |
Boolean Event_IsRunning( LuaFunction f ) | |
Returns true if a given event is running |
|
Source: [DLL, from file /Cross/SimEngine/Scar/Scar.cpp] (1342) |
Void Event_Skip( Void ) | |
Completes execution of the event immediatley (all calls to Wait() are ignored) |
|
Source: [DLL, from file /Cross/SimEngine/Scar/Scar.cpp] (1330) |
Void Event_Start( LuaFunction eventFunction, Integer priority ) | |
Starts event. Event will not start until all rules are evaluated for this frame! We allow saving events in multiplayer so please don't put any non-UI events in multiplayer Running events are not saved at all. |
|
Source: [DLL, from file /Cross/SimEngine/Scar/Scar.cpp] (1315) |
Void Event_StartEx( LuaFunction eventFunction, Integer priority, LuaFunction onComplete ) | |
Starts an event the same way as Event_Start, but calls a user defined function when the event is over |
|
Source: [DLL, from file /Cross/SimEngine/Scar/Scar.cpp] (1321) |
String Misc_GetScarFullFilename( Void ) | |
Returns the full path name to the main SCAR script |
|
Source: [DLL, from file /Cross/SimEngine/Scar/Scar.cpp] (1360) |
Void Scar_AddInit( LuaFunction f ) | |
Register an init function with the scar system. This init function will be called when scar is started up.<BR/> **Important: Make sure you do not register two functions with the same name; the init function names should be unique. |
|
Source: [DLL, from file /Cross/SimEngine/Scar/Scar.cpp] (1244) |
Boolean Scar_InitExists( LuaFunction f ) | |
Returns true if an init function exists |
|
Source: [DLL, from file /Cross/SimEngine/Scar/Scar.cpp] (1283) |
Void Scar_RemoveInit( LuaFunction f ) | |
Unregister an init function that was registered from Scar_AddInit |
|
Source: [DLL, from file /Cross/SimEngine/Scar/Scar.cpp] (1271) |
Void TimeRule_Add( LuaFunction f, Integer priority ) | |
Add a rule to be executed every frame |
|
Source: [DLL, from file /Cross/SimEngine/Scar/LuaRuleSystem.cpp] (600) |
Void TimeRule_AddInterval( LuaFunction f, Real interval, Integer priority ) | |
Add a rule to be executed at every 'interval' seconds |
|
Source: [DLL, from file /Cross/SimEngine/Scar/LuaRuleSystem.cpp] (624) |
Void TimeRule_AddIntervalEx( LuaFunction f, Real delay, Real interval, Integer calls, Integer priority ) | |
Add a rule to be executed 'calls' times, at every 'interval' seconds |
|
Source: [DLL, from file /Cross/SimEngine/Scar/LuaRuleSystem.cpp] (612) |
Void TimeRule_AddOneShot( LuaFunction f, Real interval, Integer priority ) | |
Add a rule to be executed once, after 'interval' seconds |
|
Source: [DLL, from file /Cross/SimEngine/Scar/LuaRuleSystem.cpp] (630) |
Void TimeRule_ChangeInterval( LuaFunction f, Real interval ) | |
Change 'interval' seconds of an existing rule |
|
Source: [DLL, from file /Cross/SimEngine/Scar/LuaRuleSystem.cpp] (636) |
Boolean TimeRule_Exists( LuaFunction f ) | |
Test if a rule is currently active |
|
Source: [DLL, from file /Cross/SimEngine/Scar/LuaRuleSystem.cpp] (472) |
Void TimeRule_Remove( LuaFunction f ) | |
Remove a currently active rule |
|
Source: [DLL, from file /Cross/SimEngine/Scar/LuaRuleSystem.cpp] (509) |
Void TimeRule_RemoveAll( Integer maxpriority ) | |
Kills all rules. |
|
Source: [DLL, from file /Cross/SimEngine/Scar/LuaRuleSystem.cpp] (488) |
Void TimeRule_RemoveMe( Void ) | |
Remove a currently executing rule (only works inside a rule function) |
|
Source: [DLL, from file /Cross/SimEngine/Scar/LuaRuleSystem.cpp] (532) |
Void TimeRule_Replace( LuaFunction oldf, LuaFunction newf ) | |
Source: [DLL, from file /Cross/SimEngine/Scar/LuaRuleSystem.cpp] (548) |
DesignerLib |
Functions |
Void ATGun_AddGroup( SGroupID/EGroupID group, PlayerID player[, Table facingdirections, Integer currentfacing, Integer reinforcecount, EGroupID/SGroupID/MarkerID/Pos reinforcespawnlocation], Boolean threatarrow ) | |
Add a gun to the gun manager. The manager will take care of turning it around to attack units, and optionally reinforcing it if the crew is killed. If you pass in an EGroup, it will automatically find or create a corresponding SGroup with sg_ instead of the eg_ prefix. |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (1549) References: [AT+Gun+Manager] |
Void ATGun_RemoveDirections( SGroupID/EGroupID/SyncWeaponID gun ) | |
Remove's the direction settings for a gun, turning it into a fire-at-anything type. Use this if you are relocating a gun. Also removes any special first-trigger speech if you have any hooked up, as it may no longer be suitable if you're moving it. |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (1614) References: [AT+Gun+Manager] |
Void ATGun_RemoveGroup( SGroupID/EGroupID/SyncWeaponID gun ) | |
Remove a gun from the gun manager. |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (1582) References: [AT+Gun+Manager] |
Void AutoCharge_AddSGroup( SGroupID sgroup, MarkerID/Position/EGroupID triggerarea[, Real triggerrange, LuaFunction onTrigger] ) | |
Sets an sgroup to charge a position when the player steps into the trigger zone |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (590) |
Void AutoCharge_RemoveAll( ) | |
Stops monitoring all squads from the auto-charge functions |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (650) |
Void AutoCharge_RemoveSGroup( SGroupID sgroup ) | |
Removes a squad from being monitored by the auto-charge functions |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (627) |
Void AutoCinematic( Boolean in/out, Real seconds ) | |
Toggles all cinematic related settings. true = go to cinematic, false = go back to normal |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (80) |
Void AutoReinforce_RemoveAll( ) | |
Stops monitoring all squads from the auto-reinforce functions |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (340) |
Void AutoReinforce_RemoveSGroup( SGroupID sgroup ) | |
Removes an SGroup from the auto-reinforce functions |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (318) |
Void AutoRetreat_AddSGroup( SGroupID sgroup, MarkerID/Position/EGroupID destination[, Real threshold, LuaFunction onTrigger] ) | |
Sets an sgroup to retreat to the given destination or building once pinned for a certain duration, or reduced to a third of it's original size The optional threshold value should be a percentage (between 0.0 and 1.0) - when the member count drops below this, they retreat |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (426) |
Void AutoRetreat_RemoveAll( ) | |
Stops monitoring all squads from the auto-retreat functions |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (487) |
Void AutoRetreat_RemoveSGroup( SGroupID sgroup ) | |
Removes a squad from being monitored by the auto-retreat functions |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (464) |
Void AutoTerritory_AddEGroup( EGroupID egroup[, EGroupID egroup2, EGroupID egroup3...] ) | |
Adds a territory to the automanager. You specify the territory by passing in an EGroup containing the flag. |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (848) |
Void AutoTerritory_RemoveAll( ) | |
Removes all territories from the automanager and shuts the system down. |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (920) |
Void AutoTerritory_RemoveEGroup( EGroupID egroup[, EGroupID egroup2, EGroupID egroup3...] ) | |
Removes a territory from the automanager. You specify the territory by passing in an EGroup containing the flag. |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (884) |
Void BridgeTerritory_Add( EGroupID bridge_egroup, EGroupID bridgepoint, EGroupID bank1point, EGroupID bank2point ) | |
Add a bridge to the Bridge Territory Manager. bridgepoint, bank1point and bank2point should be egroups each containing one territory flag |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (1810) References: [Bridge+Territory+Manager] |
Void Ceasefire_AddSGroup( SGroupID sgroup[, LuaFunction function] ) | |
Stops an SGroup from auto-targetting, until one of their members is explicity given an attack order or Ceasefire_RemoveSGroup() is called (at which point they all start firing again) You can optionally specify a function that will be called when the ceasefire is broken by the game (rather than by calling Ceasefire_RemoveSGroup) |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (733) |
Void Ceasefire_RemoveSGroup( SGroupID sgroup ) | |
Removes the ceasefire effect from an sgroup. This may already have been removed by issuing an attack order directly to the group. |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (760) |
Void Game_DefaultGameRestore( ) | |
Restores various aspects of the single player game after loading a mission from a save game |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (1991) |
Void Resources_Disable( ) | |
Disables any resource income - useful to stop resources accruing during the opening movie |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (1950) |
Void Resources_Enable( ) | |
Re-enables resource income. |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (1968) |
Void ShootTheSky_AddSyncWeapon( SyncWeaponID syncweapon, PlayerID player ) | |
Forces a sync weapon to shoot at the sky, so long as it's manned by a given player. |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (1041) |
Void ShootTheSky_RemoveAll( ) | |
Stops all sync weapons from going through their "shooting at the sky" routine. |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (1104) |
Void ShootTheSky_RemoveSyncWeapon( SyncWeaponID syncweapon ) | |
Removes a sync weapon from the "shoot at the sky" system. It can then target people again. |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (1068) |
Void SmokeEntrance_Do( MarkerID marker ) | |
Triggers smoke to come in from the map edge, at the position and direction of the given marker |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (1445) |
Item/Table Table_GetRandomItem( Table table[, Integer numberofitems] ) | |
Returns a random item from a table. You can return multiple items (without duplicates) by passing in an optional number parameter. |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (1905) |
Void Util_AI_Setup( playerID Player, table CapLimits, playerID Target, int AI_difficulty, int ProdTemplate, int Aggression, int Preference, int Counter ) | |
Utility wrapper to setup the AI. Visit Scardoc to read the extended description. <BR/> An example use:<BR/> Util_AI_Setup(player5, 10, player1, 1, 6, 5, 2, 3)<BR/> player5 = the AI player <BR/> 10 = the popcap override value <BR/> player1 = the main target for the AI <BR/> 1 = the difficulty setting <BR/> 6 = the AI production template table entry <BR/> 5 = the aggression setting, 1-5, 5 is the most aggressive <BR/> 2 = the unit preference, 1-5, 1 is infantry heavy, 5 is vehicle heavy<BR/> 3 = the counter preference, 1-5, 1 is anti-infantry, 5 is anti-vehicle<BR/> <BR/> |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (104) |
Void Util_SpawnRaft( PlayerID player, EGroupID eg_raft, SGroupID sgroup, SquadBlueprint/Table sbp, Positon spawn, Position land, [Integer numsquads, Integer loadout] ) | |
Spawns a raft that will travel from the spawn location to a specified landing location. Note: the raft does not know the difference between land and water and will travel over all of it. |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (2030) |
EGroup |
Functions |
Void EGroup_Add( EGroupID group, EntityID entity ) | |
Adds an entity to the end of a group if the group doesnt already have it. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (156) |
Void EGroup_AddEGroup( EGroupID group, EGroupID grouptoadd ) | |
Appends the entities in one group to another group. All entities from 'grouptoadd' will be added to 'group'.<BR/> If 'group' already contains an entity from 'grouptoadd' it will not be added.<BR/> This function does not clear the contents of 'grouptoadd'.<BR/> Example: Add group2 (0, 10, 11, 22) to group1 (1, 11, 20) --> group1 would now be (1, 11, 20, 0, 10, 22)<BR/> |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (134) |
Boolean EGroup_CanSeeEGroup( EGroupID egroup, EGroupID targetegroup, Boolean all ) | |
Returns true if ALL or ANY entities in a group can see ALL or ANY entities in a given egroup. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (458) |
Boolean EGroup_CanSeeSGroup( EGroupID egroup, SGroupID targetsgroup, Boolean all ) | |
Returns true if ALL or ANY entities in a group can see ALL or ANY squads in a given sgroup. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (470) |
Void EGroup_Clear( EGroupID egroup ) | |
Removes all entities from a group |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (123) |
Boolean EGroup_Compare( EGroupID group1, EGroupID group2 ) | |
Returns true if the contents of the two groups are equal. Order of the entities does not matter. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (150) |
Boolean EGroup_ContainsBlueprints( EGroupID egroup, BP/Table blueprint, Boolean all ) | |
Check if a group contains ALL or ANY of the blueprints. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (592) |
Boolean EGroup_ContainsEGroup( EGroupID egroup1, EGroupID egroup2, Boolean all ) | |
Returns true if EGroup1 contains ANY or ALL of EGroup2 |
|
Source: [WW2Data.sga/Scar/Groups.scar] (820) |
Boolean EGroup_ContainsEntity( EGroupID egroup, EntityID entity ) | |
Returns true if EGroup contains a particular EntityID |
|
Source: [WW2Data.sga/Scar/Groups.scar] (802) |
Integer EGroup_Count( EGroupID egroup ) | |
Returns the total number of spawned and despawned entities in a group. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (105) |
int EGroup_CountAlive( EGroupID egroup ) | |
Get the number of alive entities (both spawned and despawned) |
|
Source: [WW2Data.sga/Scar/Groups.scar] (686) |
Integer EGroup_CountDeSpawned( EGroupID egroup ) | |
Returns the number of despawned entities in a group. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (117) |
Integer EGroup_CountSpawned( EGroupID egroup ) | |
Returns the number of spawned entities in a group. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (111) |
EGroupID EGroup_Create( String name ) | |
Returns a new entity group with the given name. Entity groups are used for buildings and objects such as rocks and trees.<BR/> If you need to issue orders to a group vehicles or units you must use a SquadGroupObs. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (64) |
EGroupID EGroup_CreateIfNotFound( String egroupname ) | |
Find a entity group from name. Creates a new one with given name if it doesnt exist. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (482) |
Void EGroup_CreateKickerMessage( EGroupID group, LocString textid ) | |
Create and display kicker message on the each entity in the egroup to the player |
|
Source: [WW2Data.sga/Scar/Groups.scar] (833) |
Void EGroup_DeSpawn( EGroupID egroup ) | |
Despawn all spawned entities in a group. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (675) |
Void EGroup_Destroy( EGroupID egroup ) | |
Manually destroy a group that you dont need anymore. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (84) |
Void EGroup_DestroyAllEntities( EGroupID egroup ) | |
Destroys all spawned and despawned entities in a group. Be careful not to confuse this with EGroup_Destroy which destroys the group and NOT the items it contains. This function will destroy spawned and despawned items in a group |
|
Source: [WW2Data.sga/Scar/Groups.scar] (580) |
Void EGroup_Duplicate( EGroupID egroupid1, EGroupID egroupid2 ) | |
Duplicates an EGroup Creates a copy of egroup1 in egroup2. The function will clear egroup2 beforehand if necessary. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (960) |
Void EGroup_EnableMinimapIndicator( EGroupID egroup, Boolean enable ) | |
Enables or disables the minimap indicator for all entities in a group |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1278) |
Boolean EGroup_Exists( String name ) | |
Returns true if the entity group with the given name exists |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (222) |
Void EGroup_Filter( EGroupID egroup, String/ID/Table blueprint, Integer filtertype ) | |
Filters an EGroup by blueprint. Blueprints can be provided by name or by ID, and in a table if you want to filter on more than one type. Setting filtertype to FILTER_KEEP results in the group only containing entities of the types listed in the blueprint table. Setting filtertype to FILTER_REMOVE will strip those same entities out and leave those that aren't of the types listed. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (882) |
Void EGroup_FilterUnderConstruction( EGroupID egroup, Integer filtertype ) | |
Filters an EGroup by construction status. Setting filtertype to FILTER_KEEP results in the group only containing those entities that are in the process of being built. Setting filtertype to FILTER_REMOVE will strip those same entities out and leave those that are complete. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (927) |
Boolean EGroup_ForEach( EGroupID egroup, LuaBinding::StackVarFunction f ) | |
Call a lua function for each item in a group. Function will recieve (groupid, itemindex, itemid) and should return true to break or false to continue. function Rule_Test( )<BR/> <TAB/>local DespawnEntity = function( egroupid, itemindex, entityID )<BR/> <TAB/><TAB/>Entity_Despawn( entityID )<BR/> <TAB/>end<BR/><BR/> <TAB/>EGroup_ForEach( EGroup_FromName("eg_PlayersHQ"), DespawnEntity )<BR/> end<BR/> Note: This function iterates over SPAWNED ENTITIES ONLY. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (343) |
Boolean EGroup_ForEachAllOrAny( EGroupID egroup, Boolean all, LuaBinding::StackVarFunction f ) | |
Call a lua function for each item in a group. Function will recieve (groupid, itemindex, itemid) and should return a bool. Only use this to TEST conditions on entities. DO NOT use this to perform operations on all entities, since it may not call your function on all entities (due to short circuit evaluation). This is used for checking if ALL or ANY items in a group match a given predicate. (eg. Are all items in a group choas marines)<BR/> Note: This function iterates over SPAWNED ENTITIES ONLY. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (329) |
Boolean EGroup_ForEachAllOrAnyEx( EGroupID egroup, Boolean all, LuaBinding::StackVarFunction f, Boolean spawned, Boolean despawned ) | |
Same as EGroup_ForEachAllOrAny except you have a choice to iterate over spawned entities, despawned entities, or both. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (236) |
Boolean EGroup_ForEachEx( EGroupID egroup, LuaBinding::StackVarFunction f, Boolean spawned, Boolean despawned ) | |
Same as EGroup_ForEach except you have a choice to iterate over spawned entities, despawned entities, or both. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (282) |
EGroupID EGroup_FromName( String name ) | |
Find an entity group with a given name. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (90) |
Real EGroup_GetAvgHealth( EGroupID egroup ) | |
Returns the average health of all units in a entity group. This uses the "proper" measure of health for panel buildings, so should accurately reflect what the user sees. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (521) |
EntityID EGroup_GetDeSpawnedEntityAt( EGroupID group, Integer index ) | |
Returns the despawned entity at the given index. Use EGroup_GetSpawnedEntityAt if you want the spawned items in the group<BR/> Use index 1 to get the first entity in the group.<BR/> It is an error if index > EGroup_GetCountDeSpawned()<BR/> |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (191) |
Boolean EGroup_GetInvulnerable( EGroupID egroup, Boolean all ) | |
Check invulnerablity state for ALL or ANY entity in an entity group. Set all param to true to check for ALL or set to false to check for ANY. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (649) |
Void EGroup_GetLastAttacker( EGroup EGroupVictim, SGroup SGroupAttacker ) | |
Gets the last attacker(s) for all the entities in an EGroup Gets the last attacker for all the squads in an SGroup and stores that in SGroupAttacker |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1250) |
String EGroup_GetName( EGroupID egroup ) | |
Returns the name of a given entity group. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (230) |
Integer EGroup_GetNumCombatSlots( EGroupID egroup, String holdTypeName ) | |
Returns the number of combat slots in total of a certain hold-able type |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1011) |
Position EGroup_GetOffsetPosition( EGroupID egroup, Integer offset, Real value ) | |
Returns a position (a certain distance away) relative to an entity's current position/orientation. see LuaConsts.scar for explanation of 'offset' parameter |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1187) |
Position EGroup_GetPosition( EGroupID group ) | |
Returns the center position of an entity group. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (207) |
EntityID EGroup_GetRandomSpawnedEntity( EGroup egroupid ) | |
Get a random spawned entity from egroup |
|
Source: [WW2Data.sga/Scar/Groups.scar] (704) |
Table EGroup_GetSequence( String name ) | |
Builds a table of EGroupIDs that are named in a sequence. i.e. a name of "eg_building" will find groups "eg_building1", "eg_building2" and so on, up until it looks for a group that isn't there. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1084) |
EntityID EGroup_GetSpawnedEntityAt( EGroupID group, Integer index ) | |
Returns the spawned entity at the given index. Use EGroup_GetDeSpawnedEntityAt if you want the despawned items in the group<BR/> Use index 1 to get the first entity in the group.<BR/> It is an error if index > EGroup_GetCountSpawned()<BR/> |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (172) |
Real EGroup_GetSpread( EGroupID egroup ) | |
Returns the distance from the centre of the group of the entity that furthest out. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1059) |
Void EGroup_GetSquadsHeld( EGroupID egroup, SGroupID sgroupRecipient ) | |
Returns an sgroup containing all squads held by any entities in an egroup |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1172) |
Boolean EGroup_HasUpgrade( EGroupID egroup, UpgradeID upgrade, Boolean all ) | |
Returns whether ANY or ALL entities in an EGroup have the specified upgrade |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1027) |
Void EGroup_Hide( EGroupID egroup, Bool hide ) | |
Hide or show all entities in an EGroup Bool should be true to hide, false to show |
|
Source: [WW2Data.sga/Scar/Groups.scar] (748) |
Void EGroup_InstantCaptureStrategicPoint( EGroupID egroup, PlayerID player ) | |
Change the ownership of a Strategic Point |
|
Source: [WW2Data.sga/Scar/Groups.scar] (733) |
Void EGroup_InstantRevertOccupiedBuilding( EGroupID egroup ) | |
Reverts an occupied building |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1263) |
Void EGroup_Intersection( EGroupID group, EGroupID grouptointersect ) | |
Performs a group intersection. Only entities that are in both groups will be added to 'group'.<BR/> The contents of 'grouptointersect' will not be changed.<BR/> Example: group = (1,2,3,4,5,6) grouptointersect = (2,4,6,8,10) --> group will now equal (2,4,6) |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (144) |
Boolean EGroup_IsCapturedByPlayer( EGroupID egroup, PlayerID playerId, Boolean all ) | |
Returns true if all or any strategic points in a group have been captured. Use ANY or ALL. This function will ignore all entities that cannot be captured and will return false if no entities in the group can be captured. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (497) |
Boolean EGroup_IsDoingAttack( EGroupID egroup, Boolean all, Float time ) | |
Returns true if ALL or ANY entities are attacking within the time |
|
Source: [WW2Data.sga/Scar/Groups.scar] (446) |
Boolean EGroup_IsEmpty( EGroupID egroup ) | |
Returns true if a named entity group contains no spawned or despawned entities |
|
Source: [WW2Data.sga/Scar/Groups.scar] (489) |
Void EGroup_IsHoldingAny( EGroupID egroup ) | |
Returns whether any entity in an EGroup has a hold on anything |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1157) |
Boolean EGroup_IsInCover( EGroupID egroup, Boolean all ) | |
Returns true if ALL or ANY entities are in cover. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (410) |
Boolean EGroup_IsMoving( EGroupID egroupid, Boolean all ) | |
Returns true if ANY or ALL entities in an EGroup are moving. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (846) |
Bool EGroup_IsOnScreen( PlayerID player, EGroupID group, Bool all[, Float percent] ) | |
Returns true if ANY or ALL (use those keywords) of the enities in the group are present onscreen. You can pass in a percentage of the screen to check, so 0.8 would be a centered rectangle occupying 80% of the screen. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (973) |
Boolean EGroup_IsProducingSquads( EGroupID egroup, Boolean all ) | |
Returns true if ALL or ANY entities in a group are currently producing squads Set all to true to check for ALL or set to false to check for ANY |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1216) |
Boolean EGroup_IsUnderAttack( EGroupID egroup, Boolean all, Float time ) | |
Returns true if ALL or ANY entities are under attack within the time |
|
Source: [WW2Data.sga/Scar/Groups.scar] (421) |
Bool EGroup_IsUnderAttackByPlayer( EGroupID group, PlayerID attackerplayer, Float duration ) | |
Check if the entities are attacked by the player |
|
Source: [WW2Data.sga/Scar/Groups.scar] (781) |
Boolean EGroup_IsUnderAttackFromDirection( EGroupID egroup, Boolean all, Integer/Table offset, Float time ) | |
Returns true if ALL or ANY entities are under attack from a direction within the time. see LuaConsts.scar for types of directions. you can pass in a table of offsets |
|
Source: [WW2Data.sga/Scar/Groups.scar] (433) |
Boolean EGroup_IsUsingAbility( EGroupID egroup, Boolean ALL ) | |
Checks if ANY or ALL squads within an EGroup are using an ability also used for emplacements/entities that are built but function through the use of squads. Does not check WHAT ability a squad is using. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1229) |
Void EGroup_Kill( EGroupID egroup ) | |
Kill all entities in an EGroup |
|
Source: [WW2Data.sga/Scar/Groups.scar] (763) |
Void EGroup_Remove( EGroupID group, EntityID entity ) | |
Removes an entity from a group. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (162) |
Void EGroup_RemoveDemolitions( EGroupID egroup ) | |
Removes all demolition charges on an egroup |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1299) |
Void EGroup_RemoveGroup( SGroupID group, SGroupID grouptoremove ) | |
Remove from the first SGroup all squads contained in the second SGroup. SGroup2 remains untouched. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1201) |
Void EGroup_ReSpawn( EGroupID egroup ) | |
Respawn all despawned entities in a group. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (664) |
Void EGroup_SetAnimatorAction( EGroupID egroup, String actionName ) | |
Trigger animation action for an EGroup. Please only use this for simple animations |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1106) |
Void EGroup_SetAnimatorEvent( EGroupID egroup, String eventName ) | |
Set animation event for an EGroup. Please only use this for simple animations |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1119) |
Void EGroup_SetAnimatorState( EGroupID egroup, String stateMachineName, String stateName ) | |
Set animation state of a state machine for an EGroup. Please only use this for simple animations |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1132) |
Void EGroup_SetAnimatorVariable( EGroupID egroup, String variableName, Real value ) | |
Set animation variable value for an EGroup. Please only use this for simple animations |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1145) |
Void EGroup_SetAutoTargetting( EGroupID group, String hardpoint, Bool enable ) | |
Sets whether a weapon to auto-target things or not |
|
Source: [WW2Data.sga/Scar/Groups.scar] (989) |
Real EGroup_SetAvgHealth( EGroupID egroup, Real healthPercent ) | |
Sets the health of each unit in an entity group to a given percent [0.0, 1.0]. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (550) |
Void EGroup_SetCrushable( EGroupID egroup, Boolean crushable ) | |
Overrides crushable behavior for an egroup |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1285) |
Void EGroup_SetHealthMinCap( EGroupID egroup, float minhealth ) | |
Set the minimum health for this entity This is usually set to zero, any higher value prevents the entity from having its health reduced below this given value |
|
Source: [WW2Data.sga/Scar/Groups.scar] (634) |
Void EGroup_SetInvulnerable( EGroupID egroup, Boolean enabled[, Float reset_time] ) | |
Enable/Disable invulnerablity for an entire entity group. Use true and false for simple on/off, or use a number between 0.0 and 1.0 for more precise control on how much damage an entity can take before it takes no more. The optional reset_time is used to automatically remove invulnerability after a set time. If invulnerable, both health and critical damage are disabled. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (611) |
Void EGroup_SetPlayerOwner( EGroup egroup, PlayerID owner ) | |
Changes the player owner for all spawned and despawned entities of an EGroup. Strategic/capturable point does not support setting player owner directly |
|
Source: [WW2Data.sga/Scar/Groups.scar] (564) |
Void EGroup_SetSelectable( EGroupID egroup, Bool selectable ) | |
Set player selectable state of entities in the egroup |
|
Source: [WW2Data.sga/Scar/Groups.scar] (723) |
Void EGroup_SetStrategicPointNeutral( EGroupID egroup ) | |
Sets a strategic point to neutral (not owned by any team) |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1292) |
EGroupID EGroup_Single( EGroupID egroup, entityID entity ) | |
Creates an entity group containing a single entity Creates an EGroup containing just one entity, creating the group if it doesn't exist and clearing it if it does. It returns the name of the EGroup. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (864) |
Boolean SGroup_HasEntityUpgrade( EGroupID egroup, UpgradeID upgrade, Boolean all ) | |
Returns true if ANY or ALL of the squad's entities have the specified upgrade |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1040) |
Entity |
Functions |
Void EGroup_NotifyOnPlayerDemolition( EGroupID id, LuaFunction function ) | |
Calls a function when any entity in an EGroup gets destroyed by the player clicking the "Detonate me" button |
|
Source: [WW2Data.sga/Scar/Entity.scar] (71) |
Void EGroup_SetDemolitions( PlayerID player, EGroupID egroupid[, Integer numcharges] ) | |
Instantly wires a building for demolitions |
|
Source: [WW2Data.sga/Scar/Entity.scar] (83) |
Void Entity_BuildingPanelInfo( EntityID pEntity, Position cam, Position terrain ) | |
Displays info about the panel that is intersected by the passed in ray |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModExtensions.cpp] (97) |
Boolean Entity_CanAttackNow( EntityID attacker, Position target ) | |
Returns whether an entity can attack a target without moving or turning. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (926) |
Boolean Entity_CanLoadSGroup( EntityID entity, SGroupID loadthis, Boolean bCheckSquadState, Boolean bOverload ) | |
Check if the entity can load an sgroup or not |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (712) |
Boolean Entity_CanLoadSquad( EntityID entity, SquadID squad, Boolean bCheckSquadState, Boolean bOverload ) | |
Check if the entity can load squad or not |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (706) |
Boolean Entity_CanSeeEntity( EntityID entity, EntityID target ) | |
Returns true if a target entity is in the entities sight radius |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (404) |
Boolean Entity_CanSeeSquad( EntityID entity, SquadID target ) | |
Returns true if a target squad is in the squads sight radius |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (416) |
Void Entity_ClearPostureSuggestion( EntityID entity ) | |
Clears any previous posture suggestions made to an entity |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModExtensions.cpp] (217) |
EntityID Entity_Create( EntityBlueprint ebp, PlayerID player, Position pos, Position toward ) | |
Creates an entity at a given position and assigns it to a given player. 'blueprint' is a string value containing the name of the entity blueprint. This function does not spawn the entity so you will need to call Entity_Spawn to see this entity |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaentity.cpp] (43) |
EntityID Entity_CreateENV( EntityBlueprint ebp, Position pos, Position toward ) | |
Creates an entity at a given position and assigns it to a given player. 'blueprint' is a string value containing the name of the entity blueprint. This function spawns the entity so there is no need to call Entity_Spawn |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaentity.cpp] (55) |
Void Entity_DeSpawn( EntityID entity ) | |
DeSpawn the entity at its current position |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaentity.cpp] (143) |
Void Entity_Destroy( EntityID entity ) | |
Remove an entity from the world and destroy it. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaentity.cpp] (69) |
Boolean Entity_DisableBuildingDeath( EntityID pEntity, Boolean bDisableDeath ) | |
Disables the death of the given entity building, only works for panel based destructible buldings |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModExtensions.cpp] (108) |
Void Entity_DoBuildingDamageRay( EntityID pEntity, Position cam, Position terrain, Integer dmgType, Real radius ) | |
Damages this entity but only if its a destructible building dmgType of 0 is damage accessory, 1 is damage panel, 2 is destroy panel and 3 is destroy radius |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModExtensions.cpp] (71) |
Void Entity_EnableAttention( EntityID entity, Boolean attentive ) | |
Sets whether an entity pays attention to its surroundings |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (960) |
Void Entity_EnableProductionQueue( EntityID entity, Boolean enable ) | |
Sets whether an entity can produce anything (including upgrades) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (261) |
Void Entity_ForceConstruct( EntityID e ) | |
Force constructs this entity but only if its a building |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (446) |
EntityID Entity_FromWorldID( Integer id ) | |
Get an entity from a mission editor ID. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaentity.cpp] (76) |
Integer Entity_GetActiveCommand( EntityID entity ) | |
Returns the active entity command. Some valid entity commands: STATEID_StructureBuilding, STATEID_Dead, STATEID_Idle, STATEID_Pause |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (231) |
EntityBlueprint Entity_GetBlueprint( EntityID entity ) | |
Returns the entity's blueprint |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaentity.cpp] (189) |
Real Entity_GetBuildingProgress( EntityID pEntity ) | |
Returns the construction progress (with range [0.0, 1.0] for a given entity. Returns 0.0 if the entity is not a building. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (428) |
Real Entity_GetCoverValue( EntityID entity ) | |
Get cover safety value from the where the entity is standing. The safety value is number from -.5 to .5. Higher value means better cover. If the entity doesn't have cover_ext, value of 0 would be returned |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (727) |
Integer Entity_GetGameID( EntityID entity ) | |
Returns the entities unique id in the world |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaentity.cpp] (195) |
Position Entity_GetHeading( EntityID entity ) | |
Returns the heading of the entity. The heading is currently a lua table with three entries (x, y, z) |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaentity.cpp] (110) |
Real Entity_GetHealth( EntityID entity ) | |
Returns the health of an entity. Health will be zero for entities with no health extension. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (149) |
Real Entity_GetHealthMax( EntityID entity ) | |
Returns the max health of an entity. Max health will be zero for entities with no health extension. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (163) |
Real Entity_GetHealthPercentage( EntityID entity ) | |
Returns the percentage health, taking into account destructible buildings Health will be zero for entities with no health extension nor building destruction |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (177) |
Bool Entity_GetInvulnerable( SquadID squad ) | |
Check if the entity is invulnerable or not |
|
Source: [WW2Data.sga/Scar/Entity.scar] (34) |
Real Entity_GetInvulnerableMinCap( EntityID entity ) | |
Returns the invulnerable point in terms of percentage For buildings, retrieve the percentage value of healthy below which no more panels could be destroyed |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (579) |
Void Entity_GetLastAttacker( EntityID entity, SGroupID group ) | |
Find the last squad attacker on this entity. If found, the squad is added to the sgroup |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (356) |
Void Entity_GetLastAttackers( EntityID entity, SGroupID group, Real timeSeconds ) | |
Find the squad attackers on this entity from the last seconds specified. If found, the squads are added to the sgroup. Building attackers are ignored |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (371) |
Integer Entity_GetNumCombatSlots( EntityID entity, String holdTypeName ) | |
Returns the number of combat slots in total of a certain hold-able type |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (687) |
Position Entity_GetOffsetPosition( EntityID entity, Integer offset, Real distance ) | |
Returns a position relative to an entity's current position and orientation. see LuaConsts.scar for explanation of 'offset' parameter. |
|
Source: [WW2Data.sga/Scar/Entity.scar] (98) |
PlayerID Entity_GetPlayerOwner( EntityID entity ) | |
Returns the Player owner of the given entity. Entity MUST NOT be owned by the world. Use World_OwnsEntity to make sure entity is not owned by the world before calling this function |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaentity.cpp] (153) |
Position Entity_GetPosition( EntityID entity ) | |
Returns the position of the entity. The position is currently a lua table with three entries (x, y, z) |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaentity.cpp] (98) |
Blueprint Entity_GetProductionQueueItem( EntityID entity, Integer index ) | |
Returns the blueprint for a production queue item with index. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (268) |
Integer Entity_GetProductionQueueItemType( EntityID entity, Integer index ) | |
Returns the production type (PITEM_Upgrade, PITEM_Spawn, PITEM_SquadUpgrade, PITEM_SquadReinforce, PITEM_PlayerUpgrade) for a production queue item with index. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (285) |
Integer Entity_GetProductionQueueSize( EntityID entity ) | |
Returns the number of items in the entities production queue. It is an error to call this function on an entity that does not have a production queue.<BR/> Use Entity_HasProductionQueue to check that the entity has a queue. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (240) |
Real Entity_GetSightInnerHeight( EntityID entity ) | |
Returns the inner sight radius for this entity Radius will be zero for entities without a sight extension |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (120) |
Real Entity_GetSightInnerRadius( EntityID entity ) | |
Returns the inner sight radius for this entity Radius will be zero for entities without a sight extension |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (92) |
Real Entity_GetSightOuterHeight( EntityID entity ) | |
Returns the outer sight radius for this entity Radius will be zero for entities without a sight extension |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (134) |
Real Entity_GetSightOuterRadius( EntityID entity ) | |
Returns the outer sight radius for this entity Radius will be zero for entities without a sight extension |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (106) |
SquadID Entity_GetSquad( EntityID pEntity ) | |
Returns the Squad for the passed Entity. (May be NULL) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (530) |
Boolean Entity_GetSquadsHeld( EntityID pEntity, SGroupID sgroup ) | |
Adds squads held by an entity to an SGroup |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (782) |
Integer Entity_GetTotalPanelCount( EntityID pEntity ) | |
Gets the total number of panels in a building (returns 0 for anything but panel based destructible buldings) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModExtensions.cpp] (125) |
Integer Entity_GetUndestroyedPanelCount( EntityID pEntity ) | |
Gets the current number of undestroyed panels in a building (returns 0 for anything but panel based destructible buldings) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModExtensions.cpp] (137) |
Boolean Entity_HasCritical( EntityID pEntity, CriticalBlueprint criticalPBG ) | |
Return true if the entity has the given criticalID applied to it |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (754) |
Boolean Entity_HasProductionQueue( EntityID entity ) | |
Returns true if an entity has a production queue. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (253) |
Boolean Entity_HasUpgrade( EntityID pEntity, UpgradeBlueprint upgradePBG ) | |
Return true if the entity has purchased the specified upgrade. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (748) |
Void Entity_InstantCaptureStrategicPoint( EntityID entity, PlayerID player ) | |
Strategic point will be captured instantly by the team of the supplied player |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (629) |
Void Entity_InstantRevertOccupiedBuilding( EntityID entity ) | |
Reverts an occupied building |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (676) |
Integer Entity_IsAlive( EntityID pEntity ) | |
Returns true if entity is still alive |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (539) |
Boolean Entity_IsAttacking( EntityID entity, Real time ) | |
Returns true if the entity is attacking within the time Time is in seconds |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (344) |
Boolean Entity_IsBuilding( EntityID e ) | |
Returns true if the given entity is a building |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (440) |
Boolean Entity_IsCamouflaged( EntityID entity ) | |
Returns whether the entity is camouflaged. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (914) |
Boolean Entity_IsCapturableBuilding( EntityID entity ) | |
Returns true if the entity is a capturable building |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (623) |
Boolean Entity_IsDemolitionReady( EntityID entity ) | |
Returns whether this entity's demolition charges are ready to be detonated |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (819) |
Integer Entity_IsEBPBuilding( EntityBlueprint ebp ) | |
Returns true if the given blueprint is a building |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (456) |
Boolean Entity_IsEBPObjCover( EntityBlueprint ebp ) | |
Returns true if the given blueprint is objcover |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (462) |
Boolean Entity_IsHoldingAny( EntityID entity ) | |
Check if the entity has a hold on anything |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (720) |
Boolean Entity_IsInCover( EntityID entityId ) | |
Returns true if entity is in cover. |
|
Source: [WW2Data.sga/Scar/Entity.scar] (10) |
Boolean Entity_IsMoving( EntityID pEntity ) | |
Returns whether an entity is moving. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (770) |
Boolean Entity_IsOfType( EntityID entity, String type ) | |
Determines if this entity is of the given type. Types are defined in type_ext/unit_type_list |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (200) |
Boolean Entity_IsPartOfSquad( EntityID pEntity ) | |
Returns true if the entity is part of a squad |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (524) |
Boolean Entity_IsStartingPosition( EntityID entity ) | |
Returns true if the entity is a starting position |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (617) |
Boolean Entity_IsStrategicPoint( EntityID entity ) | |
Returns true if the entity is a strategic point. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (611) |
Boolean Entity_IsStrategicPointCapturedBy( EntityID entity, PlayerID player ) | |
Returns true if strategic point is captured by the team of the player provided. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (664) |
Boolean Entity_IsSyncWeapon( EntityID entity ) | |
Return true if the entity is a team weapon |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (741) |
Boolean Entity_IsUnderAttack( EntityID entity, Real time ) | |
Returns true if the entity is under attack. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (301) |
Boolean Entity_IsUnderAttackByPlayer( EntityID entity, PlayerID pAttackerOwner, Real time ) | |
Returns true if the entity is under attack by a certain player |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (350) |
Boolean Entity_IsUnderAttackFromDirection( EntityID entity, Integer offset, Real timeSeconds ) | |
Returns true if the entity was under attack from a certain direction (8 offset types, see LuaConsts.scar) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (307) |
Boolean Entity_IsValid( Integer id ) | |
Check if an entity with the given ID can be found in the world |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaentity.cpp] (91) |
Boolean Entity_IsVehicle( EntityID pEntity ) | |
Returns whether an entity is a vehicle |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (776) |
Boolean Entity_IsVictoryPoint( Entity *pEntity ) | |
Returns true if entityID is a victory point |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (597) |
Void Entity_Kill( EntityID entity ) | |
Kill the entity. Sets health to 0, and triggers death effects. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (212) |
Void Entity_NotifyOnPlayerDemolition( Entity entity, LuaFunction function ) | |
Calls a function when an entity gets destroyed by the player clicking the "Detonate me" button next to an entity. |
|
Source: [WW2Data.sga/Scar/Entity.scar] (59) |
Void Entity_RemoveBoobyTraps( EntityID pEntityTarget ) | |
Removes all booby-traps on this entity |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (856) |
Void Entity_RemoveDemolitions( EntityID entity ) | |
Removes all demolition charges on an entity |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (904) |
Void Entity_SetAnimatorAction( EntityID pEntity, String actionName ) | |
Trigger animation action for an entity. Please only use this for simple animations |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (491) |
Void Entity_SetAnimatorActionParameter( EntityID pEntity, String actionParameterName, String actionParameterValue ) | |
Set animation action parameter for an entity. Please only use this for simple animations |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (480) |
Void Entity_SetAnimatorEvent( EntityID pEntity, String eventName ) | |
Set animation event for an entity. Please only use this for simple animations |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (469) |
Void Entity_SetAnimatorState( EntityID pEntity, String stateMachineName, String stateName ) | |
Set animation state of a state machine for an entity. Please only use this for simple animations |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (502) |
Void Entity_SetAnimatorVariable( EntityID pEntity, String variableName, Real value ) | |
Set animation variable value for an entity. Please only use this for simple animations |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (513) |
Void Entity_SetCrushable( EntityID entity, Boolean crushable ) | |
Overrides crushable behavior for an entity |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (950) |
Boolean Entity_SetDemolitions( PlayerID player, EntityID entity, Integer numcharges ) | |
Fully wires this entity for demolitions, if it's set up to be demolishable. 'player' is the one that owns the demolitions and can detonate them. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (829) |
Void Entity_SetHeading( EntityID entity, Position pos, Boolean bInterpolate ) | |
Sets the heading of the entity. The position is currently a lua table with three entries (x, y, z) |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaentity.cpp] (116) |
Void Entity_SetHealth( EntityID entity, Real healthPercent ) | |
Set the health of an entity. healthPercent must be in the range [0.0, 1.0]. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (184) |
Void Entity_SetInvulnerable( EntityID entity, Bool enable, Float reset_time ) | |
Set invulnerability on the entity. Reset time is in seconds. If it it set, the invulnerability will expire after this time. |
|
Source: [WW2Data.sga/Scar/Entity.scar] (17) |
Void Entity_SetInvulnerableMinCap( EntityID entity, Real minHealthPercentage, Real resetTime ) | |
Make an entity invulnerable to physical damage when health is below the minimum health percentage resetTime is the time in seconds that vulnerability will be restored.; zero time for reset time means the buff will last forever |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (556) |
Void Entity_SetPlayerOwner( EntityID entity, PlayerID owner ) | |
Changes the owner of the given squad. This function doesn't work with strategic/capturable point |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaentity.cpp] (170) |
Void Entity_SetPosition( EntityID entity, Position pos ) | |
Sets the position of the entity. The position is currently a lua table with three entries (x, y, z) |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaentity.cpp] (104) |
Void Entity_SetProjectileCanExplode( EntityID projectile, Boolean canExplode ) | |
Sets whether or not a projectile can explode. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (801) |
Void Entity_SetStrategicPointNeutral( EntityID entity ) | |
Sets a strategic point to neutral (not owned by any team) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (647) |
Void Entity_SimHide( EntityID entity, Boolean hide ) | |
Shows/hides the entity in the simulation |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (966) |
Void Entity_Spawn( EntityID entity ) | |
Spawn the entity at its current position |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaentity.cpp] (122) |
Void Entity_SuggestPosture( EntityID entity, unsigned posture, Real duration ) | |
Suggests a posture to an entity, lasting the passed duration Posture of 0 is prone, 1 is kneel/crouch, and 2 is standing. Duration is in seconds, negative means indefinate. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModExtensions.cpp] (206) |
Boolean Entity_SupportsDemolition( EntityID entity ) | |
Returns whether this entity is set up to have demolitions placed on it |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaEntity.cpp] (813) |
Void Entity_TagDebug( EntityID entity ) | |
Tags the entity to be used for debugging |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaentity.cpp] (201) |
Void Entity_VisHide( EntityID pEntity, Boolean bHide ) | |
Hides or shows an entity visually. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaentity.cpp] (208) |
Void ModMisc_MakeCasualtyAction( EntityID pTargetEntity ) | |
Make the passed entity a casualty by triggering the MakeCasualtyAction |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModMisc.cpp] (84) |
Void ModMisc_MakeWreckAction( EntityID pTargetEntity ) | |
Make the passed entity a wreck by triggering the MakeWreckAction |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModMisc.cpp] (73) |
Void ModMisc_OOCAction( EntityID pTargetEntity ) | |
Make the passed entity go out of control Triggers an OutOfControlAction on the unit. Does not trigger any actions associated with an OOC weapon hit critical, just the OOC action. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModMisc.cpp] (96) |
FOW |
Functions |
Void FOW_RevealAll( Void ) | |
Reveal FOW for all players |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaFOW.cpp] (335) |
Void FOW_RevealArea( Position pos, Real radius, Real durationSecs ) | |
Reveals a circular area for all alive players over a given duration. YOU SHOULD ONLY CALL THIS ONCE FOR EACH AREA. Pass in a duration of -1 for indefinite duration ( until unreveal is called ) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaFOW.cpp] (151) |
Void FOW_RevealEGroup( EGroupID group, Real durationSecs ) | |
Reveals an entity groups line of sight(LOS) for all alive players over a given duration. YOU SHOULD ONLY CALL THIS ONCE FOR EACH AREA. Pass in a duration of -1 for indefinite duration ( until the entities are dead ) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaFOW.cpp] (219) |
Void FOW_RevealEGroupOnly( EGroupID group, Real durationSecs ) | |
Reveals an entity groups in FOW for all alive players over a given duration. Pass in a duration of -1 for indefinite duration ( until the entities are dead ) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaFOW.cpp] (240) |
Void FOW_RevealEntity( EntityID entity, Real durationSecs ) | |
Reveals an entities line of sight (LOS) for all alive players over a given duration. YOU SHOULD ONLY CALL THIS ONCE FOR EACH AREA. Pass in a duration of -1 for indefinite duration ( until the entity is dead ) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaFOW.cpp] (187) |
Void FOW_RevealMarker( MarkerID marker, Real duration ) | |
Reveals an area the size of a given markers proximity at that markers position for a given amount of time. Pass in a duration of 1 for indefinite duration. YOU SHOULD ONLY CALL THIS ONCE FOR EACH AREA. This function will reveal the FOW for ALL alive players. This does not work with markers with rectangular proximity type |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (816) |
Void FOW_RevealSGroup( SGroupID group, Real durationSecs ) | |
Reveals a squad groups line of sight(LOS) for all alive players over a given duration. YOU SHOULD ONLY CALL THIS ONCE FOR EACH AREA. Pass in a duration of -1 for indefinite duration ( until the squads are dead ) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaFOW.cpp] (266) |
Void FOW_RevealSGroupOnly( SGroupID group, Real durationSecs ) | |
Reveals a squad groups in fow for all alive players over a given duration. YOU SHOULD ONLY CALL THIS ONCE FOR EACH AREA. Pass in a duration of -1 for indefinite duration ( until the squads are dead ) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaFOW.cpp] (287) |
Void FOW_RevealSquad( SquadID squad, Real durationSecs ) | |
Reveals a squads line if sight(LOS) for all alive players over a given duration. YOU SHOULD ONLY CALL THIS ONCE FOR EACH AREA. Pass in a duration of -1 for indefinite duration ( until the entity is dead ) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaFOW.cpp] (203) |
Void FOW_TagSGroup( PlayerID player, SGroupID group ) | |
Adds all items in a group to a given players FOW. Items line of sight will be visible until it is destroyed or UnTag is called. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaFOW.cpp] (313) |
Void FOW_UnRevealAll( Void ) | |
Use to undo a FOW_RevealAll |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaFOW.cpp] (351) |
Void FOW_UnRevealArea( Position pos, Real radius ) | |
UnReveals a circular area for all alive players. YOU SHOULD ONLY CALL THIS ONCE FOR EACH AREA. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaFOW.cpp] (171) |
Void FOW_UnRevealMarker( MarkerID marker ) | |
Unreveals an area the size of a given markers proximity at that markers position. YOU SHOULD ONLY CALL THIS ONCE FOR EACH AREA. This does not work with markers with rectangular proximity type |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (837) |
Void FOW_UnTagSGroup( PlayerID player, SGroupID group ) | |
Removes items from a players FOW that were added using FOW_TagSGroup |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaFOW.cpp] (324) |
ID |
Functions |
LuaTable EGroup_CreateTable( String format, Integer size ) | |
Returns a table of egroups NOT in the world builder See Marker_GetTable for more info on format parameter |
|
Source: [WW2Data.sga/Scar/UID.scar] (110) |
LuaTable EGroup_GetWBTable( String format ) | |
Returns a table of egroups from the world builder See Marker_GetTable for more info on format parameter |
|
Source: [WW2Data.sga/Scar/UID.scar] (90) |
LuaTable Marker_GetNonSequentialTable( String format, Integer size ) | |
Returns a fixed size table of markers from the world builder. Markers that do not exist in the WB, will be nil in the table. This is why we call it 'non-sequential' |
|
Source: [WW2Data.sga/Scar/UID.scar] (72) |
LuaTable Marker_GetTable( String format ) | |
Returns a table of markers from the world builder. Creates as many as it finds mkr_table = Marker_GetTable( 'mkr_%d' ) -- creates a table with 3 markers named 'mkr_1', 'mkr_2', and 'mkr_3' (and so on) from the WB<BR/><BR/> mkr_table2 = Marker_GetTable( 'mkr_%02d' ) -- creates a table with 3 markers named 'mkr_01', 'mkr_02', 'mkr_03' (and so on) from the WB<BR/><BR/> mkr_table3 = Marker_GetTable( 'mkr_%03d_patrol' ) -- creates a table with 3 markers named 'mkr_001_patrol', 'mkr_002_patrol' (and so on) from the WB<BR/><BR/> |
|
Source: [WW2Data.sga/Scar/UID.scar] (60) |
LuaTable SGroup_CreateTable( String format, Integer size ) | |
Returns a table of sgroups NOT in the world builder See Marker_GetTable for more info on format parameter |
|
Source: [WW2Data.sga/Scar/UID.scar] (120) |
LuaTable SGroup_GetWBTable( String format ) | |
Returns a table of sgroups from the world builder See Marker_GetTable for more info on format parameter |
|
Source: [WW2Data.sga/Scar/UID.scar] (100) |
Marker |
Functions |
Boolean Marker_DoesNumberAttributeExist( MarkerID marker, String attrname ) | |
Returns true if a generic number attribute exists for the marker type. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaMarker.cpp] (204) |
Boolean Marker_DoesStringAttributeExist( MarkerID marker, String attrname ) | |
Returns true if a generic string attribute exists for the marker type. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaMarker.cpp] (193) |
Boolean Marker_Exists( String name, String type ) | |
Returns true if marker exists. If you don't care about the type, pass in an empty string ( "" ) |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaMarker.cpp] (90) |
MarkerID Marker_FromName( String name, String type ) | |
Returns a ScarMarker from the Mission Editor. If you don't care about the type, pass in an empty string ( "" ) The type is defined in the markers list of the mission editor when placing markers.<BR/> You will need the result of this function to call any functions that start with Marker_ |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaMarker.cpp] (73) |
Position Marker_GetDirection( MarkerID marker ) | |
Returns a vector for the marker direction |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaMarker.cpp] (221) |
String Marker_GetName( MarkerID marker ) | |
Returns the name of a given marker. This value gets set in the Mission Editor. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaMarker.cpp] (152) |
Real Marker_GetNumberAttribute( MarkerID marker, String attrname ) | |
Returns a generic number attribute defined in a marker. Different marker types have different attributes. Note: All marker types have Name and Proximity. Do not use this function to retrieve these values, use Marker_GetName and Marker_GetProximity instead. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaMarker.cpp] (166) |
Position Marker_GetPosition( MarkerID marker ) | |
Returns the position of a given marker. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaMarker.cpp] (99) |
Real Marker_GetProximityRadius( MarkerID marker ) | |
Returns the proximity radius of a given marker. Only for marker with proximity type PT_Circle. This value gets set in the Mission Editor. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaMarker.cpp] (146) |
Integer Marker_GetProximityType( MarkerID marker ) | |
Returns the proximity type of a given marker. The possible results are PT_Circle and PT_Rectangle |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaMarker.cpp] (140) |
Table Marker_GetSequence( String name ) | |
Builds a table of MarkerIDs that are named in a sequence. i.e. a name of "spot" will find markers "spot1", "spot2" and so on, up until it looks for a marker that isn't there. |
|
Source: [WW2Data.sga/Scar/MoreUtils.scar] (91) |
String Marker_GetStringAttribute( MarkerID marker, String attrname ) | |
Returns a generic string attribute defined in a marker. Different marker types can have different attributes.<BR/> Note: All marker types have Name and Proximity. Do not use this function to retrieve these values, use Marker_GetName and Marker_GetProximity instead.<BR/> See markertypes.lua for a listing of all the marker types. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaMarker.cpp] (182) References: [MarkerTypes.lua] |
String Marker_GetType( MarkerID marker ) | |
Returns the typename of a given marker. This is the typename from the Mission Editor (name displayed when placing markers) |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaMarker.cpp] (158) |
Boolean Marker_InProximity( MarkerID marker, Position pos ) | |
Returns true if the given position is in the markers proximity radius or proximity rectangle (depending on the type). |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaMarker.cpp] (215) |
Modifiers |
Functions |
Void Modifier_IsEnabledOnEGroup( EGroupID egroup, String modifier, String modtype, Boolean all, Boolean bEnabledByDefault ) | |
Checks if a modifier is enabled on all or any entities in an egroup |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (191) |
Void Modifier_Remove( ModID modifier ) | |
Remove an applied modifier. |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (86) |
Void Modifier_RemoveAllFromEGroup( EGroupID egroup ) | |
Removes all SCAR-applied modifiers for a specific EGroup. |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (173) |
Void Modifier_RemoveAllFromSGroup( SGroupID sgroup ) | |
Removes all SCAR-applied modifiers for a specific SGroup. |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (152) |
ModID Modify_AbilityDelayTime( PlayerID player, AbilityID ability, Real scalefactor ) | |
Modifies the initial delay time of an ability |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (974) |
ModID Modify_AbilityMaxCastRange( PlayerID player, AbilityID ability, Real scalefactor ) | |
Modifies the maximum casting range of an ability. NOTE: it assumes that the actions that the ability executes can also handle the modified range |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (998) |
ModID Modify_AbilityMinCastRange( PlayerID player, AbilityID ability, Real scalefactor ) | |
Modifies the minimum casting range of an ability. NOTE: it assumes that the actions that the ability executes can also handle the modified range |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (986) |
ModID Modify_AbilityRechargeTime( PlayerID player, AbilityID ability, Real scalefactor ) | |
Modifies the recharge time of an ability |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (959) |
ModID Modify_CaptureTime( EGroupID sgroup, Real scalefactor ) | |
Modifies the capture time of all strategic points in an EGroup |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (889) |
ModID Modify_DisableHold( EGroupID group, Boolean disable ) | |
Enable or disable hold (garrisoning) for an egroup or sgroup |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (1061) |
Void Modify_Enable_ParadropReinforcements( PlayerID playerId, Boolean enable ) | |
Allows paratroopers to reinforce from the sky. Set to true to enable, false to disable. |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (317) |
ModID Modify_EntityBuildTime( PlayerID playerId, String ebp, Real scalefactor ) | |
Modifies the time taken to build a particular EBP. This only affects the given player. |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (202) |
ModID Modify_EntityCost( PlayerID player, String blueprint, Integer resourcetype, Integer addition ) | |
Modifies the cost of an entity for a particular player. Possible resource types are RT_Manpower, RT_Munition, RT_Fuel, RT_Action |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (1011) |
ModID Modify_PlayerExperienceReceived( PlayerID player, Real factor ) | |
Modifies the veterancy experience received by a player |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (1050) |
ModID Modify_PlayerProductionRate( PlayerID sgroup, Real scalefactor ) | |
Modifies the production rate of a player. |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (944) |
ModID Modify_PlayerResourceGift( PlayerID playerId, Integer resourceType, Real scalefactor ) | |
Modifies a player's resource bonus received (ie. one-time resource gifts) Possible resource types are RT_Manpower, RT_Munition, RT_Fuel, RT_Action |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (294) |
ModID Modify_PlayerResourceRate( PlayerID playerId, Integer resourceType, Real scalefactor ) | |
Modifies a player's incoming resource rate. Possible resource types are RT_Manpower, RT_Munition, RT_Fuel, RT_Action |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (268) |
ModID Modify_PlayerSightRadius( PlayerID player, Real scalefactor ) | |
Modifies the sight radius for a player. |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (685) |
ModID Modify_ProductionRate( EGroupID sgroup, Real scalefactor ) | |
Modifies the production rate of all factories in an EGroup |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (920) |
ModID Modify_ReceivedAccuracy( SGroupID/EGroupID group, Real scalefactor ) | |
Modifies the chance of a squad/entity being hit |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (555) |
ModID Modify_ReceivedDamage( SGroupID/EGroupID group, Real scalefactor ) | |
Modifies the damage a squad/entity receives. |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (516) |
ModID Modify_ReceivedPenetration( SGroupID/EGroupID group, Real scalefactor ) | |
Modifies the chance of a squad/entity being penetrated |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (594) |
ModID Modify_ReceivedSuppression( SGroupID sgroup, Real scalefactor ) | |
Modifies the rate at which a squad gets suppressed |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (634) |
ModID Modify_SetUpgradeCost( PlayerID playerId, UpgradeID upgrade, Integer resourceType, Real newCost ) | |
Sets the cost of an upgrade. This only affects the given player |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (243) |
ModID Modify_SightRadius( SGroupID/EGroupID group, Real scalefactor ) | |
Modifies the sight radius for an egroup or an sgroup. |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (708) |
ModID Modify_SquadAvailability( PlayerID player, String blueprint, Integer addition ) | |
Modifies the availability limit of a squad type for any given player |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (833) |
ModID Modify_TargetPriority( SGroupID/EGroupID group, Integer addition ) | |
Modifies the target priority of a squad or entity group from the attacker. The value is an addition |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (848) |
ModID Modify_TerritoryRadius( EGroupID group, Real scalefactor ) | |
Modifies the territory radius for an egroup or an sgroup. |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (749) |
ModID Modify_UnitSpeed( SGroupID sgroup, Real scalefactor ) | |
Modifies the maximum speed for a vehicle. This has no effect on infantry. |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (659) |
ModID Modify_UpgradeBuildTime( PlayerID playerId, UpgradeID upgrade, Real scalefactor ) | |
Modifies the build time for a particular upgrade. This only affects the given player. |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (215) |
ModID Modify_Upkeep( PlayerID playerId, Real scalefactor ) | |
Modifies the upkeep for a player |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (229) |
ModID Modify_VehicleRepairRate( PlayerID player, Real factor[, String engineer_blueprint] ) | |
Modifies the vehicle repair rate of all a player's engineers |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (1035) |
ModID Modify_Vulnerability( EGroupID/SGroupID group, Real scalefactor ) | |
Increases the received accuracy, penetration, and damage on a squad by the scalefactor. For example, a scalefactor of 2 means that the squad gets 2x the received accuracy, 2x the received penetration, and 2x the received damage. |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (775) |
ModID Modify_WeaponAccuracy( SGroupID/EGroupID group, String hardpoint, Real scalefactor ) | |
Modifies a squad's weapon accuracy. The hardpoint should be specified as a string - i.e. "hardpoint_01" |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (375) |
ModID Modify_WeaponBurst( SGroupID/EGroupID group, String hardpoint, Real scalefactor ) | |
Modifies a squad's weapon burst time. The hardpoint should be specified as a string - i.e. "hardpoint_01" |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (445) |
ModID Modify_WeaponCooldown( SGroupID/EGroupID group, String hardpoint, Real scalefactor ) | |
Modifies a squad's weapon cooldown time. The hardpoint should be specified as a string - i.e. "hardpoint_01" |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (410) |
ModID Modify_WeaponDamage( SGroupID/EGroupID group, String hardpoint, Real scalefactor ) | |
Modifies a squad's weapon damage. The hardpoint should be specified as a string - i.e. "hardpoint_01" |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (481) |
ModID Modify_WeaponRange( SGroupID/EGroupID group, String hardpoint, Real scalefactor ) | |
Modifies a squad's weapon range. Does not work on artillery (mortar, nebelwerfer, etc.) The hardpoint should be specified as a string - i.e. "hardpoint_01" |
|
Source: [WW2Data.sga/Scar/Modifiers.scar] (339) |
NIS |
Functions |
Void nis_debugdisplay( Boolean bDisplay ) | |
If set to true extra debugging information will be displayed |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameNIS.cpp] (523) |
Void nis_setintransitiontime( Real numSeconds ) | |
Sets the number of seconds it takes to transition from game to nis, 0 is instantaneous This includes blending the camera position, fov and clip planes |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameNIS.cpp] (536) |
Void nis_setouttransitionnis( String filename ) | |
Lets the nis system know which nis will be transitioned to when the first one ends. This function doesn't actually trigger a second nis to start, rather it lets the NIS system know which one will be next, so it can prevent the camera from popping back to the game camera. |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameNIS.cpp] (562) |
Void nis_setouttransitiontime( Real numSeconds ) | |
Sets the number of seconds it takes to transition from nis back to game, 0 is instantaneous This includes blending the camera position, fov and clip planes |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameNIS.cpp] (549) |
Void nis_usegamecamera( Boolean bUseGameCamera ) | |
If set to true the nis camera isn't used, when an nis is playing This is a debugging command, the game camera is used even when the NIS is playing |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameNIS.cpp] (512) |
Objectives |
Functions |
LabelID Objective_AddLabel( LuaTable objectiveTable, Position pos, LocString text ) | |
Adds a tactical map label to an objective |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (615) |
PingID Objective_AddPing( LuaTable objectiveTable, Position pos ) | |
Adds a tactical map ping to an objective |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (591) |
ElementID Objective_AddUIElements( LuaTable objTable, Position pos[, Boolean ping, LocString hintpointText, Boolean worldArrow, Float/Position objectiveArrowOffset] ) | |
Adds multiple UI elements on one position. 'pos' can be group/entity/squad/marker. worldArrow adds a 3D arrow which points to the thing in the world. hintpointText adds a hint point that appears on the thing when moused over. If you're adding an arrow or a hintpoint, this thing will be among those potentially pointed to by the 2D HUD arrow. objectiveArrowOffset is an offset applied to the arrow's position (you can specify a height offset or a 3D position offset). |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (418) |
Void Objective_AlertSitRep( LuaTable objTable ) | |
Drops an event cue for player 1, allowing them to access the sitrep for the objective |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (914) |
Boolean Objective_AreAllPrimaryObjectivesComplete( ) | |
Returns whether all primary objectives have been completed. |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (708) |
Void Objective_Complete( LuaTable objTable[, Boolean bShowTitle] ) | |
'Completes' an objective. Wrapper function for Objective_SetState with a few other features. If you do not want the objective title to be shown on screen, pass in 'false' for bShowTitle Includes managing the blips and triggers the OnComplete() function as defined by the objective table created in the main scar file. |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (199) |
Void Objective_Fail( LuaTable objTable[, Boolean bShowTitle] ) | |
'Fails' an objective. Wrapper function for Objective_SetState with a few other features. Includes managing the blips and triggers the OnFail() function as defined by the objective table created in the main scar file. |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (363) |
Void Objective_ForceSitRep( LuaTable objTable ) | |
Brings you to the tactical map screen and plays the sitrep for this objective |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (923) |
Integer Objective_GetCounter( LuaTable objTable ) | |
Returns the current count associated with this objective. |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (888) |
Integer Objective_GetTimerSeconds( LuaTable objTable ) | |
Returns the amount of seconds on the timer (time remaining or time elapsed, based on the type of timer used) |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (826) |
Boolean Objective_IsComplete( LuaTable objTable ) | |
Returns whether an objective is complete |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (669) |
Boolean Objective_IsCounterSet( LuaTable objTable ) | |
Returns true if a counter has been set for this objective |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (901) |
Boolean Objective_IsFailed( LuaTable objTable ) | |
Returns whether an objective is failed |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (682) |
Void Objective_IsStarted( LuaTable objTable ) | |
Returns whether an objective has been started. Completed objectives will return true. |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (695) |
Boolean Objective_IsTimerSet( LuaTable objTable ) | |
Returns true if a timer has been set for this objective |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (845) |
Void Objective_PauseTimer( LuaTable objTable ) | |
Pauses the objective's timer. If a timer has not been set, it does nothing. |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (790) |
ObjectiveID Objective_Register( LuaTable objTable ) | |
'Registers' an objective. Wrapper function for Objective_Create with a few other features. Includes pointers, labels and pings as defined by the objective table created in the main scar file. |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (74) |
Void Objective_RemoveLabel( LuaTable objectiveTable, Integer LabelID ) | |
Removes a tactical map label from an objective |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (660) |
Void Objective_RemovePing( LuaTable objectiveTable, Integer PingID ) | |
Removes a tactical map ping from an objective |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (633) |
Void Objective_RemoveUIElements( LuaTable objTable, Integer elementID ) | |
Removes a group of UI elements that were added by Objective_AddUIElements |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (513) |
Void Objective_ResumeTimer( LuaTable objTable ) | |
Resume the objective's timer. If a timer has not been set, it does nothing. |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (802) |
Void Objective_SetAlwaysShowDetails( LuaTable objTable, Boolean title, Boolean hud_arrow, Boolean hintpoints ) | |
Sets whether this objective always shows detailed text, the HUD arrow, or the hintpoints. There can only be one objective at a time that forces the HUD arrow to show up. If you pass in 'nil' for hud_arrow then its behavior is not affected. |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (939) |
Void Objective_SetCounter( LuaTable objTable, Float current[, Float maximum] ) | |
Sets a counter that is associated with this objective in the UI. You can provide a 'maximum' so that it shows up as "1 of 5" |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (857) |
Void Objective_Show( LuaTable objective_table, Boolean on/off ) | |
Shows or hides an objective from the UI and tactical map |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (400) |
Void Objective_Start( LuaTable objTable[, Boolean bShowTitle] ) | |
Shows an objective to the player and activates it Includes pointers, labels, pings and FOW as defined by the objective table created in the main scar file. |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (146) |
Void Objective_StartTimer( LuaTable objTable, Integer direction[, Float initialTime, Float flashThreshold] ) | |
Starts a timer that is associated with this objective in the UI. Use COUNT_DOWN or COUNT_UP for the 'direction' parameter |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (759) |
Void Objective_StopCounter( LuaTable objTable ) | |
Stops the objective's counter. If a counter has not been set, it does nothing. |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (877) |
Void Objective_StopTimer( LuaTable objTable ) | |
Stops the objective's timer. If a timer has not been set, it does nothing. |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (814) |
Void Objective_TogglePings( LuaTable objective_table, Boolean on/off ) | |
Toggles minimap blips on or off. |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (409) |
Void Objective_UpdateText( LuaTable objTable, LocString title, LocString description[, Boolean bShowTitle] ) | |
Updates the title and description for the objective. If you only want to set one of them, pass in nil for the other |
|
Source: [WW2Data.sga/Scar/Objectives.scar] (733) |
Player |
Functions |
Void Player_AddAbilityLockoutZone( PlayerID player, AbilityBlueprint abilityPBG, MarkerID marker ) | |
Specifies a marker where an ability cannot be used. This only applies to abilities where you use the cursor to pick a location in the world (like a location to paradrop at). |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (709) |
Void Player_AddResource( PlayerID playerId, Integer resourceType, Real value ) | |
Add resource to player, as opposed to just setting it. Possible resource types are RT_Manpower, RT_Munition, RT_Fuel, RT_Action |
|
Source: [WW2Data.sga/Scar/Player.scar] (244) |
SGroupID Player_AddSquadsToSGroup( PlayerID playerId, String squadgroupName ) | |
For the given player, get all of the squads gathered into a squadgroup of your naming. Squads will be added to given squad group. If the given squad group does not exist it will be created. |
|
Source: [WW2Data.sga/Scar/Player.scar] (257) |
Void Player_AddUnspentCommandPoints( PlayerID player, Integer points ) | |
Gives the player new command points to spent on |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (541) |
Boolean Player_AreSquadsNearMarker( PlayerID playerid, MarkerID marker ) | |
Returns true if ANY of a players squads are in proximity of a marker |
|
Source: [WW2Data.sga/Scar/Player.scar] (646) |
Boolean Player_CanSeeEGroup( PlayerID playerid, EGroupID egroup, Boolean all ) | |
Returns true if a player can see ALL or ANY items in an egroup |
|
Source: [WW2Data.sga/Scar/Player.scar] (431) |
Boolean Player_CanSeeEntity( PlayerID player, EntityID entity ) | |
Returns true if a player can see a given entity |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (503) |
Boolean Player_CanSeePosition( PlayerID player, Position pos ) | |
Returns true if a player can see a given position. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (517) |
Boolean Player_CanSeeSGroup( PlayerID playerid, SGroupID sgroup, Boolean all ) | |
Returns true if a player can see ALL or ANY items in an sgroup |
|
Source: [WW2Data.sga/Scar/Player.scar] (446) |
Boolean Player_CanSeeSquad( PlayerID player, SquadID squad, Boolean all ) | |
Returns true if a player can see ALL or ANY units in a given squad Set all to true to check that ALL units are visible or set to false to check for ANY. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (510) |
Void Player_ClearArea( PlayerID player, MarkerID marker, Bool invulnerable ) | |
Any of the player's units in the marker area move out of the area, and can be made invulnerable for a bit whilst they do it You can replace the marker with a position and a range - i.e. Player_ClearArea(player, pos, range, invulnerable) |
|
Source: [WW2Data.sga/Scar/Player.scar] (665) |
Void Player_ClearAvailabilities( PlayerID player ) | |
Clears item, command and construction menu availabilities for the player. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (697) |
Void Player_ClearPopCapOverride( PlayerID player ) | |
Clears the pop cap override so that modifiers can take effect again |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (758) |
Void Player_DoParadrop( PlayerID player, SGroupID sgroup, Position pos, Real dropHeight, Real dropDrift, LuaBinding::StackVar blueprint, Integer maxSquadEntityCount, Integer maxDeathOnBuilding ) | |
Do a paradrop with custom parameters for this player. This is similar to regular paradrop ability without any prereq check sgroup is the SGroup that the newly created squad would be added to dropHeight is Height in metres the paratroopers are dropped from. dropDrift is Horizontal distance in metres from where the paratroopers are dropped from. blueprint is the blueprint to spawn. It could be squad or entity maxSquadEntityCount is the number of squad members to spawn. 0 means default is used maxDeathOnBuilding is the number of entities allowed to die when landing on buildings Example: local id = SBP.ALLIED_AIRBOURNE Player_DoParadrop( g_player1, sg_soldier1, Marker_GetPosition( marker4 ), 100.0, 10.0, id, 3, 2 ) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (582) |
PlayerID Player_FindFirstEnemyPlayer( PlayerID player ) | |
Searches the player list in the world and returns the id of the first enemy player |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (721) |
PlayerID Player_FromId( Integer id ) | |
Returns a player given a player id from the ME. NOTE: this is a temp function, and will be replaced with Player_FromName |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (258) |
PlayerID Player_FromName( String name ) | |
Get a player using their name from the Mission Editor. NOT DONE YET |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (238) |
Integer Player_GetAIType( PlayerID pPlayer ) | |
Returns the type of the given player if it is an AI (possible types are: AII_Normal, AII_LocalHumanTakeover, AII_RemoteAITakeover, AII_RemoteHumanTakeover (-1 if the player is not an AI) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (937) |
Void Player_GetAll( PlayerID player[, SGroupID sgroup, EGroupID egroup] ) | |
Creates/Clears groups that contain all of a player's units and buildings. Defaults - sg_allsquads and eg_allentities Fills an SGroup with all of the given player's squads, and an EGroup with all the player's entities. If you don't provide and groups, then it defaults to using sg_allsquads and eg_allentities. |
|
Source: [WW2Data.sga/Scar/Player.scar] (295) |
Void Player_GetAllEntitiesNearMarker( PlayerID playerid, EGroupID egroup, MarkerID/Pos/SectorID position[, Real range] ) | |
Gather together all of a player's entities that are in proximity to a marker, a position, or within a territory sector into an EGroup. The EGroup is cleared beforehand. You can override a marker's normal proximity by specifying a range. |
|
Source: [WW2Data.sga/Scar/Player.scar] (392) |
Void Player_GetAllSquadsNearMarker( PlayerID player, SGroupID sgroup, MarkerID/Pos/SectorID position[, Real range] ) | |
Gather together all of a player's squads that are in proximity to a marker, a position, or within a territory sector into an SGroup. The SGroup is cleared beforehand. You can override a marker's normal proximity by specifying a range. |
|
Source: [WW2Data.sga/Scar/Player.scar] (354) |
Integer Player_GetBuildingsCount( PlayerID playerId ) | |
Returns the total number of buildings owned by this player. |
|
Source: [WW2Data.sga/Scar/Player.scar] (223) |
Integer Player_GetBuildingsCountExcept( PlayerID playerId, BlueprintTable exceptions ) | |
Returns the total number of buildings owned by this player (with exclusions). |
|
Source: [WW2Data.sga/Scar/Player.scar] (230) |
Integer Player_GetBuildingsCountOnly( PlayerID playerId, BlueprintTable ebplist ) | |
Returns the number of buildings owned by this player (inclusive). |
|
Source: [WW2Data.sga/Scar/Player.scar] (237) |
Integer Player_GetCurrentPopulation( PlayerID player, Integer capType ) | |
Use capType CT_Personnel to get current squad cap, CT_Vehicle to get current vehicle cap, CT_Medic to get current medic cap |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (523) |
LocString Player_GetDisplayName( PlayerID player ) | |
Returns the players UI name. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (564) |
EGroupID Player_GetEntities( PlayerID player ) | |
Returns an EntityGroupObs containing all the players entities. This function returns a 'global' entity group with the name '__Player%dEntities', where %d is the player ID. This means that you should never need to destroy it./n However, if you do destroy it, it will be recreated the next time this function is called. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (425) |
Integer Player_GetEntityCount( PlayerID player ) | |
Returns the number of entities a player currently owns |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (324) |
String Player_GetEntityName( PlayerID player, Integer index ) | |
Returns the name of an entity a player currently owns |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (336) |
Integer Player_GetID( PlayerID player ) | |
Returns the id of the player |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (535) |
Integer Player_GetMaxPopulation( PlayerID player, Integer capType ) | |
Use capType CT_Personnel to get max squad cap or CT_VehicleCap to get max vehicle cap. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (529) |
Integer Player_GetNumStrategicPoints( PlayerID p ) | |
Returns the number of strategic points (not objectives) this player owns |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (457) |
Integer Player_GetNumVictoryPoints( PlayerID p ) | |
Returns the number of strategic objectives this player owns |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (480) |
Integer Player_GetPhase( PlayerID player ) | |
Returns the phase the given player is currently at |
|
Source: [WW2Data.sga/Scar/Player.scar] (269) |
Integer Player_GetRace( PlayerID player ) | |
Returns the race index for the given player. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (285) |
String Player_GetRaceName( PlayerID player ) | |
Returns the name of the race for a given player (eg. allies, allies_commonwealth, axis, axis_panzerelite) and always in english |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (279) |
Integer Player_GetRelationship( PlayerID player1, PlayerID player2 ) | |
Returns the relationship between 2 players. Possible relationships are R_ENEMY, R_ALLY, R_NEUTRAL, R_UNDEFINED. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (297) |
Real Player_GetResource( PlayerID player, Integer resourceType ) | |
Returns the amount of resources a given player has. Possible resource types are RT_Manpower, RT_Fuel, RT_Munition, RT_Action, RT_Command |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (381) |
Real Player_GetResourceRate( PlayerID player, Integer resourceType ) | |
Returns the amount of resources a given player is getting per second. Possible resource types are RT_Manpower, RT_Fuel, RT_Munition, RT_Action, RT_Command |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (388) |
Integer Player_GetSquadCount( PlayerID player ) | |
Returns the number of squads a player currently owns |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (330) |
SGroupID Player_GetSquads( PlayerID player ) | |
Returns a SquadGroupObs containing all the players units. This function returns a 'global' squad group with the name '__Player%dSquads', where %d is the player ID. This means that you should never need to destroy it./n However, if you do destroy it, it will be recreated the next time this function is called. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (399) |
Position Player_GetStartingPosition( PlayerID player ) | |
Returns the starting position for this player |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (273) |
Integer Player_GetTeam( PlayerID p ) | |
Get the team a player is on |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (291) |
Integer Player_GetUnitCount( PlayerID player ) | |
Returns the current number of units the player has. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (318) |
Real Player_GetUpgradeCost( PlayerID player, UpgradeBlueprint upgradePBG, Integer resourceType ) | |
Returns the cost of an upgrade. Possible resource types are RT_Manpower, RT_Fuel, RT_Munition, RT_Action, RT_Command. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (764) |
boolean Player_HasBuilding( PlayerID player, BlueprintTable entitytypes ) | |
Returns true if this player owns any buildings listed in the table. This only looks at completed buildings - use Player_HasBuildingUnderConstruction to see if the player is building something |
|
Source: [WW2Data.sga/Scar/Player.scar] (201) |
boolean Player_HasBuildingsExcept( PlayerID playerId, BlueprintTable exceptions ) | |
Returns true if this player owns any buildings. (with exclusions). |
|
Source: [WW2Data.sga/Scar/Player.scar] (208) |
boolean Player_HasBuildingUnderConstruction( PlayerID player, BlueprintTable entitytypes ) | |
Returns true if this player owns any buildings listed in the table currently under construction. |
|
Source: [WW2Data.sga/Scar/Player.scar] (215) |
Boolean Player_HasLost( PlayerID player, LuaTable Blueprints ) | |
Checks to see if a player has lost (if player owns any squads and any buildings contained in blueprints) Pass in a table of blueprints of buildings that the player must have in order to be considered "alive". Ambient buildings are already take into consideration since they must be occupied by a squad. |
|
Source: [WW2Data.sga/Scar/Player.scar] (751) |
Boolean Player_HasMapEntryPosition( PlayerID player ) | |
Returns whether a player has a map entry position |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (869) |
Boolean Player_HasUpgrade( PlayerID pPlayer, UpgradeBlueprint upgradePBG ) | |
Return true if the squad has purchased the specified upgrade. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (632) |
Boolean Player_IsAlive( PlayerID player ) | |
Returns true if player is still alive and false if player is dead. Will error if playerIdx is an invalid index. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (303) |
Boolean Player_IsAllied( PlayerID playerId1, PlayerID playerId2 ) | |
Returns true if the players are allied and false if they are not. |
|
Source: [WW2Data.sga/Scar/Player.scar] (190) |
Void Player_Kill( PlayerID player ) | |
Kill a player. Will error if playerIdx is an invalid index. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (309) |
Integer (amount of squads promoted) Player_MakeSGroupVeteran( PlayerID player, SGroupID sgroup ) | |
Tries to promote each squad in an sgroup, given that the player has veteran squads available for the appropriate squad types. See Player_MakeSquadVeteran for more details. |
|
Source: [WW2Data.sga/Scar/Player.scar] (728) |
Boolean Player_MakeSquadVeteran( PlayerID player, SquadID squad ) | |
If the player has a veteran squad of the same type in reserve, it promotes an existing squad to match the veteran squad (rank and slot items). The veteran squad is "used up" and is no longer available. Does not promote squad if there would be no benefit in doing so. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (779) |
Integer Player_NumUpgradeComplete( PlayerID player, const char *upgradeName ) | |
Returns the number of upgrades that this player has. The upgradeName should be a relative filename (eg. upgrade/allies/research/phase_2.lua) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (549) |
Boolean Player_OwnsEGroup( PlayerID playerid, EGroupID egroup[, Boolean all] ) | |
Returns true if a given player owns ALL or ANY items in a group |
|
Source: [WW2Data.sga/Scar/Player.scar] (571) |
Boolean Player_OwnsEntity( PlayerID playerid, EntityID entity ) | |
Returns true if a given player owns an entity |
|
Source: [WW2Data.sga/Scar/Player.scar] (589) |
Boolean Player_OwnsSGroup( PlayerID playerid, SGroupID sgroup[, Boolean all] ) | |
Returns true if a given player owns ALL or ANY items in a group |
|
Source: [WW2Data.sga/Scar/Player.scar] (607) |
Boolean Player_OwnsSquad( PlayerID playerid, SquadID squad ) | |
Returns true if a given player owns a squad |
|
Source: [WW2Data.sga/Scar/Player.scar] (625) |
Void Player_RemoveAbilityLockoutZone( PlayerID player, AbilityBlueprint abilityPBG, MarkerID marker ) | |
Removes a marker that was previously a lockout zone. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (715) |
Void Player_RestrictAddOnList( PlayerID playerid, Table addonlist ) | |
Restrict a list of addons. list should contain an array of strings to restrict. |
|
Source: [WW2Data.sga/Scar/Player.scar] (539) |
Void Player_RestrictBuildingList( PlayerID playerid, Table blueprintlist ) | |
Restrict a list of buildings. list should contain an array of strings to restrict. |
|
Source: [WW2Data.sga/Scar/Player.scar] (550) |
Void Player_RestrictResearchList( PlayerID playerid, StringTable list ) | |
Restrict a list of research items. list should contain an array of strings to restrict. |
|
Source: [WW2Data.sga/Scar/Player.scar] (561) |
Void Player_RevertChosenCommanderTree( PlayerID player ) | |
Removes chosen CC tree and all upgrades associated with it. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (703) |
Void Player_SetAbilityAvailability( PlayerID player, AbilityBlueprint/Table bp, Integer availability ) | |
Sets the availability of an ability. Availability can be either ITEM_LOCKED, ITEM_UNLOCKED, ITEM_REMOVED or ITEM_DEFAULT |
|
Source: [WW2Data.sga/Scar/Player.scar] (860) |
Void Player_SetAllCommandAvailability( PlayerID player, Integer availability ) | |
Sets availability of ALL entity, squad and player commands. Availability can be either ITEM_LOCKED, ITEM_UNLOCKED, ITEM_REMOVED or ITEM_DEFAULT |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (677) |
Void Player_SetCommandAvailability( PlayerID player, Integer/Table command, Integer availability ) | |
Sets the availability of entity, squad and player commands. Availability can be either ITEM_LOCKED, ITEM_UNLOCKED, ITEM_REMOVED or ITEM_DEFAULT |
|
Source: [WW2Data.sga/Scar/Player.scar] (878) |
Void Player_SetConstructionMenuAvailability( PlayerID player, String/Table menuname, Integer availability ) | |
Sets the availability of a construction menu. Availability can be either ITEM_LOCKED, ITEM_UNLOCKED, ITEM_REMOVED or ITEM_DEFAULT |
|
Source: [WW2Data.sga/Scar/Player.scar] (884) |
Void Player_SetDefaultSquadMoodMode( PlayerID pPlayer, Integer mode ) | |
Set default squad mood mode which can be overrided by squad level mood mode settings |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (658) |
Void Player_SetEntityProductionAvailability( PlayerID player, EntityBlueprint/Table bp, Integer availability ) | |
Sets the availability of an entity production item. Availability can be either ITEM_LOCKED, ITEM_UNLOCKED, ITEM_REMOVED or ITEM_DEFAULT |
|
Source: [WW2Data.sga/Scar/Player.scar] (872) |
Void Player_SetMaxCapPopulation( PlayerID playerid, Integer captype, Integer newcap ) | |
Sets the current personnel or vehicle max-cap for a player. The captype is either CT_Personnel or CT_Vehicle (you can't adjust Medic caps just yet). you will have to call Player_SetMaxPopulation to adjust the current max population to do this. |
|
Source: [WW2Data.sga/Scar/Player.scar] (501) |
Void Player_SetMaxPopulation( PlayerID playerid, Integer captype, Integer newcap ) | |
Sets the current personnel or vehicle cap for a player. The captype is either CT_Personnel or CT_Vehicle (you can't adjust Medic caps just yet). Note that any modifiers that adjust the current cap will be applied on top of this. Also note, the current cap cannot go higher than the max cap. |
|
Source: [WW2Data.sga/Scar/Player.scar] (462) |
Void Player_SetPopCapOverride( PlayerID player, Integer personnel ) | |
Sets a pop cap override that ignores any modifiers. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (747) |
Void Player_SetResource( PlayerID player, Integer resourceType, Real amt ) | |
Set the resource amount for a given player. Ignores income cap and resource sharing. Possible resource types are RT_Manpower, RT_Fuel, RT_Munition, RT_Action, RT_Command.<BR/> |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (349) |
Void Player_SetSquadProductionAvailability( PlayerID player, SquadBlueprint/Table bp, Integer availability ) | |
Sets the availability of a squad production item. Availability can be either ITEM_LOCKED, ITEM_UNLOCKED, ITEM_REMOVED or ITEM_DEFAULT |
|
Source: [WW2Data.sga/Scar/Player.scar] (866) |
Void Player_SetUpgradeAvailability( PlayerID player, UpgradeBlueprint/Table bp, Integer availability ) | |
Sets the availability of an upgrade. Availability can be either ITEM_LOCKED, ITEM_UNLOCKED, ITEM_REMOVED or ITEM_DEFAULT |
|
Source: [WW2Data.sga/Scar/Player.scar] (854) |
Void Player_SetUpgradeCost( PlayerID player, UpgradeID upgrade, Real manpower, Real fuel, Real munition, Real action, Real command ) | |
Sets the cost of an upgrade. |
|
Source: [WW2Data.sga/Scar/Player.scar] (715) |
EntityID Player_SpawnGlider( PlayerID player, EntityBlueprint glider, Position start, Position end ) | |
Spawns a glider and returns it |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (916) |
Void Player_StopEarningActionPoints( PlayerID player ) | |
Prevents a player from earning any action points (and by extention, command points) |
|
Source: [WW2Data.sga/Scar/Player.scar] (705) |
Void Player_Triangulate( PlayerID player, SGroupID squads, EGroupID entities ) | |
Returns the enemy squads and entities within a player's radio beacons. Radio beacons are shared among team members. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaPlayer.cpp] (886) |
Presentation |
Functions |
Void Actor_Clear( ActorTable actor ) | |
Clear ties between an actor and any units |
|
Source: [WW2Data.sga/Scar/Actor.scar] (26) |
Void Actor_PlaySpeech( ActorTable actor, Integer locID[, Boolean continueButton, Boolean stickySubtitle, Boolean blockInput] ) | |
Plays a speech event for a given actor WITH a portrait and subtitle Be VERY careful how you use the 'blockInput' parameter. It blocks all input except mouse movement, a few critical keyboard keys, and the Continue and Menu buttons. So you should always allow a continue button when blocking input. You shouldn't block input for a sticky subtitle! If the speech file is not available, a placeholder time will be calculated for the message using the number of words and the message will be displayed for that length of time.<BR/> Actors: ACTOR.GenericAlly, ACTOR.GenericAxis, ACTOR.Keller, ACTOR.McKay, ACTOR.Conti, ACTOR.Franks, ACTOR.Peoples, ACTOR.Coogi, etc... |
|
Source: [WW2Data.sga/Scar/Actor.scar] (64) |
Void Actor_PlaySpeechWithoutPortrait( ActorTable actor, Integer locID[, Boolean continueButton, Boolean stickySubtitle, Boolean blockInput] ) | |
Plays a speech event for a given actor WITHOUT a portrait or subtitle. See Actor_PlaySpeech for more details |
|
Source: [WW2Data.sga/Scar/Actor.scar] (75) |
Void Actor_SetFromSGroup( ActorTable actor, SGroupID sgroup ) | |
Tie an entire sgroup to an actor, so audio comes from a squad member |
|
Source: [WW2Data.sga/Scar/Actor.scar] (18) |
Void Actor_SetFromSquad( ActorTable actor, SquadID squad ) | |
Tie a single squad to an actor, so audio comes from a squad member |
|
Source: [WW2Data.sga/Scar/Actor.scar] (10) |
Proximity |
Functions |
Boolean Prox_AreEntitiesNearMarker( EGroupID egroup, MarkerID/Position/SectorID position, Boolean all[, Real range] ) | |
Returns true if ANY or ALL entities from a group are in range of a given position, marker, or territory sector. Markers with proximity type rectangle will use circular proximity check if custom range is supplied<BR/> |
|
Source: [WW2Data.sga/Scar/Proximity.scar] (366) |
Boolean Prox_ArePlayerMembersNearMarker( PlayerID player, MarkerID/Position/SectorID position, Boolean all[, Real range] ) | |
Returns true if ANY or ALL of a player's members (i.e. individual guys, not squads as a whole) are in range of a given position, marker, or territory sector. DO NOT USE THIS FUNCTION UNLESS YOU ABSOLUTELY HAVE TO!! You MUST specify a range if you are using a position rather than a marker. |
|
Source: [WW2Data.sga/Scar/Proximity.scar] (454) |
Boolean Prox_ArePlayersNearMarker( PlayerID player, MarkerID/Position/SectorID position, Boolean all[, Real range] ) | |
Returns true if ANY or ALL of a player's squads are in range of a given position, marker, or territory sector. THIS FUNCTION IS VERY SLOW. DO NOT USE THIS UNLESS ABSOLUTELY NECESSARY. Markers with proximity type rectangle will use circular proximity check if custom range is supplied<BR/> |
|
Source: [WW2Data.sga/Scar/Proximity.scar] (432) |
Boolean Prox_AreSquadMembersNearMarker( SGroupID sgroup, MarkerID/Position/SectorID position, Boolean all[, Real range] ) | |
Returns true if ANY or ALL squad members (i.e. individual guys, not squads as a whole) from a group are in range of a given position, marker, or territory sector. DO NOT USE THIS FUNCTION UNLESS YOU ABSOLUTELY HAVE TO!! Markers with proximity type rectangle will use circular proximity check if custom range is supplied<BR/> |
|
Source: [WW2Data.sga/Scar/Proximity.scar] (283) |
Boolean Prox_AreSquadsNearMarker( SGroupID sgroup, MarkerID/Position/SectorID position, Boolean all[, Real range] ) | |
Returns true if ANY or ALL squads from a group are in range of a given position, marker, or territory sector Markers with proximity type rectangle will use circular proximity check if custom range is supplied<BR/> |
|
Source: [WW2Data.sga/Scar/Proximity.scar] (251) |
Real Prox_EGroupEGroup( EGroupID egroup1, EGroupID egroup2, ProxType checktype ) | |
Returns the distance between two entity groups. use checktype PROX_SHORTEST, PROX_LONGEST, or PROX_CENTER. If check is PROX_SHORTEST this will return the shortest distance between the two groups.<BR/> If check is PROX_LONGEST this will return the longest distance between the two groups.<BR/> If check is PROX_CENTER this will return the distance between the two groups centers.<BR/> |
|
Source: [WW2Data.sga/Scar/Proximity.scar] (157) |
Real Prox_EGroupSGroup( EGroupID egroup1, SGroupID sgroup2, ProxType checktype ) | |
Returns the distance between an entity group and a squad group. use checktype PROX_SHORTEST, PROX_LONGEST, or PROX_CENTER. If check is PROX_SHORTEST this will return the shortest distance between the two groups.<BR/> If check is PROX_LONGEST this will return the longest distance between the two groups.<BR/> If check is PROX_CENTER this will return the distance between the two groups centers.<BR/> |
|
Source: [WW2Data.sga/Scar/Proximity.scar] (180) |
Boolean Prox_EntitiesInProximityOfEntities( EGroupID egroup1, EGroupID egroup2, Real proximity, Boolean all ) | |
Checks if ALL or ANY entities are in proximity of a given entity group. Set "all" to true to check that ALL entities are in proximity, or set "all" to false to check for ANY. |
|
Source: [WW2Data.sga/Scar/Proximity.scar] (656) |
Real Prox_MarkerEGroup( MarkerID marker, EGroupID egroup, ProxType checktype ) | |
Returns the distance between a marker and an entity group. use checktype PROX_SHORTEST, PROX_LONGEST, or PROX_CENTER. If check is PROX_SHORTEST this will return the shortest distance between the two groups.<BR/> If check is PROX_LONGEST this will return the longest distance between the two groups.<BR/> If check is PROX_CENTER this will return the distance between the two groups centers.<BR/> |
|
Source: [WW2Data.sga/Scar/Proximity.scar] (203) |
Real Prox_MarkerSGroup( MarkerID marker, SGroupID sgroup, ProxType checktype ) | |
Returns the distance between a marker and a squad group. use checktype PROX_SHORTEST, PROX_LONGEST, or PROX_CENTER. If check is PROX_SHORTEST this will return the shortest distance between the two groups.<BR/> If check is PROX_LONGEST this will return the longest distance between the two groups.<BR/> If check is PROX_CENTER this will return the distance between the two groups centers.<BR/> |
|
Source: [WW2Data.sga/Scar/Proximity.scar] (226) |
Boolean Prox_PlayerEntitiesInProximityOfEntities( PlayerID playerid, EGroupID egroup, Real proximity, Boolean all, EntityID exclude ) | |
Checks if ALL or ANY players squads are in proximity of a given entity group. Set "all" to true to check that ALL entities are in proximity, or set "all" to false to check for ANY. |
|
Source: [WW2Data.sga/Scar/Proximity.scar] (617) |
Boolean Prox_PlayerEntitiesInProximityOfPlayerSquads( PlayerID playerentities, PlayerID playersquads, Real proximity, Boolean all ) | |
Checks if ALL or ANY players entities are in proximity of a given squad group. Set "all" to true to check that ALL entities are in proximity, or set "all" to false to check for ANY. |
|
Source: [WW2Data.sga/Scar/Proximity.scar] (604) |
Boolean Prox_PlayerEntitiesInProximityOfSquads( PlayerID playerid, SGroupID sgroup, Real proximity, Boolean all ) | |
Checks if ALL or ANY players entities are in proximity of a given squad group. Set "all" to true to check that ALL entities are in proximity, or set "all" to false to check for ANY. |
|
Source: [WW2Data.sga/Scar/Proximity.scar] (565) |
Boolean Prox_PlayerSquadsInProximityOfEntities( PlayerID playerid, EGroupID egroup, Real proximity, Boolean all ) | |
Checks if ALL or ANY players squads are in proximity of a given entity group. Set "all" to true to check that ALL squads are in proximity, or set "all" to false to check for ANY. |
|
Source: [WW2Data.sga/Scar/Proximity.scar] (552) |
Boolean Prox_PlayerSquadsInProximityOfPlayerEntities( PlayerID playersquads, PlayerID playerentities, Real proximity, Boolean all ) | |
Checks if ALL or ANY players squads are in proximity of a given players entities. Set "all" to true to check that ALL squads are in proximity, or set "all" to false to check for ANY. |
|
Source: [WW2Data.sga/Scar/Proximity.scar] (591) |
Boolean Prox_PlayerSquadsInProximityOfPlayerSquads( PlayerID playerid1, PlayerID playerid2, Real proximity, Boolean all ) | |
Checks if ALL or ANY players squads are in proximity of a given players squads. Set "all" to true to check that ALL squads are in proximity, or set "all" to false to check for ANY. |
|
Source: [WW2Data.sga/Scar/Proximity.scar] (578) |
Boolean Prox_PlayerSquadsInProximityOfSquads( PlayerID playerid, SGroupID sgroup, Real proximity, Boolean all, SquadID exclude ) | |
Checks if ALL or ANY players squads are in proximity of a given squad group. Set "all" to true to check that ALL squads are in proximity, or set "all" to false to check for ANY. |
|
Source: [WW2Data.sga/Scar/Proximity.scar] (539) |
Real Prox_SGroupSGroup( SGroupID sgroup1, SGroupID sgroup2, ProxType checktype ) | |
Returns the distance between two squad groups. use checktype PROX_SHORTEST, PROX_LONGEST, or PROX_CENTER. If check is PROX_SHORTEST this will return the shortest distance between the two groups.<BR/> If check is PROX_LONGEST this will return the longest distance between the two groups.<BR/> If check is PROX_CENTER this will return the distance between the two groups centers.<BR/> |
|
Source: [WW2Data.sga/Scar/Proximity.scar] (134) |
Boolean Prox_SquadsInProximityOfEntities( SGroupID sgroup, EGroupID egroup, Real proximity, Boolean all ) | |
Checks if ALL or ANY squads are in proximity of a given entity group. Set "all" to true to check that ALL squads are in proximity, or set "all" to false to check for ANY. |
|
Source: [WW2Data.sga/Scar/Proximity.scar] (643) |
Boolean Prox_SquadsInProximityOfSquads( SGroupID sgroup1, SGroupID sgroup2, Real proximity, Boolean all ) | |
Checks if ALL or ANY squads are in proximity of a given squad group. Set "all" to true to check that ALL squads are in proximity, or set "all" to false to check for ANY. |
|
Source: [WW2Data.sga/Scar/Proximity.scar] (630) |
RuleSystem |
Functions |
Void Rule_Add( LuaFunction rule[, Integer priority] ) | |
Add a rule to be executed every frame. Priority can be from 0 to 1000, with 0 being the lowest. Priority is used in conjunction with Rule_RemoveAll so that rules with high priority do not get removed. |
|
Source: [WW2Data.sga/Scar/RuleSystem.scar] (31) |
Void Rule_AddDelayedInterval( LuaFunction rule, Real delay, Real interval[, Integer priority] ) | |
Add a rule to be executed at every 'interval' seconds, after an initial delay. Priority can be from 0 to 1000, with 0 being the lowest. Priority is used in conjunction with Rule_RemoveAll so that rules with high priority do not get removed. |
|
Source: [WW2Data.sga/Scar/RuleSystem.scar] (54) |
Void Rule_AddDelayedIntervalEx( LuaFunction rule, Real delay, Real interval, Integer calls[, Integer priority, Integer calls] ) | |
Add a rule to be executed 'calls' times, at every 'interval' seconds, after an initial delay. Priority can be from 0 to 1000, with 0 being the lowest. Priority is used in conjunction with Rule_RemoveAll so that rules with high priority do not get removed. |
|
Source: [WW2Data.sga/Scar/RuleSystem.scar] (60) |
Void Rule_AddEGroupEvent( LuaFunction rule, EGroupID egroup, Integer eventtype ) | |
Add a rule to be executed when the event of 'eventType' has happened on entities in the 'egroup' Event types are: GE_EntityKilled |
|
Source: [WW2Data.sga/Scar/RuleSystem.scar] (111) |
Void Rule_AddEntityEvent( LuaFunction rule, EntityID entity, Integer eventtype ) | |
Add a rule to be executed when the event of 'eventType' has happened on the 'entity' Event types are: GE_EntityKilled |
|
Source: [WW2Data.sga/Scar/RuleSystem.scar] (103) |
Void Rule_AddInterval( LuaFunction rule, Real interval[, Integer priority] ) | |
Add a rule to be executed at every 'interval' seconds. Priority can be from 0 to 1000, with 0 being the lowest. Priority is used in conjunction with Rule_RemoveAll so that rules with high priority do not get removed. |
|
Source: [WW2Data.sga/Scar/RuleSystem.scar] (47) |
Void Rule_AddIntervalEx( LuaFunction rule, Real interval, Integer calls[, Integer priority] ) | |
Add a rule to be executed 'calls' times, at every 'interval' seconds. Priority can be from 0 to 1000, with 0 being the lowest. Priority is used in conjunction with Rule_RemoveAll so that rules with high priority do not get removed. |
|
Source: [WW2Data.sga/Scar/RuleSystem.scar] (39) |
Void Rule_AddOneShot( LuaFunction rule, Real interval[, Integer priority] ) | |
Add a rule to be executed once, after 'interval' seconds. Priority can be from 0 to 1000, with 0 being the lowest. Priority is used in conjunction with Rule_RemoveAll so that rules with high priority do not get removed. |
|
Source: [WW2Data.sga/Scar/RuleSystem.scar] (68) |
Void Rule_AddPlayerEvent( LuaFunction rule, PlayerID player, Integer eventtype ) | |
Add a rule to be executed when the event of 'eventType' has happened on the 'player' Event types are: GE_PlayerBeingAttacked |
|
Source: [WW2Data.sga/Scar/RuleSystem.scar] (122) |
Void Rule_AddSGroupEvent( LuaFunction rule, SGroupID sgroup, Integer eventtype ) | |
Add a rule to be executed when the event of 'eventType' has happened on squads in the 'sgroup' Event types are: GE_SquadKilled, GE_SquadPinned, GE_SquadCommandIssued, GE_AbilityExecuted |
|
Source: [WW2Data.sga/Scar/RuleSystem.scar] (92) |
Void Rule_AddSquadEvent( LuaFunction rule, SquadID squad, Integer eventtype ) | |
Add a rule to be executed when the event of 'eventType' has happened on the 'squad' Event types are: GE_SquadKilled, GE_SquadPinned, GE_SquadCommandIssued, GE_AbilityExecuted |
|
Source: [WW2Data.sga/Scar/RuleSystem.scar] (84) |
Void Rule_ChangeInterval( LuaFunction rule, Real interval ) | |
Change 'interval' seconds of an existing rule |
|
Source: [WW2Data.sga/Scar/RuleSystem.scar] (76) |
Boolean Rule_Exists( LuaFunction rule ) | |
Test if a rule is currently active |
|
Source: [WW2Data.sga/Scar/RuleSystem.scar] (210) |
Void Rule_Remove( LuaFunction rule ) | |
Remove a currently active rule (this does not remove any event rules) |
|
Source: [WW2Data.sga/Scar/RuleSystem.scar] (180) |
Void Rule_RemoveAll( [Integer max_priority] ) | |
Kills all rules below a certain priority. The default is to remove ALL rules. |
|
Source: [WW2Data.sga/Scar/RuleSystem.scar] (200) |
Void Rule_RemoveEGroupEvent( LuaFunction rule, EGroupID egroup ) | |
Remove an active event rule for entities in the 'egroup' |
|
Source: [WW2Data.sga/Scar/RuleSystem.scar] (153) |
Void Rule_RemoveEntityEvent( LuaFunction rule, EntityID entity ) | |
Remove an active event rule for the 'entity' |
|
Source: [WW2Data.sga/Scar/RuleSystem.scar] (146) |
Void Rule_RemoveIfExist( LuaFunction rule ) | |
Remove a currently active rule if it exists(this does not remove any event rules) |
|
Source: [WW2Data.sga/Scar/RuleSystem.scar] (189) |
Void Rule_RemoveMe( ) | |
Remove a currently executing rule (only works inside a rule function) |
|
Source: [WW2Data.sga/Scar/RuleSystem.scar] (170) |
Void Rule_RemovePlayerEvent( LuaFunction rule, PlayerID player ) | |
Remove an active event rule for the 'player' |
|
Source: [WW2Data.sga/Scar/RuleSystem.scar] (163) |
Void Rule_RemoveSGroupEvent( LuaFunction rule, SGroupID sgroup ) | |
Remove an active event rule for squads in the 'sgroup' |
|
Source: [WW2Data.sga/Scar/RuleSystem.scar] (136) |
Void Rule_RemoveSquadEvent( LuaFunction rule, SquadID squad ) | |
Remove an active event rule for the 'squad' |
|
Source: [WW2Data.sga/Scar/RuleSystem.scar] (129) |
Setup |
Functions |
Void Setup_Difficulty( PlayerID player[, Integer difficulty, string Race, Table infantry_mod, Table vehicle_mod ) | |
Sets up difficulty (currently: modifies entity health, and sets AI difficulty). You should pass in Game_GetSPDifficulty() as the difficulty. You can optionally specify the race if the player is using squads different from his current race selection. |
|
Source: [WW2Data.sga/Scar/Setup.scar] (82) |
Void Setup_MissionPreset( Integer missionIDnum ) | |
Refers to 'MissionPresets.scar' and allows for all missions to have preset data taken into account. |
|
Source: [WW2Data.sga/Scar/Setup.scar] (387) |
PlayerID Setup_Player( Integer playerIndex, LocString playerName, String playerRace, Integer team ) | |
Initializes the all of the players settings in one function and returns the playerID. In most cases you will call this function from OnGameSetup and store the returned playerId in a global variable. The player index should be in the range [1 , (numPlayers)].<BR/><BR/> Valid player races: "Allied Airborne Company", "Allied Assault Company", "Allied Rifle Company", "Allied Tank Company", "Axis Armored Company","Axis Heavy Tank Company", "Axis Infantry Company","Axis Pioneer Company"<BR/><BR/> Example:<BR/> function OnGameSetup( )<BR/> <TAB/>g_player1 = Setup_Player(0, "PlayerDisplayName", "Allied Assault Company", 1)<BR/> <TAB/>-- g_player2 and g_player3 will be on the same team (allies)<BR/> <TAB/>g_player2 = Setup_Player(1, "$20000", "Axis Infantry Company", 2)<BR/> <TAB/>g_player3 = Setup_Player(2, "$20001", "Axis Infantry Company", 2)<BR/> --? The team ID starts from one!! end |
|
Source: [WW2Data.sga/Scar/Setup.scar] (42) |
SGroup |
Functions |
Void Cmd_StopSquadsExcept( SGroupID sgroup1[, Boolean stopCapture, Boolean stopBuild] ) | |
Pass in a group to command to 'stop'. Pass in booleans for capturing and building |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2494) |
Boolean EGroup_CanLoadSGroup( EGroupID sgroup, SGroupID sgroup_to_load, Boolean ALL) ) | |
Checks whether an EGroup can load ALL or ANY of the squads in the SGroup |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2812) |
Void Rule_AddEGroupEvent( LuaFunction fule, EGroup egroup, Integer eventtype ) | |
Add a rule to be executed when the event of 'eventType' has happened on the 'EGroup' Event types are: GE_EntityKilled |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2827) |
Void SGroup_Add( SGroupID group, SquadID squadron ) | |
Adds an squadron to the end of a group if the group doesnt already have it. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (449) |
Void SGroup_AddGroup( SGroupID group, SGroupID grouptoadd ) | |
Same as EGroup_AddGroup. Note: You cannot mix squad groups and entity groups. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (427) |
Void SGroup_AddLeaders( SGroupID sgroup ) | |
Adds a leader to all squads in a group that can take a leader. This function will bypass all cost and queue prereqs |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1710) |
Void SGroup_AddSlotItemToDropOnDeath( SGroupID groupid, Int itemid, Float drop_chance, Bool exclusive ) | |
Add to the list of slot items to drop when any one of the squads is wiped out SGroup_AddSlotItemToDropOnDeath( squadid, item, false ) |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1962) |
Boolean SGroup_CanInstantReinforceNow( SGroupID group, Boolean all ) | |
Return true if ANY or ALL of a group can reinforce now |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2345) |
Boolean SGroup_CanLoadSGroup( SGroupID sgroup, SGroupID sgroup_to_load, Boolean ALL) ) | |
Checks whether an SGroup can load ALL or ANY of the squads in the SGroup |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2799) |
Boolean SGroup_CanSeeSGroup( SGroupID sgroup, SGroupID targetsgroup, Boolean all ) | |
Returns true if ALL or ANY squads in a group can see ALL or ANY squads in a target sgroup. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1405) |
Void SGroup_Clear( SGroupID sgroup ) | |
Removes all entities from a group. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (421) |
Void SGroup_ClearPostureSuggestion( SGroupID sgroup ) | |
Clears any previous posture suggestions made to a squad |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModExtensions.cpp] (167) |
Boolean SGroup_Compare( SGroupID group1, SGroupID group2 ) | |
Returns true if the contents of the two groups are equal. Order of the entities does not matter. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (443) |
Boolean SGroup_ContainsBlueprints( SGroupID sgroup, BP/Table blueprints, Boolean all ) | |
Check if a group contains ALL or ANY of the blueprints. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1594) |
Boolean SGroup_ContainsSGroup( SGroupID group1, SGroupID group2, Boolean all ) | |
Returns true if SGroup1 contains ANY or ALL of SGroup2 |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (664) |
Boolean SGroup_ContainsSquad( SGroupID group, Integer SquadID ) | |
Returns true if SGroup contains a particular SquadID |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (645) |
Integer SGroup_Count( SGroupID sgroup ) | |
Returns the total number of spawned and despawned squads in a group. NOTE: SGroup_Count does not count the individiual soldiers in an SGroup. For that, use SGroup_TotalMembersCount |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (403) |
Integer SGroup_CountDeSpawned( SGroupID sgroup ) | |
Returns the number of despawned squads in a group. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (415) |
Integer SGroup_CountSpawned( SGroupID sgroup ) | |
Returns the number of spawned squads in a group. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (409) |
SGroupID SGroup_Create( String name ) | |
Returns a new squadron group with the given name. Squad groups are used for all units and vehicles. You can issue orders such as move and attack to an entire squad group. If you want a group for buildings or objects such as trees, use an EntityGroupObs instead.<BR/> Note that you are allowed to have unamed squadgroups or squadgroups with the samename. Be careful not to create duplicates of your squad group when you dont intend to. To be safe, you can check if the SquadGroupObs you want to create exists using SGroup_Exists( ) |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (361) |
SGroupID SGroup_CreateIfNotFound( String name ) | |
Find a squad group from name. Creates a new one with given name if it doesnt exist. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1437) |
Void SGroup_CreateKickerMessage( SGroupID group, PlayerID player, LocString textid ) | |
Create and display kicker message on the each squad in the sgroup to the player |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2361) |
Void SGroup_DeSpawn( SGroupID groupid ) | |
Despawn all spawned squads in a group. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1782) |
Void SGroup_Destroy( SGroupID egroup ) | |
Manually destroy a group that you dont need anymore. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (381) |
Void SGroup_DestroyAllInMarker( SGroupID sgroup, MarkerID marker ) | |
Destroys all items in a group that are in proximity to a given marker. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1682) |
Void SGroup_DestroyAllSquads( SGroupID sgroup ) | |
Destroys all spawned and despawned squads in a group. Be careful not to confuse this with SGroup_Destroy which destroys the group and NOT the squads it contains. This function will destroy spawned and despawned items in a group |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1578) |
Void SGroup_DisableCombatPlans( SGroupID groupID ) | |
Disables all current combat plans for the squads in the sgroup |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2712) |
Void SGroup_Duplicate( SGroupID sgroup1, SGroupID sgroup2 ) | |
Duplicates an SGroup Creates a copy of sgroup1 in sgroup2. The function will clear sgroup2 beforehand if necessary. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2525) |
Void SGroup_Eject( SGroupID sgroup, Position destination ) | |
Tells an SGroup to eject themselves from whatever they're inside (building or vehicle) |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2597) |
Void SGroup_EnableAttention( SGroupID sgroup, Boolean attentive ) | |
Sets whether an entity pays attention to its surroundings |
|
Source: [WW2Data.sga/Scar/Groups.scar] (3020) |
Void SGroup_EnableMinimapIndicator( SGroupID group, Boolean enable ) | |
Enable or disable minimap indicator on all squads in the sgroup |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2264) |
Void SGroup_EnableSurprise( SGroupID groupid, Boolean enable ) | |
Enables or disables the surprise feature for an sgroup |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2074) |
Void SGroup_EnableUIDecorator( SGroupID group, Boolean enable ) | |
Enable or disable decorators on all squads in the sgroup |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2245) |
Boolean SGroup_Exists( String name ) | |
Returns true if the squad group with the given name exists |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (517) |
Void SGroup_FaceEachOther( SGroupID sgroup1, SGroupID sgroup2 ) | |
Makes two SGroups face each other |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1725) |
Void SGroup_FaceMarker( SGroupID sgroup, MarkerID marker ) | |
Makes a SGroup face a marker. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1755) |
Void SGroup_Filter( SGroupID sgroup, ID/Table blueprint, Integer filtertype ) | |
Filters an SGroup by blueprint. Blueprints can be provided by name or by ID, and in a table if you want to filter on more than one type. Setting filtertype to FILTER_KEEP results in the group only containing squads of the types listed in the blueprint table. Setting filtertype to FILTER_REMOVE will strip those same squads out and leave those that aren't of the types listed. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2393) |
Void SGroup_FilterCount( SGroupID sgroup1, Int groupSize ) | |
Pass in a group and it will filter it down to the indicated number |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2434) |
Void SGroup_FilterThreat( SGroupID sgroup, LuaTable tableSBPs, [Boolean bEmpty] ) | |
Searches an SGroup and finds the first threat within the table (searching first to last) and removes all other SBPs. Optional parameter bEmpty can be set to true, will clear the SGroup if none of the SBPS in the table are found. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2457) |
Boolean SGroup_ForEach( SGroupID sgroup, LuaBinding::StackVarFunction f ) | |
Call a lua function for each item in a group. Function will recieve (groupid, itemindex, itemid) and should return true to break or false to continue. function Rule_Test( )<BR/> <TAB/>local DespawnSquad = function( sgroupid, itemindex, squadID )<BR/> <TAB/><TAB/>Squad_Despawn( squadID )<BR/> <TAB/>end<BR/><BR/> <TAB/>SGroup_ForEach( SGroup_FromName("sg_Squads"), DespawnSquad )<BR/> end<BR/><BR/> This functions iterates over spawned squads only. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (638) |
Boolean SGroup_ForEachAllOrAny( SGroupID sgroup, Boolean all, LuaBinding::StackVarFunction f ) | |
Call a lua function for each item in a group. Function will recieve (groupid, itemindex, itemid) and should return a bool. Only use this to TEST conditions on squads. DO NOT use this to perform operations on all squads, since it may not call your function on all squads (due to short circuit evaluation). This is used for checking if ALL or ANY items in a group match a given predicate. (eg. Are all items in a group choas marines)<BR/> This functions iterates over spawned squads only. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (582) |
Boolean SGroup_ForEachAllOrAnyEx( SGroupID sgroup, Boolean all, LuaBinding::StackVarFunction f, Boolean spawned, Boolean despawned ) | |
Same as SGroup_ForEachAllOrAny except you have a choice to iterate over spawned squads, despawned squads, or both. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (531) |
Boolean SGroup_ForEachEx( SGroupID sgroup, LuaBinding::StackVarFunction f, Boolean spawned, Boolean despawned ) | |
Same as SGroup_ForEach except you have a choice to iterate over spawned squads, despawned squads, or both. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (588) |
SGroupID SGroup_FromName( String name ) | |
Find an squadron group with a given name. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (387) |
Real SGroup_GetAvgHealth( SGroupID sgroup ) | |
Returns the average health of all units in a squad group. It now uses the same health measure that's used by the UI, so it does take into account fallen members of a squad |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1460) |
Real SGroup_GetAvgLoadout( SGroup sgroup ) | |
Returns the average loadout of all squads in a group as a percent [0.0, 1.0]. Example: A group of squads with loadouts of 4/8 and 1/1 would return 0.75 |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1511) |
SquadID SGroup_GetDeSpawnedSquadAt( SGroupID group, Integer index ) | |
Returns the despawned squad at a certain position in the group. This is a one-based index (use index 1 to get the first squad in the group.) It is an error if index > SGroup_GetDeSpawnedCount(). |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (483) |
EntityID SGroup_GetGarrisonedBuildingEntity( SGroupID groupid ) | |
Get the entity id of the building that any squad of the sgroup is garrisoned in |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1980) |
Void SGroup_GetHoldEGroup( SGroupID sgroup, EGroup EGroupHold ) | |
Gets all the entities that an SGroup may occupy and adds them to the EGroupHold |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2883) |
Void SGroup_GetHoldSGroup( SGroupID sgroup, SGroup SGroupHold ) | |
Gets all the squads that an SGroup may occupy and adds them to the SGroupHold |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2899) |
Boolean SGroup_GetInvulnerable( SGroupID sgroup, Boolean all ) | |
Check invulnerablity state for ALL or ANY squads in a squad group. Set all param to true to check for ALL or set to false to check for ANY. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1645) |
Void SGroup_GetLastAttacker( SGroup SGroupVictim, SGroup SGroupAttacker ) | |
Gets the last attacker(s) for all the squads in an SGroup Gets the last attacker for all the squads in an SGroup and stores that in SGroupAttacker |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2786) |
SquadID SGroup_GetLoadedVehicleSquad( SGroupID groupid ) | |
Get the squad id of the vehicle squad that any squad of the sgroup is loaded in |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2012) |
String SGroup_GetName( SGroupID sgroup ) | |
Returns the name of a given squad group. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (525) |
Int SGroup_GetNumSlotItem( SGroupID group, Int itemID ) | |
Get the number of slot items with the same ID that the squads in the sgroup own |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1915) |
Position SGroup_GetOffsetPosition( SGroupID sgroup, Integer offset, Real value ) | |
Returns a position (a certain distance away) relative to a squad's current position/orientation. see LuaConsts.scar for explanation of 'offset' parameter |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2870) |
Position SGroup_GetPosition( SGroupID group ) | |
Returns the center position of a squad group. Despawned squads are ignored. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (501) |
SquadID SGroup_GetRandomSpawnedSquad( SGroup sgroupid ) | |
Get a random spawned squad from sgroup |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1843) |
Table SGroup_GetSequence( String name ) | |
Builds a table of SGroupIDs that are named in a sequence. i.e. a name of "sg_killer" will find groups "sg_killer1", "sg_killer2" and so on, up until it looks for a group that isn't there. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2669) |
SquadID SGroup_GetSpawnedSquadAt( SGroupID group, Integer index ) | |
Returns the spawned squad at a certain position in the group. This is a one-based index (use index 1 to get the first squad in the group.) It is an error if index > SGroup_GetSpawnedCount(). |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (464) |
Real SGroup_GetSpread( SGroupID sgroup ) | |
Returns the distance from the centre of the group of the unit that furthest out. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2643) |
Void SGroup_GetSquadsHeld( SGroupID sgroup, SGroupID sgroupRecipient ) | |
Returns an sgroup containing all squads held by any squad in an sgroup |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2855) |
Float SGroup_GetSuppression( SGroupID groupid ) | |
Get the suppression level for the first squad in the sgroup |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2044) |
Float SGroup_GetVeterancyExperience( SGroupID groupid ) | |
Get the veterancy experience value for the first squad in the sgroup |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2105) |
Int SGroup_GetVeterancyRank( SGroupID groupid ) | |
Get the veterancy rank for the first squad in the sgroup |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2089) |
Boolean SGroup_HasCritical( SGroupID group, CriticalID critical, Boolean all ) | |
Returns true if ANY or ALL of the squads in the SGroup have the specified critical |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2209) |
Boolean SGroup_HasLeader( SGroupID sgroup, Boolean all ) | |
Check if ALL or ANY squads in a sgroup have a leader Set all param to true to check for ALL or set to false to check for ANY. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1666) |
Boolean SGroup_HasTeamWeapon( SGroupID sgroup, Boolean all ) | |
Returns true if ANY or ALL of the squads in an SGroup are carrying some kind of team weapon |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (1728) |
Boolean SGroup_HasUpgrade( SGroupID sgroup, UpgradeID upgrade, Boolean all ) | |
Returns whether ANY or ALL squads in an SGroup have the specified upgrade |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2629) |
Void SGroup_Hide( SGroupID sgroup, Bool hide ) | |
Hide or show all entities in all squads in an SGroup Bool should be true to hide, false to show |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2169) |
Void SGroup_IncreaseVeterancyExperience( SGroupID groupid, Float experience[, Boolean silent, Boolean applyModifiers] ) | |
Increase squad veterancy experience for all squads in the sgroup. Can do silent promotion (no sound/UI). Can skip modifiers, giving you direct control of experience gained. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2145) |
Void SGroup_IncreaseVeterancyRank( SGroupID groupid[, Integer numranks, Boolean silent] ) | |
Increase squad veterancy rank for all squads in the sgroup. By default, increases rank by 1. Can do silent promotion (no sound/UI. ex: mass rank insrease at mission start) |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2121) |
Void SGroup_Intersection( SGroupID group, SGroupID grouptointersect ) | |
Same as EGroup_Intersection. Note: You cannot mix squad groups and entity groups. Only squads that are in both groups will be added to 'group'.<BR/> The contents of 'grouptointersect' will not be changed.<BR/> Example: group = (1,2,3,4,5,6) grouptointersect = (2,4,6,8,10) --> group will now equal (2,4,6) |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (437) |
Boolean SGroup_IsAttackMoving( SGroupID sgroup, Boolean all ) | |
Returns true if ANY or ALL squads in an SGroup are attack moving. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2574) |
Boolean SGroup_IsCamouflaged( SGroupID sgroup, Boolean all ) | |
Returns true if ANY or ALL of the squads in an SGroup are camouflaged |
|
Source: [WW2Data.sga/Scar/Squad.scar] (223) |
Boolean SGroup_IsCapturing( SGroupID sgroup, Boolean ALL ) | |
Checks if ANY or ALL squads in an SGroup are capturing |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2951) |
Boolean SGroup_IsConstructingBuilding( SGroup sgroup, Boolean all ) | |
Returns true if ALL or ANY squads in a group are currently constructing a building. Set all to true to check for ALL or set to false to check for ANY |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2975) |
Boolean SGroup_IsDoingAbility( SGroupID sgroupid, AbilityID ability, Boolean all ) | |
Returns if ANY or ALL members of an SGroup are doing an ability |
|
Source: [WW2Data.sga/Scar/Groups.scar] (3006) |
Boolean SGroup_IsDoingAttack( SGroupID sgroup, Boolean all, Float time ) | |
Returns true if ALL or ANY squads are attacking within the time. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1389) |
Boolean SGroup_IsDugIn( SGroupID group, Boolean all ) | |
Returns true if ANY or ALL of the squads in the SGroup is dug in (or in the process of digging in) |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2228) |
Boolean SGroup_IsEmpty( SGroupID sgroup ) | |
Returns true if a named squad group is empty |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1448) |
Void SGroup_IsHoldingAny( SGroupID sgroup ) | |
Returns whether any entity in an SGroup has a hold on anything |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2840) |
Boolean SGroup_IsIdle( SGroupID sgroup, Boolean ALL ) | |
Checks if ANY or ALL squads in an SGroup are idle |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2965) |
Real/Boolean SGroup_IsInCover( SGroupID sgroup[, Boolean all] ) | |
Returns the percentage of the SGroup members that are in cover. Alternatively, specify ANY or ALL as a second parameter to return true/false. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1312) |
Boolean SGroup_IsInfiltrated( SGroupID sgroup, Boolean all ) | |
Returns true if ALL or ANY squads in a group are infiltrated |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1421) |
Boolean SGroup_IsInHoldEntity( SGroupID sgroup, Boolean ALL ) | |
Checks if ANY or ALL squads in an SGroup are garrisoned in an entity (building) |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2754) |
Boolean SGroup_IsInHoldSquad( SGroupID sgroup, Boolean ALL ) | |
Checks if ANY or ALL squads in an SGroup are garrisoned in a squad (transport vehicle) |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2769) |
Boolean SGroup_IsMoving( SGroupID sgroup, Boolean all ) | |
Returns true if ANY or ALL squads in an SGroup are moving. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2374) |
Bool SGroup_IsOnScreen( PlayerID player, SGroupID group, Bool all[, Float percent] ) | |
Returns true if ANY or ALL (use those keywords) of the squads in the group are present onscreen. You can pass in a percentage of the screen to check, so 0.8 would be a centered rectangle occupying 80% of the screen. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2556) |
Boolean SGroup_IsPinned( SGroupID group, Boolean all ) | |
Returns true if ANY or ALL of a group is pinned |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2313) |
Boolean SGroup_IsReinforcing( SGroupID sgroup, Boolean all ) | |
Returns true if ALL or ANY squads in a group are currently calling for reinforcments. Set all to true to check for ALL or set to false to check for ANY |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2920) |
Boolean SGroup_IsRetreating( SGroupID sgroup, Boolean all ) | |
Returns true if ANY or ALL of the squads in an SGroup are currently retreating |
|
Source: [WW2Data.sga/Scar/Squad.scar] (174) |
Boolean SGroup_IsSettingDemolitions( SGroupID sgroup, Boolean all ) | |
Returns true if ANY or ALL squads are setting demolitions |
|
Source: [WW2Data.sga/Scar/Squad.scar] (187) |
Boolean SGroup_IsSuppressed( SGroupID group, Boolean all ) | |
Returns true is ANY or ALL of a group is suppressed |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2296) |
Boolean SGroup_IsUnderAttack( SGroupID sgroup, Boolean all, Float time ) | |
Returns true if ALL or ANY squads are under attack within the time. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1360) |
Bool SGroup_IsUnderAttackByPlayer( SGroupID group, PlayerID attackerplayer, Float duration ) | |
Check if the squads are attacked by the player |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1935) |
Boolean SGroup_IsUnderAttackFromDirection( SGroupID sgroup, Boolean all, Integer offset, Float time ) | |
Returns true if ALL or ANY squads are under attack from a direction within the time. see LuaConsts.scar for types of directions. you can pass in a table of directions |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1372) |
Boolean SGroup_IsUpgrading( SGroupID sgroup, UpgradeBlueprint blueprint, Boolean all ) | |
Returns true if ALL or ANY squads in a group are currently upgrading. You can pass in nil for upgradeid if it doesn't matter what is being upgraded. Set all to true to check for ALL or set to false to check for ANY |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2934) |
Boolean SGroup_IsUsingAbility( SGroupID sgroup, Boolean ALL ) | |
Checks if ANY or ALL squads in an SGroup are using an ability Does not check WHAT ability a squad is using. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2984) |
Void SGroup_Kill( SGroupID sgroup ) | |
Kills all squads in an SGroup. This kills them 'naturally', as opposed to SGroup_DestroyAllSquads() which makes them blink out of existance. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2615) |
Void SGroup_MergeFirstSquad( SGroup sgroupid1, SGroup sgroupid2 ) | |
Merge first squads in the SGroups. The resulting squad will be in both SGroups Merging only works on squads with the same blueprint type. Squad loadout limit is ignored. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1797) |
Void SGroup_Remove( SGroupID group, SquadID squadron ) | |
Removes an squadron from a group. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaGroup.cpp] (455) |
Void SGroup_RemoveGroup( SGroupID group, SGroupID grouptoremove ) | |
Remove from the first SGroup all squads contained in the second SGroup. SGroup2 remains untouched. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2189) |
Void SGroup_ReSpawn( SGroupID groupid ) | |
Respawn all despawned squads in a group. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1767) |
Void SGroup_RestoreCombatPlans( SGroupID sgroupID ) | |
Restore all current combat plans for the squads in the sgroup |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2733) |
Void SGroup_RewardActionPoints( SGroupID sgroup, Float actionpoint ) | |
Give action points to the squad |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2991) |
Void SGroup_SetAnimatorState( SGroupID sgroupid, String stateMachineName, String stateName ) | |
Set animation state of a state machine for an SGroup. Please only use this for simple animations |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2998) |
Void SGroup_SetAutoTargetting( SGroupID group, String hardpoint, Bool enable ) | |
Sets whether a weapon to auto-target things or not |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1874) |
Real SGroup_SetAvgHealth( SGroupID sgroup, Real healthpercent ) | |
Sets the health of each squad in a squad group to a given percent [0.0, 1.0]. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1493) |
Real SGroup_SetAvgMorale( SGroup sgroup, Real moralepercent ) | |
Sets the moral of each squad in a squad group to a given percent [0.0, 1.0]. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1541) |
Void SGroup_SetCrushable( SGroupID sgroup, Boolean crushable ) | |
Overrides crushable behavior for an sgroup |
|
Source: [WW2Data.sga/Scar/Groups.scar] (3013) |
Void SGroup_SetInvulnerable( SGroupID sgroup, Boolean/Real enabled[, Float reset_time] ) | |
Enable/Disable invulnerablity for an entire SGroup. Use true and false for simple on/off, or use a number between 0.0 and 1.0 for more precise control on how much damage a squad can take before it takes no more. The optional reset_time is used to automatically remove invulnerability after a set time. If invulnerable, both health and critical damage are disabled. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1617) |
Void SGroup_SetMoodMode( SGroupID group, Integer mode ) | |
Set soldier mood mode. Mode could be MM_Auto, MM_ForceCalm or MM_ForceTense |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2329) |
Void SGroup_SetMoveType( SGroupID group, MoveTypeBlueprint movetype ) | |
Set the move type for an SGroup - find the move types in the MOVETYPE table in LuaConsts.scar |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1899) |
Void SGroup_SetPlayerOwner( SGroupID sgroup, PlayerID owner ) | |
Changes the player owner of spawned and despawned squads in an SGroup. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1558) |
Void SGroup_SetSelectable( SGroup sgroupid, bool selectable ) | |
Set player selectable state of squads in the sgroup |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1861) |
Void SGroup_SetSuppression( SGroupID groupid, Float suppression ) | |
Set the suppression level for all squads in the sgroup |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2059) |
Void SGroup_SetTeamWeaponCapturable( SGroupID group, Boolean enable ) | |
Set team weapon in the squads to be capturable or not |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2280) |
SGroupID SGroup_Single( SGroupID groupID, squadID squad ) | |
Creates a squad group containing a single squad Creates an SGroup containing just one squad, creating the group if it doesn't exist and clearing it if it does. It returns the name of the SGroup. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2692) |
Void SGroup_SnapFaceEachOther( SGroupID sgroup1, SGroupID sgroup2 ) | |
Makes two SGroups face each other at no time |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1740) |
SquadID SGroup_SplitFirstSquad( SGroup sgroupid1, INT num ) | |
Split first squad into a new squad with size "num" The new squad would not have any upgrads or modifiers from the original squad |
|
Source: [WW2Data.sga/Scar/Groups.scar] (1822) |
Void SGroup_SuggestPosture( SGroupID sgroup, unsigned posture, Real duration ) | |
Suggests a posture to an SGroup, lasting the passed duration Posture of 0 is prone, 1 is kneel/crouch, and 2 is standing. Duration is in seconds, negative means indefinate. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModExtensions.cpp] (151) |
Integer SGroup_TotalMembersCount( SGroupID sgroup ) | |
Returns the total count of all members of all the squads in a given SGroup. |
|
Source: [WW2Data.sga/Scar/Groups.scar] (2539) |
Void SGroup_WarpToMarker( SGroupID sgroup, MarkerID marker ) | |
Warps all members of an SGroup immediately to a marker |
|
Source: [WW2Data.sga/Scar/Squad.scar] (164) |
Void SGroup_WarpToPos( SGroupID sgroup, Position pos ) | |
Warps all members of an SGroup immediately to a new position |
|
Source: [WW2Data.sga/Scar/Squad.scar] (150) |
Position Squad_GetOffsetPosition( SquadID squad, Integer offset, Real distance ) | |
Returns a position relative to a squad's current position and orientation. see LuaConsts.scar for explanation of 'offset' parameter. |
|
Source: [WW2Data.sga/Scar/Squad.scar] (200) |
Boolean Squad_IsCamouflaged( SquadID squad ) | |
Returns whether ANY entity in the squad is camouflaged |
|
Source: [WW2Data.sga/Scar/Squad.scar] (207) |
Void Squad_SetAnimatorState( SquadID squadid, String stateMachineName, String stateName ) | |
Set animation state of a state machine for a squad Please only use this for simple animations |
|
Source: [WW2Data.sga/Scar/Squad.scar] (237) |
Sound |
Functions |
Void Sound_DisableSpeechEvent( Integer event ) | |
Disables certain speech events. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaSound.cpp] (93) |
Void Sound_PreCacheSinglePlayerSpeech( String mission ) | |
pre-caches single player speech. For instance pre-caching mission 1 speech is done like: Sound_PreCacheSinglePlayerSpeech( "mission01" ) |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaSound.cpp] (99) |
Void Speech_SetGlobalStealthRead( Real sunlightThreshold ) | |
Overrides default stealth speech auto-detect mechanism. Stealth speech will play when sunlight brightness is below the threshold, with 0 being total darkness and 1 being full brightness. Set to -1 to use the default behavior. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaSound.cpp] (106) |
Squad |
Functions |
Void SGroup_FacePosition( SGroupID sgroup, Position pos ) | |
Works like Squad_FacePosition. All Squads will face the same direction, with the squad the closest to the center determining the direction. This function works on spawned squads only. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1190) |
Void SGroup_SnapFacePosition( SGroupID sgroup, Position pos ) | |
Works like SGroup_FacePosition except with no interpolation. All Squads will face the same direction, with the squad the closest to the center determining the direction. This function works on spawned squads only. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1231) |
Void Squad_AddSlotItemToDropOnDeath( SquadID squad, SlotItemBlueprint pbg, Real dropChance, Boolean exclusive ) | |
Add to the list of slot items to drop when this squad is wiped out Squad_AddSlotItemToDropOnDeath( squadid, item, false ) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (868) |
Boolean Squad_CanCaptureStrategicPoint( SquadID squad, EntityID entity ) | |
Returns true if squad can capture stategic point |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (789) |
Boolean Squad_CanHold( SquadID squad ) | |
Checks whether a squad can hold any squad |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (936) |
Boolean Squad_CanInstantReinforceNow( SquadID squad ) | |
Returns true if the squad is available to be reinforced |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (377) |
Boolean Squad_CanLoadSGroup( SquadID squad, SGroupID loadthis, Boolean bCheckSquadState, Boolean bOverload ) | |
Checks whether a squad can load an entire sgroup |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (968) |
Boolean Squad_CanLoadSquad( SquadID squad, SquadID loadthis, Boolean bCheckSquadState, Boolean bOverload ) | |
Checks whether a squad can load another squad |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (952) |
Boolean Squad_CanSeeEntity( SquadID squad, EntityID entity ) | |
Returns true if a given entity is in the squads sight radius |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (595) |
Boolean Squad_CanSeeSquad( SquadID squad, SquadID target ) | |
Returns true if a target squad is in the squads sight radius |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (607) |
Void Squad_ClearPostureSuggestion( SquadID squad ) | |
Clears any previous posture suggestions made to a squad |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModExtensions.cpp] (194) |
Integer Squad_Count( SquadID squad ) | |
Returns the number of units currently in a squad (spawned AND despawned!!) |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaSquad.cpp] (98) |
SquadID Squad_CreateAndSpawnToward( SquadBlueprint sbp, PlayerID player, Integer loadoutCount, Position pos, Position toward ) | |
Create a squad, spawn it and assign it to a player. This will create a squad of size 'loadoutCount' and of unit type 'unit_base' (from squad blueprint)<BR/> 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: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (136) |
Void Squad_DeSpawn( SquadID squad ) | |
Despawn the entire squad at its current position. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaSquad.cpp] (88) |
Void Squad_Destroy( SquadID squad ) | |
Remove an squad from the world and destroy it. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaSquad.cpp] (38) |
Void Squad_EnableProductionQueue( SquadID squad, Boolean enable ) | |
Sets whether a squad can produce anything (including upgrades) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1581) |
Void Squad_EnableSurprise( SquadID squad, Boolean enable ) | |
Enables or disables the surprise feature on thie given squad |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (585) |
Void Squad_FacePosition( SquadID squad, Position pos ) | |
Set the rotation of all troopers in a squad to face the position. The center of the squad will face the position and all other troops will use the same rotation as the from center vector.<BR/><BR/> This function works on spawned squads only. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1162) |
Void Squad_FaceSquad( SquadID squad1, SquadID squad2 ) | |
Get 2 squads to face each other. This function works on spawned squads only. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1169) |
Position Squad_FindCover( SquadID squad, Position pos, Real coverSearchRadius ) | |
Tries to find cover within a certain radius of a position. If no cover is found, it returns the position used for the search. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1552) |
Position Squad_FindCoverCompareCurrent( SquadID squad, Position pos, Real coverSearchRadius, Real maxPathDistanceFromGoal, Boolean compareToCurrentCover ) | |
Tries to find cover within a certain radius of a position, traveling a max distance to get there, and possibly comparing against current position's cover. If no cover is found, it returns the position used for the search. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1499) |
SquadID Squad_FromWorldID( Integer id ) | |
Get a squad from a mission editor ID. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaSquad.cpp] (169) |
Integer Squad_GetActiveCommand( SquadID squad ) | |
Returns the active squad command. Valid squad commands are SQUADSTATEID_Idle, SQUADSTATEID_Move, SQUADSTATEID_Stop, SQUADSTATEID_Combat, SQUADSTATEID_Capture, SQUADSTATEID_Ability, SQUADSTATEID_Construction, SQUADSTATEID_CombatStance, SQUADSTATEID_Load, SQUADSTATEID_Unload, SQUADSTATEID_HoldUnload, SQUADSTATEID_Retreat, SQUADSTATEID_WeaponTransition, SQUADSTATEID_AttackMove, SQUADSTATEID_CaptureTeamWeapon, SQUADSTATEID_Defuse, SQUADSTATEID_PlaceCharges, SQUADSTATEID_DefuseMine, SQUADSTATEID_PickUpSlotItem, SQUADSTATEID_Plan, SQUADSTATEID_Patrol, SQUADSTATEID_RevertFieldSupport. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (341) |
String Squad_GetAttackPlan( SquadID squad ) | |
Get name of current Squad AI attack plan |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1363) |
Void Squad_GetAttackTargets( SquadID squad, SGroupID group ) | |
Find the squad member current or forced targets. If found, the targets squads are added to the sgroup. Entity targets like buildings are ignored |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (546) |
String Squad_GetBaseUnitName( SquadID squad ) | |
Returns a string containing the base unit name for the current squadron |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (211) |
SquadBlueprint Squad_GetBlueprint( SquadID squad ) | |
Returns the name of the squad blueprint (from the attribute editor) |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaSquad.cpp] (157) |
Position Squad_GetDestination( SquadID squad ) | |
Returns the squad's destination, if it's moving. IMPORTANT: you must only call this function if Squad_HasDestination has returned true. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1474) |
Integer Squad_GetGameID( SquadID squad ) | |
Returns an integer containing the unqiue squad ID for this squad. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaSquad.cpp] (163) |
Position Squad_GetHeading( SquadID squad ) | |
Returns the average heading of the spawned units in the squad. The heading is currently a lua table with three entries (x, y, z) |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaSquad.cpp] (53) |
Real Squad_GetHealth( SquadID squad ) | |
Returns the current health of a squad. The current health of the squad is the total health of each entity in that squad. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (240) |
Real Squad_GetHealthMax( SquadID squad ) | |
Returns the max health of the 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.<BR/><BR/> |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (292) |
Real Squad_GetHealthPercentage( SquadID squad ) | |
Returns how much of an original squad's health is left, accounting for deaths (ex: a squad of 3 riflemen would be at 50% health, since they started with 6 members) Note: This is the same percentage that the UI uses. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (314) |
EntityID Squad_GetHoldEntity( SquadID squad ) | |
Get which building (entity) is the squad garrisoned Please use Squad_IsInHold() to check first |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (880) |
SquadID Squad_GetHoldSquad( SquadID squad ) | |
Get which vehicle (squad) is the squad garrisoned Please use Squad_IsInHold() to check first |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (894) |
Bool Squad_GetInvulnerable( SquadID squad ) | |
Check if the squad is invulnerable or not |
|
Source: [WW2Data.sga/Scar/Squad.scar] (59) |
Real Squad_GetInvulnerableMinCap( SquadID squad ) | |
Returns the highest invulnerable min cap percentage from members of the squad. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (741) |
Void Squad_GetLastAttacker( SquadID squad, SGroupID group ) | |
Find the last squad attacker on this squad. If found, the squad is added to the sgroup |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (497) |
Void Squad_GetLastAttackers( SquadID squad, SGroupID group, Real timeSeconds ) | |
Find the squad attackers on this squad from the last seconds specified. If found, the squads are added to the sgroup. Building attackers are ignored |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (513) |
Integer Squad_GetMax( SquadID squad ) | |
Returns the max number of units allowed in the squadron (from squad_loadout_ext) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (229) |
Integer Squad_GetNumSlotItem( SquadID squad, SlotItemBlueprint pbg ) | |
Get the number of slot items with the same ID that the squad has Squad_GetNumSlotItem( squadid, item ) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (807) |
String Squad_GetPinnedPlan( SquadID squad ) | |
Get name of current Squad AI reaction plan |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1411) |
PlayerID Squad_GetPlayerOwner( SquadID squad ) | |
Returns the Player owner of the given squad. Squad MUST NOT be owned by the world. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaSquad.cpp] (123) |
Position Squad_GetPosition( SquadID squad ) | |
Returns the average position of the spawned units in the squad. The position is currently a lua table with three entries (x, y, z) |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaSquad.cpp] (47) |
Position Squad_GetPositionDeSpawned( SquadID squad ) | |
Returns the average position of the despawned AND spawned units in the squad. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaSquad.cpp] (60) |
Blueprint Squad_GetProductionQueueItem( SquadID squad, Integer index ) | |
Returns the blueprint for a production queue item with index. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1602) |
Integer Squad_GetProductionQueueItemType( SquadID squad, Integer index ) | |
Returns the production type (PITEM_Upgrade, PITEM_Spawn, PITEM_SquadUpgrade, PITEM_SquadReinforce, PITEM_PlayerUpgrade) for a production queue item with index. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1616) |
Integer Squad_GetProductionQueueSize( SquadID squad ) | |
Returns the number of items in the squad's production queue. It is an error to call this function on a squad that does not have a production queue.<BR/> Use Squad_HasProductionQueue to check that the squad has a queue. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1590) |
String Squad_GetReactionPlan( SquadID squad ) | |
Get name of current Squad AI reaction plan |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1395) |
String Squad_GetRetaliationPlan( SquadID squad ) | |
Get name of current Squad AI retaliation plan |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1379) |
Integer Squad_GetSlotItemAt( SquadID squad, Integer index ) | |
Returns the ID of the slot item. Use Squad_GetSlotItemCount to determine how many slot items the squad has. The first index is 1 |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (833) |
Integer Squad_GetSlotItemCount( SquadID squad ) | |
Returns how many slot items this squad has |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (820) |
LuaTable Squad_GetSlotItemsTable( SquadID squadid ) | |
Returns a table of SlotItem ID's that this squad currently owns |
|
Source: [WW2Data.sga/Scar/Squad.scar] (108) |
Boolean Squad_GetSquadsHeld( SquadID squad, SGroupID sgroup ) | |
Adds all squads held by 'squad' to an sgroup |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (986) |
Real Squad_GetSuppression( SquadID squad ) | |
Check current squad suppresion level. Return value from 0 to 1 |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1015) |
Real Squad_GetVeterancyExperience( SquadID squad ) | |
Get current squad veterancy experience |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1100) |
Integer Squad_GetVeterancyRank( SquadID squad ) | |
Get current squad veterancy rank. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1088) |
Void Squad_GiveSlotItem( SquadID squad, SlotItemBlueprint pbg ) | |
Gives a slot item to the squad. Can fail due to not enough slots left |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (854) |
Void Squad_GiveSlotItemsFromTable( SquadID squadid, LuaTable itemTable ) | |
Gives all slot items in a table to the squad. The table should come from Squad_GetSlotItemsTable |
|
Source: [WW2Data.sga/Scar/Squad.scar] (127) |
Boolean Squad_HasActiveCommand( SquadID squad ) | |
Returns true if there's an active command currently for the squad |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (335) |
Bool Squad_HasCritical( SquadID squad, CriticalID critical ) | |
Check if a squad has a critical or not |
|
Source: [WW2Data.sga/Scar/Squad.scar] (69) |
Boolean Squad_HasDestination( SquadID squad ) | |
Returns whether this squad is moving and has a destination |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1462) |
Boolean Squad_HasProductionQueue( SquadID squad ) | |
Returns true if a squad has a production queue. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1575) |
Boolean Squad_HasTeamWeapon( SquadID squad ) | |
Returns true if the squad is carrying some kind of team weapon |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (1743) |
Boolean Squad_HasUpgrade( SquadID squad, UpgradeBlueprint pbg ) | |
Return true if the squad has purchased the specified upgrade. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1277) |
Void Squad_IncreaseVeterancyExperience( SquadID squad, Real experience, Boolean silent, Boolean applyModifiers ) | |
Increase current squad veterancy experience |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1122) |
Void Squad_IncreaseVeterancyRank( SquadID squad, Integer numranks, Boolean silent ) | |
Increase current squad veterancy rank |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1112) |
Void Squad_InstantSetupTeamWeapon( SquadID squad ) | |
Stops current squads activity and instant setup the team weapon if they have one |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1128) |
Boolean Squad_IsAttacking( SquadID squad, Real time ) | |
Returns true if any unit in the squad is attacking within the time Time is in seconds |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (483) |
Boolean Squad_IsDoingAbility( SquadID squad, AbilityBlueprint pbg ) | |
True if squad is currently performing the given ability |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1061) |
Boolean Squad_IsHoldingAny( SquadID squad ) | |
Check if the squad has a hold on anything (use this on vehicles) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (930) |
Boolean Squad_IsInCover( SquadID squadId, Boolean all ) | |
Returns true if ALL or ANY troopers in a squad are in cover. Set all to true to check if all troopers are in cover or set to false to check if any. |
|
Source: [WW2Data.sga/Scar/Squad.scar] (14) |
Boolean Squad_IsInHoldEntity( SquadID squad ) | |
Check if the squad is garrisoned in entity (building) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (906) |
Boolean Squad_IsInHoldSquad( SquadID squad ) | |
Check if the squad is loaded in squad (vehicle |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (918) |
Boolean Squad_IsMoving( SquadID squad ) | |
Returns whether any entity in the squad is moving |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1456) |
Boolean Squad_IsPinned( SquadID squad ) | |
True if squad is currently pinned |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1049) |
Boolean Squad_IsReinforcing( SquadID squad ) | |
Returns true if the squad is currently reinforcing. This function will return false if the squad does not have a reinforce ext. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (353) |
Boolean Squad_IsRetreating( SquadID squadid ) | |
Returns true if the squad is currently retreating |
|
Source: [WW2Data.sga/Scar/Squad.scar] (90) |
Boolean Squad_IsSuppressed( SquadID squad ) | |
True if squad is currently suppressed |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1037) |
Boolean Squad_IsUnderAttack( SquadID squad, Real time ) | |
Returns true if any unit in the squad is under attack within the time Time is in seconds |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (440) |
Boolean Squad_IsUnderAttackByPlayer( SquadID squad, PlayerID pAttackerOwner, Real time ) | |
Returns true if squad is under attack by enemy from a particular player Time is in seconds |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (491) |
Boolean Squad_IsUnderAttackFromDirection( SquadID squad, Integer offset, Real timeSeconds ) | |
Returns true if the squad was under attack from a certain direction (8 offset types, see LuaConsts.scar) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (446) |
Boolean Squad_IsUpgrading( SquadID squad, UpgradeBlueprint upgrade ) | |
Returns true if the squad is currently upgrading something specific. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (389) |
Boolean Squad_IsUpgradingAny( SquadID squad ) | |
Returns true if the squad is currently upgrading anything. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (414) |
Boolean Squad_IsValid( Integer id ) | |
Check if a squad with the given ID can be found in the world |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaSquad.cpp] (184) |
Void Squad_Kill( SquadID squad ) | |
Kill whole squad. Sets health to 0, and triggers death effects. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (284) |
Void Squad_Merge( SquadID dest, SquadID source ) | |
Merge source squad into destination squad. The source squad will become invalid after the merge |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (620) |
Void Squad_RewardActionPoints( SquadID squad, Real actionPoint ) | |
Give squad action points |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1558) |
Void Squad_SetAttackPlan( SquadID squad, String planName ) | |
Set overriding Squad AI attack plan |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1283) |
Void Squad_SetHealth( SquadID squad, Real healthPercent ) | |
Set the health of all units in a squad. Health must be in range [0.0, 1.0] |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (261) |
Void Squad_SetInvulnerable( SquadID squad, Bool enable, Float reset_time ) | |
Set invulnerability on the squad. Reset time is in seconds. If it it set, the invulnerability will expire after this time. |
|
Source: [WW2Data.sga/Scar/Squad.scar] (41) |
Void Squad_SetInvulnerableMinCap( SquadID squad, Real minHealthPercentage, Real resetTime ) | |
Make a squad invulnerable to physical damage. resetTime is the time in seconds that vulnerability will be restored.; zero time for reset time means the buff will last forever |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (718) |
Void Squad_SetMoodMode( SquadID squad, Integer mode ) | |
Set soldier mood mode. Can be MM_Auto, MM_ForceCalm and MM_ForceTense |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1443) |
Void Squad_SetMoveType( SquadID squad, MoveTypeBlueprint movetypePBG ) | |
Sets the squad's move type |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (795) |
Void Squad_SetPinnedPlan( SquadID squad, String planName ) | |
Set overriding Squad AI pinned plan |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1343) |
Void Squad_SetPlayerOwner( SquadID squad, PlayerID owner ) | |
Changes the owner of the given squad. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/LuaSquad.cpp] (139) |
Void Squad_SetPosition( SquadID squad, Position pos, Position toward ) | |
Moves the squad to an arbitrary new position |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (172) |
Void Squad_SetReactionPlan( SquadID squad, String planName ) | |
Set overriding Squad AI reaction plan |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1323) |
Void Squad_SetRetaliationPlan( SquadID squad, String planName ) | |
Set overriding Squad AI idle retaliation plan |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1303) |
Void Squad_SetSuppression( SquadID squad, Real percentage ) | |
Set current squad suppresion level. Suppression value value from 0 to 1 |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1027) |
Void Squad_SetTeamWeaponCapturable( SquadID squad, Boolean capturable ) | |
Set team weapon entity inside the squad to be capturable or not when it becomes neutral |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (1427) |
Boolean Squad_Spawn( SquadID squad, Position pos ) | |
Spawn the entire squad at a given position |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (783) |
Boolean Squad_SpawnToward( SquadID squad, Position pos, Position toward ) | |
Spawn the entire squad at a given position |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (761) |
SquadID Squad_Split( SquadID squad, Integer num ) | |
Split the squad into 2. The new squad size is specified by the number passed in The new squad size is specified by the number passed in. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaSquad.cpp] (666) |
Void Squad_SuggestPosture( SquadID squad, unsigned posture, Real duration ) | |
Suggests a posture to a squad, lasting the passed duration Posture of 0 is prone, 1 is kneel/crouch, and 2 is standing. Duration is in seconds, negative means indefinate. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModExtensions.cpp] (184) |
Void Squad_WarpToPos( SquadID squad, Position pos ) | |
Warps a squad immediately to a new position |
|
Source: [WW2Data.sga/Scar/Squad.scar] (32) |
State Machine |
Functions |
StateMachineId StateMachine_AddTable( Table states ) | |
Adds a table of states to the state machine table, and returns the state machine ID. |
|
Source: [WW2Data.sga/Scar/StateMachine.scar] (18) |
String/Integer StateMachine_GetLastState( StateMachineId id ) | |
Returns the last state that ran on the state machine. Can be checked while the current state is being executed. Type of return value depends on type of data being used to represent current state (recommended data type is string or integer) |
|
Source: [WW2Data.sga/Scar/StateMachine.scar] (174) |
String StateMachine_GetState( StateMachineId id ) | |
Returns the current state that the state machine is executing |
|
Source: [WW2Data.sga/Scar/StateMachine.scar] (142) |
Void StateMachine_RemoveAll( Void ) | |
Removes all currently running state machines. |
|
Source: [WW2Data.sga/Scar/StateMachine.scar] (189) |
Void StateMachine_RemoveTable( StateMachineId id ) | |
Removes a set of states from the State Machine Manager. |
|
Source: [WW2Data.sga/Scar/StateMachine.scar] (157) |
Stats |
Functions |
Integer Stats_BuildingsLost( PlayerID player ) | |
Returns how many buildings a player has lost |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaStatLogging.cpp] (207) |
Integer Stats_EntitiesKilled( PlayerID player ) | |
Returns how many entities a player has killed |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaStatLogging.cpp] (147) |
Integer Stats_InfantryLost( PlayerID player ) | |
Returns how many infantry a player has lost |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaStatLogging.cpp] (195) |
Integer Stats_KillsTotal( PlayerID player ) | |
Returns a player's total kills |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaStatLogging.cpp] (129) |
Integer Stats_PlayerAt( Integer index ) | |
Returns player id at given index |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaStatLogging.cpp] (117) |
Integer Stats_PlayerCount( Void ) | |
Returns how many players in the game |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaStatLogging.cpp] (111) |
ResourceAmount Stats_ResGathered( PlayerID player ) | |
Returns how many resources a player has gathered |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaStatLogging.cpp] (135) |
ResourceAmount Stats_ResSpent( PlayerID player ) | |
Returns how many resources a player has spent |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaStatLogging.cpp] (141) |
Integer Stats_SoldiersKilled( PlayerID player ) | |
Returns how many soldiers a player has killed |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaStatLogging.cpp] (153) |
Integer Stats_StructuresKilled( PlayerID player ) | |
Returns how many structures a player has killed |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaStatLogging.cpp] (165) |
Integer Stats_TeamTally( Integer teamindex, Function statfunction ) | |
Takes a statistic function and totals up the results for all the players on a given team |
|
Source: [WW2Data.sga/Scar/DesignerLib.scar] (55) |
Integer Stats_TotalDuration( Void ) | |
Returns game time, in seconds |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaStatLogging.cpp] (123) |
Integer Stats_TotalSquadsLost( PlayerID player ) | |
Returns how many squads a playe has lost |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaStatLogging.cpp] (213) |
Integer Stats_UnitSoldierKills( PlayerID player, SquadBlueprint sbp ) | |
Returns how many soldiers an SBP have killed. ex: how many soldiers did player2's riflemen kill? |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaStatLogging.cpp] (177) |
Integer Stats_UnitStructureKills( PlayerID player, SquadBlueprint sbp ) | |
Returns how many structures an SBP have killed. ex: how many structures did player2's riflemen kill? |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaStatLogging.cpp] (189) |
Integer Stats_UnitTotalKills( PlayerID player, SquadBlueprint sbp ) | |
Returns how many entities an SBP have killed. ex: how many entities did player2's riflemen kill? |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaStatLogging.cpp] (171) |
Integer Stats_UnitVehicleKills( PlayerID player, SquadBlueprint sbp ) | |
Returns how many vehicles an SBP have killed. ex: how many vehicles did player2's riflemen kill? |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaStatLogging.cpp] (183) |
Integer Stats_VehiclesKilled( PlayerID player ) | |
Returns how many vehicles a playe has killed |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaStatLogging.cpp] (159) |
Integer Stats_VehiclesLost( PlayerID player ) | |
Returns how many vehicles a player has lost |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaStatLogging.cpp] (201) |
Stinger |
Functions |
Void Stinger_AddEvent( PlayerID player, MarkerID marker, EVENT eventname ) | |
Add a stinger to trigger at a specific location You must remember to set Stinger_Manager going as a rule with a regular interval |
|
Source: [WW2Data.sga/Scar/Stingers.scar] (22) |
Void Stinger_AddFunction( PlayerID player, MarkerID marker, LuaFunction functionname ) | |
Add a stinger to trigger at a specific location You must remember to set Stinger_Manager going as a rule with a regular interval |
|
Source: [WW2Data.sga/Scar/Stingers.scar] (32) |
Void Stinger_Remove( PlayerID player, MarkerID marker ) | |
Remove all stingers triggered from a specific location |
|
Source: [WW2Data.sga/Scar/Stingers.scar] (41) |
Tanks |
Functions |
Integer TankCombat_AddGroup( LuaTable SGroups, SGroup/EGroup/Position/Marker AttackTarget, [Position Retreat, Integer RoleGroupId]) ) | |
Adds a group of sgroups (that should be vehicles), that will attempt to attack the designated object -- returns id of tank group Optional RoleGroupID is the idea of group of roles that have already been defined that will be used instead of default roles. |
|
Source: [WW2Data.sga/Scar/Tanks.scar] (935) References: [SCAR+Tank+Combat+Manager] |
Void TankCombat_AddRole( Integer RoleGroupID, Integer OffsetDefault, Integer OffsetDefense, Integer OffsetRetreat, Real OffsetDistance, Integer Role ) | |
Adds an additional role to an already existing role group the RoleGroupId is an id generated by TankCombat_CreateRoleGroup function. OffsetDefault defines the position of the tank in relation to the center tank during non-combative movement. OffsetDefense defines the position of the tank in relation to the chosen TARGET when any of the tanks are under attack. OffsetRetreat defines the position of the tank in relation to the center tank when the tanks are retreating. OffsetDistance defines the distance that the tank should be from the center tank for all offsets. |
|
Source: [WW2Data.sga/Scar/Tanks.scar] (1122) References: [SCAR+Tank+Combat+Manager] |
Void TankCombat_AddThreatArrows( Integer TankCombatId, Table Blueprints ) | |
Checks whether a group of tanks is retreating. |
|
Source: [WW2Data.sga/Scar/Tanks.scar] (1306) References: [SCAR+Tank+Combat+Manager] |
Integer TankCombat_CreateRoleGroup( ) | |
Creates a new Role Group which can be customized to determine the formation/position of the tanks in battle, and the number of tanks battling see documentation for more information: Need HTML Link here |
|
Source: [WW2Data.sga/Scar/Tanks.scar] (1090) References: [SCAR+Tank+Combat+Manager] |
Void TankCombat_EnableFormUp( Integer TankGroupId, Boolean enabled ) | |
Enables or disables the ability for tanks within a group to occasionally ensure that they are in formation while moving. |
|
Source: [WW2Data.sga/Scar/Tanks.scar] (1059) References: [SCAR+Tank+Combat+Manager] |
Void TankCombat_EnableRetreat( Integer TankGroupId, Boolean enabled ) | |
Enables or disables the ability for the TankCombat manager to retreat its group |
|
Source: [WW2Data.sga/Scar/Tanks.scar] (1044) References: [SCAR+Tank+Combat+Manager] |
Void TankCombat_GetAttackTarget( Integer TankCombatId ) | |
Gets the attack target of an existing combat group. the TankCombatId is the id of the group of tanks |
|
Source: [WW2Data.sga/Scar/Tanks.scar] (1194) References: [SCAR+Tank+Combat+Manager] |
Boolean TankCombat_GroupExists( Integer TankCombatId ) | |
Determines whether or not a TankCombat Group still exists A TankCombat group is removed when it reaches its target. |
|
Source: [WW2Data.sga/Scar/Tanks.scar] (1209) References: [SCAR+Tank+Combat+Manager] |
Boolean TankCombat_IsRetreating( Integer TankCombatId ) | |
Checks whether a group of tanks is retreating. |
|
Source: [WW2Data.sga/Scar/Tanks.scar] (1287) References: [SCAR+Tank+Combat+Manager] |
Void TankCombat_RemoveAll( Void ) | |
Removes all groups from control of the Tank Combat Manager. |
|
Source: [WW2Data.sga/Scar/Tanks.scar] (1258) References: [SCAR+Tank+Combat+Manager] |
Void TankCombat_RemoveGroup( Integer TankCombatId ) | |
Removes a group from control of the Tank Combat Manager. |
|
Source: [WW2Data.sga/Scar/Tanks.scar] (1227) References: [SCAR+Tank+Combat+Manager] |
Void TankCombat_SetArrivalCallback( Integer TankCombatId, Function FuncationName ) | |
Calls the specified function when the tanks arrive at the location dictated by the AddGroup function |
|
Source: [WW2Data.sga/Scar/Tanks.scar] (1244) References: [SCAR+Tank+Combat+Manager] |
Void TankCombat_SetAttackTarget( Integer TankCombatId, SGroup/EGroup/Marker/Position AttackTarget ) | |
Sets the attack target of an existing combat group. the TankCombatId is the id of the group of tanks, AttackTarget is the object that the Tanks will attack. |
|
Source: [WW2Data.sga/Scar/Tanks.scar] (1155) References: [SCAR+Tank+Combat+Manager] |
Void TankCombat_SetRetreatPercent( Integer TankGroupId, Real value ) | |
Sets the percent of health at which the group of tanks will retreat from battle Percent value must be a number between 0.0 and 1.0 |
|
Source: [WW2Data.sga/Scar/Tanks.scar] (1074) References: [SCAR+Tank+Combat+Manager] |
Void TankCombat_SetRetreatPos( Integer TankCombatId, Position Retreat ) | |
Sets the retreat position of an existing combat group. the TankCombatId is the id of the group of tanks, Retreat is the position that the Tanks will retreat to. |
|
Source: [WW2Data.sga/Scar/Tanks.scar] (1175) |
Void TankCombat_SetThreats( LuaTable SBPs/SBP ) | |
Sets the table of threats that the the Tank Combat Manager will use to determine which squads to attack while in combat The table of threats should contain a list of SBPs from first to last in order of priority (i.e. first item is highest priority) |
|
Source: [WW2Data.sga/Scar/Tanks.scar] (913) |
Timer |
Functions |
Void Timer_Add( Integer timerID, Real period ) | |
Add the amount of time to the specified timer |
|
Source: [WW2Data.sga/Scar/Timer.scar] (62) |
Void Timer_Advance( Integer timerID, Real period ) | |
Advances the timer by the specified amount of time |
|
Source: [WW2Data.sga/Scar/Timer.scar] (72) |
Void Timer_Display( Integer timerID ) | |
Display (in the console) the amount of time remaining in the specified timer. |
|
Source: [WW2Data.sga/Scar/Timer.scar] (154) |
Void Timer_DisplayOnScreen( Integer timerID ) | |
Displays a timer on the screen - You need to call this regularly (i.e. every second) to update the onscreen display. THIS IS A TEMPORARY FUNCTION - WELL GET PROPER UI SUPPORT LATER ON |
|
Source: [WW2Data.sga/Scar/Timer.scar] (196) |
Void Timer_End( Integer timerID ) | |
Stop the specified timer. |
|
Source: [WW2Data.sga/Scar/Timer.scar] (183) |
Boolean Timer_Exists( Integer timerID ) | |
Returns whether the timer with this ID exists |
|
Source: [WW2Data.sga/Scar/Timer.scar] (53) |
Real Timer_GetElapsed( Integer timerID ) | |
Returns how much time has elapsed since this timer has been started |
|
Source: [WW2Data.sga/Scar/Timer.scar] (119) |
Void Timer_GetMinutesAndSeconds( Luafunction getTimeFunction, Integer TimerID ) | |
Returns TWO values: minutes and seconds. Provide it a function like Timer_GetRemaining or Timer_GetElapsed |
|
Source: [WW2Data.sga/Scar/Timer.scar] (128) |
Real Timer_GetRemaining( Integer timerID ) | |
Get the remaining time for the specified timer. |
|
Source: [WW2Data.sga/Scar/Timer.scar] (99) |
Void Timer_Pause( Integer timerID ) | |
Pause the specified timer. |
|
Source: [WW2Data.sga/Scar/Timer.scar] (82) |
Void Timer_Resume( Integer timerID ) | |
Resume the specified timer. |
|
Source: [WW2Data.sga/Scar/Timer.scar] (141) |
Void Timer_Start( Integer timerID, Real period ) | |
Start a timer with the specified id, taking the required period ( in seconds ) |
|
Source: [WW2Data.sga/Scar/Timer.scar] (43) |
UI |
Functions |
event cue ID EventCue_Create( CueStyleID style, LocString title, LocString description, Marker/Pos/EGroup/SGroup cameratarget[, LocString hintpointtext, LuaFunction function, Float lifetime, Boolean dismissOnClick] ) | |
Creates an Event Cue message which automatically sends the camera to a specified point when clicked on. Can optionally create a 5-second hintpoint at the location when clicked on, and/or call a specified function for you, too. Both of these only activate the first time you click on the event cue to avoid stacking. |
|
Source: [WW2Data.sga/Scar/UI.scar] (308) |
Void FOW_Enable( Boolean enable ) | |
Enables or disables the FOW, including out of bound areas and all entities on the map |
|
Source: [WW2Data.sga/Scar/UI.scar] (540) |
Void Game_EndCurrentSpeech( Void ) | |
DEPRECATED Use Subtitle_EndCurrentSpeech |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2487) |
Real Game_GetCinematicAspectRatio( Void ) | |
Returns the aspect ratio used when in cinematic mode. width / height |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2722) |
PlayerID Game_GetLocalPlayer( Void ) | |
Get the local player. (should only be used for UI purpose) |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2765) |
Integer Game_GetMode( Void ) | |
Returns UIM_Normal, UIM_Fullscreen, or UIM_Cinematic |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2687) |
Boolean Game_HasLocalPlayer( Void ) | |
Determine if there is a valid local player. (UI only -- nondeterminstic) |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2759) |
Boolean Game_IsLetterboxed( Void ) | |
Returns true if the ui is in letterbox mode |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2663) |
Void Game_Letterbox( Boolean on, Real timeSecs ) | |
Enters/Exits letterbox mode in amount of time specified by timeSecs. Letterbox mode disables input |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2613) |
Void Game_PlaySpeech( String icon, Integer locID, Boolean disableIconSubtitle, Boolean continueButton, Boolean lockCursorToContinueButton, Boolean stickySubtitle, String additionalPath ) | |
DEPRECATED Use Subtitle_PlaySpeech |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2472) |
Void Game_PlaySquadSpeech( SquadID squad, String icon, Integer locID, Boolean disableIconSubtitle, Boolean continueButton, Boolean lockCursorToContinueButton, Boolean stickySubtitle, String additionalPath ) | |
DEPRECATED Use Subtitle_PlaySquadSpeech |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2479) |
Void Game_SetCinematicAspectRatio( Real ratio ) | |
Sets the aspect ratio used when in cinematic mode. Expects width / height. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2735) |
Void Game_SetLocalPlayer( PlayerID player ) | |
Sets the local player. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2771) |
Void Game_SetMode( Integer mode ) | |
Set the game screen mode UI_Normal is the regular screen with taskbar UI_Fullscreen is the mode without any 2D UI UI_Cinematic is the same as letter box mode |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2703) |
Void Game_SetSelectionAlphaScale( Real alphaScale ) | |
A scale value for selection circle alpha |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2746) |
Void Game_SkipAllEvents( Boolean bDeleteQueued ) | |
Skips all events. Can either delete or skip queued events. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2777) |
Void Game_SkipEvent( Void ) | |
Skips the currently playing event (and stops current sound) |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2752) |
Void Game_SubTextFade( LocString location, LocString time, LocString detail, Real in, Real lifetime, Real out ) | |
Fade in and out two or three lines of subtext. This function has to support two lines, for backwards compatibility. The 'detail' line is therefore optional. |
|
Source: [WW2Data.sga/Scar/UI.scar] (755) |
Void Game_UnlockInputOnLetterBox( Void ) | |
Unlocks user/camera input during letterbox. This should be used for debug only |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2676) |
Void Ghost_DisableSpotting( Void ) | |
Disable the spotting of enemy entities that may become ghosts in the FoW |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3364) |
Void Ghost_EnableSpotting( Void ) | |
Enable the spotting of enemy entities that may become ghosts in the FoW |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3358) |
Void HintMouseover_Add( LocString hintText, Marker/Position/Egroup/Sgroup hintTarget, Real targetRadius, Boolean looping ) | |
Adds a Hint Point that will only appear on Mouseover of the target. |
|
Source: [WW2Data.sga/Scar/UI.scar] (175) |
Void HintMouseover_Remove( LocString hintText, Marker/Egroup/Sgroup hintTarget ) | |
Removes a Mouseover Hint Point from the managing function. |
|
Source: [WW2Data.sga/Scar/UI.scar] (270) |
HintPointID HintPoint_Add( StackVar where, Boolean bVisible, LocString hintText[, number height] ) | |
Creates a hintpoint attached to a Marker, EGroup, SGroup or position If range is set to 0, then the hintpoint is rangeless, see the design document for rangeless features. |
|
Source: [WW2Data.sga/Scar/UI.scar] (110) |
Integer HintPoint_AddToAbilityButton( AbilityBlueprint ability, LocString hint, Boolean removeOnClick ) | |
Adds a taskbar hintpoint to an ability button |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1380) |
Integer HintPoint_AddToCommandButton( Integer command, LocString hint, Boolean removeOnClick ) | |
Adds a taskbar hintpoint to a command button |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1394) |
Integer HintPoint_AddToCommanderBranchUpgrade( UpgradeBlueprint pbg, LocString hint ) | |
Adds a hintpoint to an upgrade on the company commander branch |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1474) |
Integer HintPoint_AddToCommanderTreeUpgrade( UpgradeBlueprint pbg, LocString hint ) | |
Adds a hintpoint to an upgrade on the company commander branch |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1467) |
Integer HintPoint_AddToConstructionButton( EntityBlueprint ebp, LocString hint, Boolean removeOnClick ) | |
Adds a taskbar hintpoint to a construction button |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1409) |
Integer HintPoint_AddToConstructionMenu( String menuName, LocString hint, Boolean removeOnClick ) | |
Adds a taskbar hintpoint to a construction menu |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1401) |
Integer HintPoint_AddToEventCue( Integer eventCueID, LocString hint, Boolean removeOnClick ) | |
Adds a hintpoint to an event cue that was created from SCAR |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1460) |
Integer HintPoint_AddToObjectiveIcon( Integer objectiveID, LocString hint, Boolean removeOnClick ) | |
Adds a taskbar hintpoint to an objective icon |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1416) |
Integer HintPoint_AddToProductionButton( Integer type, Blueprint pbg, LocString hint, Boolean removeOnClick ) | |
Adds a taskbar hintpoint to a production button |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1387) |
Integer HintPoint_AddToProductionQueueItem( Integer index, LocString hint, Boolean removeOnClick ) | |
Adds a taskbar hintpoint to an item in the production queue |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1423) |
Integer HintPoint_AddToSquadBadge( SquadID squad, LocString hint, Boolean removeOnClick ) | |
Adds a taskbar hintpoint to a squad's badge in the selection area, using the squad as the lookup |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1437) |
Integer HintPoint_AddToSquadBadgeByIndex( Integer displayIndex, LocString hint, Boolean removeOnClick ) | |
Adds a taskbar hintpoint to a squad's badge in the selection area, using the display index (from 0 to 9) as the lookup |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1444) |
Integer HintPoint_AddToSquadControlGroup( Integer controlGroupIndex, LocString hint, Boolean removeOnClick ) | |
Adds a taskbar hintpoint to a squad control group (hotkey) |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1430) |
Integer HintPoint_AddToTacticalMap( Position position, LocString hint ) | |
Adds a hintpoint to the tactical map, in world coordinates. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1451) |
Integer HintPoint_AddToTaskbarBinding( String bindingName, LocString hint, Boolean removeOnClick ) | |
Adds a taskbar hintpoint to any binding, provided its name |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1365) |
Void HintPoint_Remove( Integer HintPointID ) | |
Removes a hintpoint. |
|
Source: [WW2Data.sga/Scar/UI.scar] (142) |
Void HintPoint_RemoveAll( Void ) | |
Removes all hintpoints. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1493) |
Void HintPoint_SetVisible( Integer HintPointID, Boolean bVisible ) | |
Sets a hintpoint's visibility. Currently, FOW is not accounted for. |
|
Source: [WW2Data.sga/Scar/UI.scar] (157) |
Boolean Misc_AreDefaultCommandsEnabled( Void ) | |
Returns the enabled/disabled state of the right-click command input. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1859) |
Void Misc_DoWeaponHitEffectOnEntity( EntityID entity, Position pos, WeaponBlueprint weaponPBG, Boolean penetrated ) | |
Do weapon hit effect on the entity from the view camera origin WeaponID is the property bag group id; if penetrated is set to false, deflection effect would be played instead |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2187) |
Void Misc_DoWeaponHitEffectOnPosition( Position pos, WeaponBlueprint weaponPBG, Boolean penetrated ) | |
Do weapon hit effect on the ground WeaponID is the property bag group id; if penetrated is set to false, deflection effect would be played instead |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2213) |
Void Misc_GetAllPlayerEntitiesOnScreen( PlayerID player, EGroupID egroup ) | |
Returns the list of all entities that's not part of a squad from the player on the screen |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2274) |
Void Misc_GetAllPlayerSquadsOnScreen( PlayerID player, SGroupID sgroup ) | |
Returns the list of all squads from the player on screen |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2240) |
Void Misc_GetControlGroupContents( Integer groupIndex, SGroupID squads, EGroupID nonSquadEntities ) | |
Returns contents of a control group (0 to 9). Squads are put into an sgroup, and non-squad entities are put into an egroup. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1819) |
Integer Misc_GetEntityControlGroup( EntityID entity ) | |
Returns the control group index that this entity belongs to, from 0 to 9, or -1 if none |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1772) |
Position Misc_GetHiddenPositionOnPath( Integer checkType, Position origin, Position dest, EntityBlueprint ebp, Real stepDistance, Real cameraPadding, PlayerID FOWPlayer, Boolean debugDisplay ) | |
Returns a hidden position on path from origin to destination. If there's none, it returns the origin position Possible check types are CheckHiddenFromCamera, CheckHiddenInFOW and CheckHiddenBothCameraFOW Camera check determined by the camera frustum. use cameraPadding to increase the area around the camera when doing the check FOW check requires a valid player ID passed in stepDistance is the interval along the path that the hidden points will be checked ( min is 1 metre ) If no hidden position is found, position ( 0, 0, 0 ) is returned Don't use this for multi-player SCAR script!! |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1974) |
Position Misc_GetMouseOnTerrain( Void ) | |
Returns the world position of the mouse on the terrain |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1934) |
EntityID Misc_GetMouseOverEntity( Void ) | |
Returns the entity under the mouse (if any) |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1919) |
Void Misc_GetSelectedEntities( EGroupID group, Boolean subSelection ) | |
Clears a given egroup and adds the current selection to the group |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1578) |
Void Misc_GetSelectedSquads( SGroupID group, Boolean subSelection ) | |
Clears a given sgroup and adds the current selection to the group |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1607) |
Integer Misc_GetSquadControlGroup( SquadID squad ) | |
Returns the control group index that this squad belongs to, from 0 to 9, or -1 if none |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1712) |
Boolean Misc_IsEGroupSelected( EGroupID egroup, Boolean all ) | |
Returns true if ANY or ALL of the EGroup is selected |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (1712) |
Boolean Misc_IsEntityOnScreen( EntityID entity, Real pct ) | |
Check if the entity is on screen currently |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2324) |
Boolean Misc_IsEntitySelected( EntityID entity ) | |
Returns true if an entity is currently selected |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1637) |
Boolean Misc_IsMouseOverEntity( Void ) | |
Returns true if the mouse is over an entity |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1950) |
Boolean Misc_IsSelectionInputEnabled( Void ) | |
Returns the enabled/disabled state of the selection input. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1847) |
Boolean Misc_IsSGroupSelected( SGroupID sgroup, Boolean all ) | |
Returns true if ANY or ALL of the SGroup is selected |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (1697) |
Boolean Misc_IsSquadOnScreen( SquadID squad, Real pct ) | |
Check if the squad is on screen currently |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2313) |
Boolean Misc_IsSquadSelected( SquadID squad ) | |
Returns true if a squad is currently selected |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2228) |
Void Misc_RemoveCommandRestriction( Void ) | |
Can issue commands anywhere |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1885) |
Void Misc_RestrictCommandsToMarker( MarkerID marker ) | |
Can only issue commands inside this marker |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1865) |
Void Misc_SelectSquad( SquadID squad, Boolean bSelected ) | |
Add or remove squad members from the current selection |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1680) |
Void Misc_SetDefaultCommandsEnabled( Boolean enabled ) | |
Enables / Disables right-click command input. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1853) |
Boolean Misc_SetEntityControlGroup( EntityID entity, Integer groupIndex ) | |
Makes a squad belong to a specific control group. If it already belongs to another control group, it's removed from that one before being added to the new one. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1789) |
Void Misc_SetSelectionInputEnabled( Boolean enabled ) | |
Enables / Disables selection input. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1841) |
Boolean Misc_SetSquadControlGroup( SquadID squad, Integer groupIndex ) | |
Makes a squad belong to a specific control group. If it already belongs to another control group, it's removed from that one before being added to the new one. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1736) |
Void Misc_ToggleEntities( Void ) | |
Hide all world entities for NIS performance debugging |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1892) |
Void NIS_PlaySpeech( Integer locID, Real speechTime ) | |
Plays subtitle during NISes. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2338) |
Void SitRep_PlaySpeech( String icon, Integer locID, Boolean disableIconSubtitle, Boolean continueButton, Boolean blockInput, Boolean stickySubtitle, String additionalPath ) | |
Plays a global speech with subtitle and actor icon in the overlay please make sure that the the speech file is 2D |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2965) |
Void Subtitle_EndCurrentSpeech( Void ) | |
Prematurely finish currently playing speech and advance the next one in queue This is useful for skipping speech events |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2455) |
Void Subtitle_PlaySpeech( String icon, Integer locID, Boolean disableIconSubtitle, Boolean continueButton, Boolean blockInput, Boolean stickySubtitle, String additionalPath ) | |
Plays a global speech with subtitle and actor icon in the overlay please make sure that the the speech file is 2D |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2362) |
Void Subtitle_PlaySpeechAt( Integer locID, Real x, Real y, Boolean stickySubtitle, String additionalPath ) | |
Plays a subtitle at a position on screen. please make sure that the the speech file is 2D |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2401) |
Void Subtitle_PlaySquadSpeech( SquadID squad, String icon, Integer locID, Boolean disableIconSubtitle, Boolean continueButton, Boolean blockInput, Boolean stickySubtitle, String additionalPath ) | |
Plays 3D speech on one of guys in the squad with subtitle and actor icon in the overlay please make sure that the the speech file is 3D. Playing 2D sample will not work. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2425) |
Void Subtitle_UnstickCurrentSpeech( Void ) | |
Removes "sticky" state from currently playing speech (if any) |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2463) |
Integer TacticalMap_AddArrow( Integer objectiveID, Integer fnType, Position from, Position to ) | |
Add arrpw display to tactical map at specific vector. fnType are FN_OnShow, FN_OnSelect and FN_OnActivate This function should not be used inside a SitRep event! |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2876) |
Integer TacticalMap_AddMessage( Integer objectiveID, Integer fnType, Position pos, LocString message ) | |
Add message display to tactical map at specific location. fnType are FN_OnShow, FN_OnSelect and FN_OnActivate This function should not be used inside a SitRep event! Use SitRep_AddMessage instead |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2855) |
blipID TacticalMap_AddPing( StackVar where, Real lifetime, Integer blipType ) | |
Add pings to tactical map. Be careful to remove your ping if needed! The following blipTypes are available: BT_GeneralPing, BT_CombatPing, BT_FuelPing BT_MunitionsPing, BT_SelectionPing, BT_BuildingBoomPing, BT_AbilityPing, BT_ObjectivePrimary, BT_ObjectiveSecondary, BT_ObjectiveMedal, BT_AttackHerePing, BT_DefendHerePing, BT_CaptureHerePing, |
|
Source: [WW2Data.sga/Scar/UI.scar] (84) |
Integer TacticalMap_AddPointer( Integer objectiveID, Integer fnType, Position to ) | |
Add pointer to tactical map |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2895) |
Void TacticalMap_FlashTerritory( Integer sectorID ) | |
Makes a territory flash (overrides any other flashing behavior) |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2951) |
Void TacticalMap_RemoveElement( Integer elementID ) | |
Removes a tactical map element (created via the TacticalMap_Addxxx functions) |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2913) |
Void TacticalMap_StopFlashingTerritory( Integer sectorID ) | |
Returns a territory to default flashing behavior |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2957) |
Boolean Taskbar_IsVisible( Void ) | |
Returns whether the taskbar is visible |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3351) |
Void Taskbar_SetVisibility( Boolean visible ) | |
sets taskbar visibility! |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3344) |
Void ThreatArrow_Add( Integer GroupID, entity/squad/egroup/sgroup/position/marker Threat[, String icon] ) | |
Adds a threat to an existing group |
|
Source: [WW2Data.sga/Scar/UI.scar] (690) |
Integer (ID) ThreatArrow_CreateGroup( variable!argument!list: threats ) | |
Creates a group of threats that are represented by a single arrow. Threats can be entities, squads, egroups, sgroups, positions or markers |
|
Source: [WW2Data.sga/Scar/UI.scar] (660) |
Void ThreatArrow_DestroyAllGroups( Void ) | |
Destroy all threat groups |
|
Source: [WW2Data.sga/Scar/UI.scar] (684) |
Void ThreatArrow_DestroyGroup( Integer GroupID ) | |
Destroy a threat group |
|
Source: [WW2Data.sga/Scar/UI.scar] (679) |
Void ThreatArrow_Remove( Integer GroupID, entity/squad/egroup/sgroup/position/marker Threat ) | |
Removes a threat from an existing group |
|
Source: [WW2Data.sga/Scar/UI.scar] (723) |
Void UI_AddHintAndFlashAbility( PlayerID playerid, AbilityID abilityID, LocString text, Integer length, [Table/Blueprint blueprint_filter] ) | |
Creates and flashes an ability button on the taskbar if the unit is selected Length parameter determines how long to flash the item, and the blueprint filter is used if certain squad types need to be selected before flashing the button. |
|
Source: [WW2Data.sga/Scar/UI.scar] (577) |
Void UI_AlwaysFlashCompanyCommanderButton( Boolean alwaysFlash, Boolean stopWhenClicked ) | |
If set to true, the button always flashes. If set to false, the default flashing behavior resumes. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3185) |
Void UI_BindingSetEnabled( String binding, Boolean enabled ) | |
Enables or disables a named segment of the taskbar. The binding name is a string set in taskbar.lua. If enabled is false, then the UI is not validated/or updated and should not appear onscreen. It can be turned back on if enabled is true. |
|
Source: [WW2Data.sga/Scar/UI.scar] (772) |
Void UI_ClearBuildingPlacementCallback( Void ) | |
Clears the building placement callback. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3063) |
Void UI_ClearConstructionMenuCallback( Void ) | |
Clears the construction menu navigation callback. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3105) |
Void UI_ClearEventCues( Void ) | |
Clears all active event cues |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1166) |
Void UI_ClearModalAbilityPhaseCallback( Void ) | |
Clears the ability phase callback |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3075) |
Void UI_ClearOptionOverride( String name ) | |
Clears the override on an option. See LuaConsts.scar for list of available options. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3380) |
Void UI_ClearSubmenuNavigationCallback( Void ) | |
Clears the submenu navigation callback. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3090) |
Void UI_CoverPreviewHide( Void ) | |
Toggle off cover preview. Each call to UI_CoverPreviewHide must be matched by a call to UI_CoverPreviewShow |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1229) |
Void UI_CoverPreviewShow( Void ) | |
Toggle on cover preview. Each call to UI_CoverPreviewShow must be matched by a call to UI_CoverPreviewHide |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1223) |
Void UI_CreateEntityKickerMessage( PlayerID player, EntityID entity, LocString message ) | |
Create a custom kicker message on the entity and display to the player |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3028) |
ID UI_CreateEventCue( String iconPath, String soundPath, LocString title, LocString description[, Float lifetime, Boolean dismissOnClick] ) | |
Creates an event cue without a callback (you won't know when it's clicked) |
|
Source: [WW2Data.sga/Scar/UI.scar] (554) |
Integer UI_CreateEventCueClickable( String iconPath, String soundPath, LocString title, LocString description, LuaFunction f, Real lifetime, Boolean dismissOnClick ) | |
Creates a event cue with custom lua callback function when icon is clicked. Lifetime of -1 means use the default. The return value is an event cue ID. The callback receives one parameter: the ID of the event cue that was clicked. the lua function is executed when the event cue icon is pressed example: UI_CreateEventCueClickable( "event_cue_icons/icon_player_attacked", "General_alert", 42761, 42762, prt, -1 ) |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1149) |
blipID UI_CreateMinimapBlip( StackVar where, Real lifetime, Integer blipType ) | |
Creates a blip on the minimap; return the ID of the blip. 'where' can be an entity, marker, position, egroup, sgroup, or squad. The following blipTypes are available: BT_GeneralPing, BT_CombatPing, BT_FuelPing BT_MunitionsPing, BT_SelectionPing, BT_BuildingBoomPing, BT_AbilityPing, BT_ObjectivePrimary, BT_ObjectiveSecondary, BT_ObjectiveMedal, BT_AttackHerePing, BT_DefendHerePing, BT_CaptureHerePing, |
|
Source: [WW2Data.sga/Scar/UI.scar] (47) |
Void UI_CreateSGroupKickerMessage( PlayerID player, SGroup sgroup, LocString message ) | |
Create a custom kicker message on the squad and display to the player. |
|
Source: [WW2Data.sga/Scar/UI.scar] (527) |
Void UI_CreateSquadKickerMessage( PlayerID player, SquadID squad, LocString message ) | |
Create a custom kicker message on the squad and display to the player |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3015) |
Void UI_DeleteMinimapBlip( Integer blipID ) | |
Removes a blip already created on the minimap |
|
Source: [WW2Data.sga/Scar/UI.scar] (26) |
Void UI_EnableEntityMinimapIndicator( EntityID entity, Boolean enabled ) | |
Turn on or off entity minimap indicator. The default is enabled |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1263) |
Void UI_EnableEventCueType( Integer gameEventType, Boolean enable ) | |
Enable or disable event cues of a game event type to be displayed in the UI Some examples of game event types are GE_ConstructionComplete, GE_BuildItemComplete, etc |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1175) |
Void UI_EnableResourceTypeKicker( Integer resourceType, Boolean enable ) | |
Enables or disables resource kickers. Possible resource types are RT_Manpower, RT_Fuel, RT_Munition, RT_Action, RT_Command. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3314) |
Void UI_EnableSquadDecorator( SquadID squad, Boolean enabled ) | |
Turn on or off squad decorator. The default is decorator enabled |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1242) |
Void UI_EnableSquadMinimapIndicator( SquadID squad, Boolean enabled ) | |
Turn on or off squad minimap indicator. The default is enabled |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1253) |
Integer UI_FlashAbilityButton( AbilityBlueprint ability, Boolean bStopOnClick, Integer blipType ) | |
Begins flashing an ability widget. Flashes a taskbar binding associated with a specific ability ID. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (966) |
Integer UI_FlashBinding( String name, Boolean bStopOnClick, Integer blipType ) | |
Begins flashing of a binding widget. Flashes a taskbar binding with the given name. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1112) |
Integer UI_FlashCommandButton( Integer command, Boolean bStopOnClick, Integer blipType ) | |
Flashes a command button associated with a particular squad command |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (981) |
Integer UI_FlashCommanderBranchUpgrade( UpgradeBlueprint pbg, Integer blipType ) | |
Flashes one of the 6 upgrades on the commander branch |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1083) |
Integer UI_FlashCommanderTreeUpgrade( UpgradeBlueprint pbg, Integer blipType ) | |
Flashes one of the 3 upgrades on the main commander tree |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1071) |
Integer UI_FlashConstructionButton( EntityBlueprint ebp, Boolean bStopOnClick, Integer blipType ) | |
Flashes a construction button associated to a building EBP. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (994) |
Integer UI_FlashConstructionMenu( String menuName, Boolean bStopOnClick, Integer blipType ) | |
Flashes a construction menu. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (987) |
Void UI_FlashEntity( EntityID entity, String actionOnName ) | |
Flashes the entity using attributes from [tuning][ui] |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1305) |
Integer UI_FlashEventCue( Integer eventCueID, Boolean bStopOnClick, Integer blipType ) | |
Flashes an event cue icon |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1036) |
Integer UI_FlashObjectiveCounter( Integer objectiveID, Integer blipType ) | |
Flashes an objective counter |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1006) |
Integer UI_FlashObjectiveIcon( Integer objectiveID, Boolean bStopOnClick, Integer blipType ) | |
Flashes an objective icon |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1000) |
Integer UI_FlashProductionButton( Integer pType, Blueprint pbg, Boolean bStopOnClick, Integer blipType ) | |
Begins flashing a production widget. Flashes a taskbar binding associated with a production type and PBG id. Use PGB id of -1 if you only care about the production type. Type may be one of PITEM_Spawn, PITEM_SquadUpgrade, PITEM_Reinforce |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (975) |
Integer UI_FlashProductionQueueIcon( Integer index, Boolean bStopOnClick, Integer blipType ) | |
Flashes a production queue item, from 0 to n. Be careful - the icon will continue to flash regardless of what's in that slot... |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1012) |
Integer UI_FlashSquadBadge( SquadID squad, Boolean bStopOnClick, Integer blipType ) | |
Flashes a squad's badge in the selection area, using the squad as the lookup |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1024) |
Integer UI_FlashSquadBadgeByIndex( Integer displayIndex, Boolean bStopOnClick, Integer blipType ) | |
Flashes a squad's badge in the selection area, using the display index (from 0 to 9) as the lookup |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1030) |
Integer UI_FlashSquadControlGroupIcon( Integer controlGroupIndex, Boolean bStopOnClick, Integer blipType ) | |
Flashes a squad control group icon. You can use Misc_GetSquadControlGroup to find out which group to flash. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1018) |
Integer UI_FlashTacticalMapWidget( String widgetName, Integer blipType ) | |
Flashes a widget on the tactical map |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1057) |
Void UI_ForceCommanderTreeChoice( PlayerID player, UpgradeBlueprint upg ) | |
Picks a commander tree for the player. If he already picked one, does nothing. upg is the upgrade that unlocks the tree. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3132) |
Boolean UI_GetDecoratorsEnabled( Void ) | |
Returns whether all decorators are enabled or not |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1204) |
Void UI_HideSquadControlGroupBindings( Boolean hide ) | |
Hides/unhides the squad control group UI on the right side of the screen |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3338) |
Void UI_HideTacticalMap( Void ) | |
Hides the tactical map |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1279) |
Void UI_HideTeamWeaponConeOfFire( Integer id ) | |
Removes a team weapon "cone of fire" UI. You got the ID from UI_ShowTeamWeaponConeOfFire |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3307) |
Void UI_HighlightSGroup( SGroupID sgroup, Real duration ) | |
Highlights an SGroup in the UI for the given duration |
|
Source: [WW2Data.sga/Scar/UI.scar] (10) |
Void UI_HighlightSquad( SquadID squad, Real duration ) | |
Turn on squad highlight UI feature for the duration |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1235) |
Boolean UI_IsCommanderTreeBranchShown( Void ) | |
Returns whether a branch of the commander tree is up (once you've already selected an upgrade path) |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1299) |
Boolean UI_IsCommanderTreeShown( Void ) | |
Returns whether the main commander tree is up (where you select your upgrade path) |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1293) |
Boolean UI_IsTacticalMapShown( Void ) | |
Returns whether the tactical map is being shown |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1287) |
Void UI_MessageBoxHide( Integer btn ) | |
If the message box is activated, close it. The callback will receive the button parameter given. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3219) |
Void UI_MessageBoxSetButton( Integer btn, LocString text, LocString tooltip, Boolean bEnabled ) | |
Set the text/tooltip/enabled state of a button on the dialog. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3210) |
Void UI_MessageBoxSetText( LocString title, LocString msg ) | |
Set the title and message body of the dialog. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3200) |
Void UI_MessageBoxShow( LuaFunction f ) | |
Show the message box. The callback will be called when deactivated, with the button that was pressed. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3228) |
Void UI_RestrictBuildingPlacement( MarkerID mkr ) | |
Only allow buildings to be placed inside a marker |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3117) |
Void UI_ScreenFade( Real r, Real g, Real b, Real a, Real duration, Boolean bKeepBlockingInput ) | |
Fades the screen to a given RGBA colour over a number of seconds. mouse input is blocked during the fade, and you can control whether the input keeps being blocked after the fade has ended (be careful!) |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (2590) |
Void UI_SetAlliedBandBoxSelection( Boolean allow ) | |
Sets the game to allow allied squads to be selected at the same time as your own squads |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3111) |
Void UI_SetBuildingPlacementCallback( LuaFunction f ) | |
Sets a function to be called when the player clicks a building on the taskbar and gets a selection UI. Your function will have 2 arguments: [Blueprint] building blueprint, [integer] phase: CP_Selected, CP_StartedPlacing (only applicable to fields, fences and buildings that let you set facing), or CP_FinishedPlacing |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3054) |
Void UI_SetConstructionMenuCallback( LuaFunction f ) | |
Sets a function to be called when the player clicks a construction menu on the taskbar. Your function will have 2 arguments: [String] menu name, [Boolean] whether this menu is being activated (true) or deactivated (false) |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3096) |
Void UI_SetDecoratorsEnabled( Boolean enabled ) | |
Enables or disables all decorators |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1197) |
Void UI_SetModalAbilityPhaseCallback( LuaFunction f ) | |
Sets a function to be called when the player clicks an ability and gets a targetting UI. Your function will have 2 arguments: [Blueprint] ability blueprint, [integer] phase: MAP_Placing, MAP_Facing (only if ability requires facing) or MAP_Confirmed |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3069) |
Void UI_SetOptionOverride( String name, Integer value ) | |
Overrides an option. See LuaConsts.scar for list of available options. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3400) |
Void UI_SetSubmenuNavigationCallback( LuaFunction f ) | |
Sets a function to be called when the player clicks a submenu on the taskbar. Your function will have 2 arguments: [String] menu name, [Boolean] whether this menu is being activated (true) or deactivated (false) |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3081) |
Void UI_SetSubtitleBackgroundAlpha( Real alpha ) | |
Sets the alpha value of the subtitle background. Value from 0 to 1 |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3244) |
Void UI_ShowMinimapBlip( Boolean show ) | |
|
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (855) |
Void UI_ShowTacticalMap( Void ) | |
Shows the tactical map |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1273) |
Integer UI_ShowTeamWeaponConeOfFire( SquadID squad ) | |
Shows a team weapon's "cone of fire" UI. The position and orientation is not updated, so don't let this stay on screen for too long. Returns an ID for use with UI_HideTeamWeaponConeOfFire. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3262) |
Void UI_StopFlashing( Integer updaterID ) | |
Stops a flash handler of a given id. If the given flash handler doesn't exist, then there is no effect. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1135) |
Void UI_StopFlashingCommanderBranchUpgrade( Integer flashID ) | |
Stops flashing one of the 6 commander branch upgrades |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1103) |
Void UI_StopFlashingCommanderTreeUpgrade( Integer flashID ) | |
Stops flashing one of the 3 commander tree upgrades |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1095) |
Void UI_StopFlashingTacticalMapWidget( Integer id ) | |
Stops flashing a widget on the tactical map |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1064) |
Void UI_TerritoryHide( Void ) | |
Toggle off territory lines. Each call to UI_TerritoryHide must be matched by a call to UI_TerritoryShow |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1217) |
Void UI_TerritoryShow( Void ) | |
Toggle on territory lines. Each call to UI_TerritoryShow must be matched by a call to UI_TerritoryHide |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1211) |
Void UI_ToggleDecorators( Void ) | |
Toggles all decorators on or off. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (1189) |
Void UI_UnrestrictBuildingPlacement( Void ) | |
Removes the restriction on building placement |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (3124) |
Void UIWarning_Show( LocString locText ) | |
Displays a breif UI warning in the critical alert message area. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (718) |
Void WinWarning_Add( String name, PlayerID player, String icon, WString wWinConditionName, LocString wHelpTip ) | |
Create win/lose warning. You can use the name to reference the warning later. String name - The name of the win warning. Each win warning needs a unique name so you have a way of changing its text at a later time.<BR/> PlayerID player - The player that this win warning applies to. This isnt used right now, but its good to have in case we want to make the text the same color as the player or something.<BR/> String icon - The name of the icon. Again, this is not used right now, but it may be in the future.<BR/> LocString wWinConditionName - This is a localized string containing the name of the win condition that this win warning applies to. This text is used for the title of the win warnings help tip.<BR/> LocString wHelpTip - This is a localized string containing the help tip description.<BR/> |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (652) |
Boolean WinWarning_Exists( String name ) | |
Returns true if the named win warning exists. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (683) |
Void WinWarning_PublishLoseReminder( PlayerID player, Integer warningLevel ) | |
Triggers a UI event cue and an audio cue that the player is about to lose the game. The lower the warningLevel, the closer the player is to losing and the more intense the warning is |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (710) |
Void WinWarning_Remove( String name ) | |
Removes an added win/lose warning |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (672) |
Void WinWarning_SetText( String name, LocString locText ) | |
Set the text for a win warning. Designers: PLEASE be careful how you use this. Use Loc_FormatText where nesc. for localization. |
|
Source: [DLL, from file /Cross/BIAModUI/LuaLibs/LuaUI.cpp] (698) |
Util |
Functions |
Boolean Event_IsAnyRunning( [Integer priority_threshold] ) | |
Returns true if any event is currently running [at or below (more important than) the priority threshold. If not specified, ignores threshold.] |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (2527) |
Void Game_EndSP( Boolean win[, LocString message, Boolean nis, Boolean sandmap] ) | |
Ends the single player game (win/lose). You can optionally specify a message that will show up in the gameover dialog box |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (1758) |
Void Game_FadeToBlack( Bool direction, Real length ) | |
Fades the screen to black - FADE_OUT to fade to black, FADE_IN to fade back in |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (1528) |
LocString Loc_FormatText( Integer FormatID ) | |
Returns a formatted localized string. Use this function to format localized text. ie %1PLAYERNAME% is going to win. |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (1638) |
EGroup Player_GetEntityConcentration( PlayerID player[, Boolean popcapOnly, Table includeBlueprints, Table excludeBlueprints, Boolean bLeastConcentrated, MarkerID/Table onlyInThisMarker] ) | |
Finds the greatest (or least) concentration of entities owned by a player. This function is slow, so don't call it very often |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (2416) |
SGroup Player_GetSquadConcentration( PlayerID player[, Boolean popcapOnly, Table includeBlueprints, Table excludeBlueprints, Boolean bLeastConcentrated, MarkerID/Table onlyInThisMarker] ) | |
Finds the greatest (or least) concentration of squads owned by a player. This function is slow, so don't call it very often |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (2408) |
Void Sound_PlayOnSquad( String soundpathname, SGroupID sgroupid ) | |
Play sound on the first entity of the squad in sgroup |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (1503) |
SGroupID Util_AddMouseoverSquadToSGroup( [Boolean clearGroup] ) | |
If there's a squad under the mouse cursor, this adds it to a unique SGroup. Return value is the SGroup it was added to, or nil if there was no squad under the mouse cursor. Pass in true for 'clearGroup' to clear the sgroup before adding the squad. |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (1891) |
Void Util_AutoAmbient( Table intelEventTable ) | |
Auto-generate an Ambient Event. These are Low priority, and will hopefully interrupt nothing. Takes a table of Actors and LOC numbers |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (953) |
Void Util_AutoIntel( Table intelEventTable ) | |
Auto-generate an Intel Event. These are medium priority, and will interrupt a Stinger, but not an NIS. Takes a table of parameters defining speaker(s) and line(s) |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (998) |
Void Util_AutoNISlet( Integer nisletType, Table intelEventTable, [boolean bFOWvisible] ) | |
Auto-generate an NISlet Event, a simple NIS meant to convey mission location. These are high priority, and will interrupt a Stinger and Intel Events. Takes an NISLET type and a table of parameters defining speaker(s) and line(s) NISLET_BLACK2GAME = 1 -- starts in black and fades up, ends in gamplay NISLET_GAME2GAME = 2 -- transitions from game play to letterbox and backto gameplay NISLET_GAME2BLACK = 3 -- starts in gameplay and ends in black NISLET_GAME2LETTER = 4 -- starts in gameplay and ends in letterbox mode (for transition to sitrep) NISLET_TIME = 1 -- use seconds to wait on camera movements NISLET_VO = 2 -- use voice to wait on camera movements t_eventes.nislet_start = { {camPos = pos1, waitType = NISLET_TIME, waitValue = 5}, {camPos = pos2, waitType = NISLET_VO, waitValue = {ACTOR.GenericAlly, 000000}}, } |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (1059) |
Void Util_ClearWrecksFromMarker( MarkerID/Pos/SectorID position[, Real range] ) | |
Clears any vehicle wrecks from a given area Area can be a marker (with or without a range override), a position and range combo, or a territory sector ID |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (2230) |
Void Util_DespawnAll( Boolean despawn, Boolean!allPlayers![or!Int playerNum], Boolean egroups ) | |
ReSpawns or DeSpawns sgroups (and egroups) for all players or the indicated player. examples: Util_DespawnAll(true, true, false) or Util_DespawnAll(true, 1, false) or Util_DespawnAll(false, true, false) |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (2001) |
Variable Util_DifVar( Table difficultyVariables[, Integer difficulty] ) | |
Takes in a table and chooses the right variable for the difficulty setting. 1-4 elements. Acquires current difficulty by default. |
|
Source: [WW2Data.sga/Scar/Setup.scar] (362) |
Boolean Util_EntityLimit( [Integer entityLimit] ) | |
Checks the entity count for the world and returns true or false depending on the result. A specific value can be passed in to override the default amount. |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (2039) |
EntityID Util_FallBackToGarrisonBuilding( SGroupID sgroupid, Int radius ) | |
Try to garrison a loadable building within radius that is closer to the first squad of the sgroup than enemy The squad suppression would be resetted before fallling back so that they would not succumb to pinned state |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (1366) |
EntityID Util_GarrisonNearbyBuilding( SGroupID sgroup, Position pos, Real radius[, Boolean occupied, SGroup/Table filter] ) | |
Finds a nearby building to garrison. can ignore occupied [friendly] buildings. return ID of entity it found, or nil if not found Can also filter out groups not to occupy |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (2424) |
SquadID Util_GarrisonNearbyVehicle( SGroupID sgroup, Position pos, Real radius[, Boolean occupied, SGroup/Table filter] ) | |
Finds a nearby vehicle to garrison. can ignore occupied [friendly] vehicles. return ID of vehicle it found, or nil if not found, Can also filter out groups not to occupy |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (2432) |
MarkerID Util_GetClosestMarker( Variable var, Table markers ) | |
Returns the closest MarkerID to the entity/marker/pos/egroup/sgroup/squad from the table of markers provided |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (1675) |
Boolean Util_GetCommonwealthHQMobility( SGroupID group ) | |
Gets the mobility of a commonwealth HQ - returns true if it's mobile, false if it's static |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (2465) |
Void Util_GetEntitiesByBP( EGroupID sourcegroup, EGroupID destgroup, EntityBlueprint ebp ) | |
Find all the entities with a given blueprint in sourcegroup and add them to destgroup. See also: EGroup_Filter() |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (892) |
Void Util_GetMouseoverSGroup( Void ) | |
Returns a unique SGroup used to hold mouseover squads obtained from Util_AddMouseoverSquadToSGroup |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (1918) |
Position Util_GetPosition( Variable var ) | |
Returns a position from entity/marker/pos/egroup/sgroup/squad |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (1598) |
Position Util_GetPositionFromAtoB( MarkerID/Pos a, MarkerID/Pos b, Real distance ) | |
Returns a position that is distance metres from point A, headed in the direction of point B. You can also pass in a percentage (0.0 to 1.0) instead of a distance in metres. |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (1451) |
Pos Util_GetRandomPosition( MarkerID/ScarPos [, Real range] ) | |
Returns a random position either within the marker's proximity or with a pos and range provided. Range is ignored for rectangular markers |
|
Source: [WW2Data.sga/Scar/MoreUtils.scar] (36) |
Void Util_GetSquadsByBP( SGroupID sourcegroup, SGroupID destgroup, SquadBlueprint sbp ) | |
Find all the squads with a given blueprint in sourcegroup and add them to destgroup. See also: SGroup_Filter() |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (877) |
Number Util_GetTrailingNumber( String val ) | |
Returns trailing numbers from a string, if it exists, nil otherwise. E.G. "marker23" would return 23. |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (904) |
Void Util_HidePlayerForNIS( PlayerID player, Bool hide ) | |
Hides all of a player's squads and/or buildings Doesn't hide buildings a player is in, or any base structures. Only items like sandbags, tanktraps, mg nests, etc. Put multiple playerIDs in a table to hide many players together, or use ALL for the playerID to apply to all players at once. |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (1965) |
void Util_MarkerFX( String markername, String eventfile ) | |
Play an events file at a given markers location |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (918) |
Void Util_MissionTitle( LocString title ) | |
Play the mission title fade. |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (1155) |
Void Util_MuteAmbientSound( Boolean enable, [Real fade] ) | |
Enabling this function will mute the ambient sound (NOT all sound). |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (2377) |
Void Util_PlayMusic( String name, Real fade, Real delay ) | |
Plays music from the Data:Sound folder, and stores the music track so it can be resumed after a save/load |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (2355) |
Void Util_ReinforceEvent( SGroupID sgroupName[, LocID custumTitle, LocID customDescript] ) | |
Creates an Event Cue for an SGroup and repeats it until the SGroup is killed or selected. Additionally, a map ping and custome loc strings for the Title and Description can be used. |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (2563) |
Void Util_ReloadScript( Void ) | |
Reloads the running scar script. Current running rules would also be updated to the redefined functioin. |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (1490) |
Void Util_RestoreMusic( ) | |
Resumes playing the music track that was last triggered i.e. after a save/load |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (2366) |
Void Util_SetCommonwealthHQMobility( SGroupID group, Boolean mobile[, Boolean instant] ) | |
Sets the mobility of a commonwealth HQ. Can be done instantly (default) or with the progress bar as normal. |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (2439) |
Void Util_SetStartingResources( Integer missionNumber ) | |
Trigger function immediately after the opening NIS to set starting resources for the player Features values for Easy, Normal, and Hard/Expert |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (2264) |
Void Util_StartAmbient( LuaFunction func ) | |
Play a Speech Stinger. These are the lowest priority, and will be bumped by Intel Events or NIS's. This function should used instead of Event_Start because it handles priorities. |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (938) |
Void Util_StartIntel( LuaFunction func ) | |
Play an Intel Event. These are medium priority, and will interrupt a Stinger, but not an NIS. This function should used instead of Event_Start because it handles priorities. |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (929) |
Void Util_TriggerEvent( PlayerID playerid, Marker/EGroup/SGroup/ScarPos position, Int range, LuaFunction func, Boolean non_combat, Boolean onscreen_only, Int onscreen_duration ) | |
Library function to trigger NIS event under a certain sets of conditions. NOTE: if checking against a marker DO NOT specify a range. The range of the marker set in the WorldBuilder will be used. onscreen_only set to TRUE means the squad must be onscreen if the event is to be triggered. |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (1177) |
Lua Table Util_UnitCounts( Boolean!world!OR!playerID player ) | |
Returns a table containing either the total or a specific player's squad count, entity count, and vehicle count. table can be accessed as scene below Get Player Example:<BR/> local t = Util_UnitCounts(player1)<BR/> print(t.squad)<BR/> print(t.entity)<BR/> print(t.vehicle)<BR/> Get World Example:<BR/> local t = Util_UnitCounts(true)<BR/> print(t.squad)<BR/> print(t.entity)<BR/> print(t.vehicle)<BR/> Alternate Format:<BR/> print(Util_UnitCounts(true).squad)<BR/> |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (2081) |
Void World_KillAllNeutralEntitesNearMarker( MarkerID marker ) | |
Kills ALL world entities near a marker |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (1659) |
Various |
Functions |
Void Anim_PlayEntityAnim( EntityID entity, String animname ) | |
Plays an animation from an entity. This function can be called through a CTRL object in NISlets to wait on the animation. |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaAnimator.cpp] (87) |
AbilityBlueprint BP_GetAbilityBlueprint( String pbgPath ) | |
Returns an ability property bag group. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaBlueprint.cpp] (382) |
CamouflageStanceBlueprint BP_GetCamouflageStanceBlueprint( String pbgPath ) | |
Returns a camouflage stance property bag group. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaBlueprint.cpp] (406) |
CriticalBlueprint BP_GetCriticalBlueprint( String pbgPath ) | |
Returns a critical property bag group. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaBlueprint.cpp] (388) |
DamageBlueprint BP_GetDamageBlueprint( String pbgPath ) | |
Returns a damage property bag group. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaBlueprint.cpp] (394) |
MoveTypeBlueprint BP_GetMoveTypeBlueprint( String pbgPath ) | |
Returns a move type property bag group. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaBlueprint.cpp] (412) |
SlotItemBlueprint BP_GetSlotItemBlueprint( String pbgPath ) | |
Returns a slot item property bag group. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaBlueprint.cpp] (376) |
UpgradeBlueprint BP_GetUpgradeBlueprint( String pbgPath ) | |
Returns an upgrade property bag group. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaBlueprint.cpp] (370) |
WeaponBlueprint BP_GetWeaponBlueprint( String pbgPath ) | |
Returns a weapon property bag group. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaBlueprint.cpp] (400) |
Void EGroup_CallEntityFunction( EGroupID egroup, Function entityFunction, variable!argument list ) | |
Calls an Entity_ function on every entity in an egroup The first parameter of the supplied function must be EntityID |
|
Source: [WW2Data.sga/Scar/Groups.scar] (349) |
Void EGroup_CallEntityFunctionAllOrAny( EGroupID egroup, Boolean all, Function entityFunction, variable!argument list ) | |
Returns whether ALL or ANY entities in an egroup satisfy a condition, using an Entity_ function to perform the query on each entity The first parameter of the supplied function must be EntityID |
|
Source: [WW2Data.sga/Scar/Groups.scar] (358) |
Void FallBack_AddLocation( PlayerID player, String marker, Table markerlist ) | |
Add a fallback location to the manager. Add a fallback location to the manager, where if the enemy get close enough to the spot, the units within the vicinity will automatically fall back to one of the locations listed. |
|
Source: [WW2Data.sga/Scar/FallBack.scar] (27) |
Void FallBack_RemoveDestination( PlayerID player, String destination ) | |
Remove a destination from all fall backs for a player. Remove a destination from all fall backs listed for a particular player. |
|
Source: [WW2Data.sga/Scar/FallBack.scar] (71) |
Void FallBack_RemoveLocation( PlayerID player, String marker ) | |
Remove a fallback location from the manager. Remove a fallback location from the manager. |
|
Source: [WW2Data.sga/Scar/FallBack.scar] (46) |
Integer fatal( lua_State* state ) | |
Throws an error to lua and print out the error message |
|
Source: [DLL, from file /Cross/SimEngine/Scar/Scar.cpp] (275) |
Void Game_EnableInput( Boolean enabled ) | |
Enables/Disables all input EXCEPT for ESC and F10. |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGame.cpp] (120) |
Integer Game_GetSPDifficulty( Void ) | |
Returns current single player difficulty. Values are GD_EASY, GD_NORMAL, GD_HARD, GD_EXPERT. |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameMisc.cpp] (332) |
Void Game_HideSystemMessage( LocString msg ) | |
Removes a message added by Game_ShowSystemMessage. |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGame.cpp] (139) |
Boolean Game_IsRTM( Void ) | |
Use to test whether the game is running in RTM mode or not. Using -rtm from the command line will cause this function to also return true in non-RTM builds. |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGame.cpp] (269) |
Void Game_LoadAtmosphere( String filename, Real transitionTime ) | |
Transitions to another atmosphere. Overwrites current transitions. |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameMisc.cpp] (338) |
Void Game_QuitApp( Void ) | |
Quits the app immediately |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGame.cpp] (145) |
Void Game_ScreenFade( Real r, Real g, Real b, Real a, Real timeSecs ) | |
Fades the screen to a given RGBA colour over a number of seconds |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGame.cpp] (163) |
Void Game_ShowPauseMenu( Void ) | |
Brings up the pause menu. The game does not get paused until the end of the current sim tick, so anything that comes after Game_ShowPauseMenu in your function will still get executed, as well as any rules set to run during that frame. |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGame.cpp] (263) |
Void Game_ShowSystemMessage( LocString msg ) | |
Shows a system message in the area where Game Paused text appears/ Call Game_HideSystemMessage to remove the message. |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGame.cpp] (133) |
Void Game_TriggerLightning( Void ) | |
Triggers lightning on the next frame |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameMisc.cpp] (352) |
Void GarrisonManager_AddGroup( Integer garrisonmin, Integer abandonmin, Integer searchradius, Integer!regarrison ] ) | |
Add a squad to the Building Manager. Will order them to garrison nearby buildings, take cover in a structure if they're under attack, move out of buildings to safer ones and generally act more intelligently EMPTY. |
|
Source: [WW2Data.sga/Scar/GarrisonBuilding.scar] (32) References: [SCAR+Garrison+Manager] |
Void GarrisonManager_RemoveGroup( SGroupID/EGroupID/SyncWeaponID gun ) | |
Remove a squad from the garrison manager. |
|
Source: [WW2Data.sga/Scar/GarrisonBuilding.scar] (87) References: [SCAR+Garrison+Manager] |
Boolean License_CanPlayRace( String raceName ) | |
Returns whether the installed version of the game allows the player to play this race |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameScar.cpp] (254) |
LocString LOC( String text ) | |
DEV ONLY: Converts ansi text to localized text. Your text will have to get localized properly at some point before final. When converting text with this function you will get LOC: prefixed to your text |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaLocalizer.cpp] (156) |
LocString Loc_ConvertNumber( Integer number ) | |
Returns a localized string containing the number. |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaLocalizer.cpp] (92) |
LocString Loc_Empty( Void ) | |
Empty string. This will create an empty localized string. |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaLocalizer.cpp] (147) |
LocString Loc_FormatTime( Integer secs, Boolean show_hours, Boolean leading_zeroes ) | |
Returns a formatted time string. can omit hours and leading zeroes (for example, 4:57 instead of 00:04:57) |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaLocalizer.cpp] (107) |
Void Misc_AbortToFE( Void ) | |
Abort straight out of the game to the frontend, without asking the user |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameMisc.cpp] (187) |
Boolean Misc_AIControlLocalPlayer( Void ) | |
Let AI take over local player |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameMisc.cpp] (107) |
Boolean Misc_DetectKeyboardInput( Void ) | |
Returns true if the app has had any keyboard input in the last second |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameMisc.cpp] (159) |
Boolean Misc_DetectMouseInput( Void ) | |
Returns true if the app has had any mouse input in the last second |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameMisc.cpp] (148) |
Void Misc_EnablePerformanceTest( Boolean toEnable ) | |
Turn on or off the performance test monitoring |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameMisc.cpp] (181) |
String Misc_GetCommandLineString( String option ) | |
Returns the string argument for a command line option. ex: for "-init test.lua" it would return "test.lua" |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameSetup.cpp] (41) |
Boolean Misc_IsCommandLineOptionSet( String option ) | |
Returns true if -option is specified on the command line |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameSetup.cpp] (32) |
Boolean Misc_IsPosOnScreen( Position pos ) | |
Check if position is on screen |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameMisc.cpp] (170) |
Void Misc_SetDesignerSplatsVisibility( Boolean bVisible ) | |
Shows or hides designer splats, which are splats in the UI folder |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameMisc.cpp] (280) |
Integer Modifier_ApplyToEntity( ScarModifier modifier, EntityID entity ) | |
Applies an entity modifier to an entity. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModifier.cpp] (224) |
Integer Modifier_ApplyToPlayer( ScarModifier modifier, PlayerID player ) | |
Applies a player modifier to a player. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModifier.cpp] (252) |
Integer Modifier_ApplyToSquad( ScarModifier modifier, SquadID squad ) | |
Applies a squad modifier to a squad. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModifier.cpp] (196) |
ScarModifier Modifier_Create( Integer applicationType, String modtype, Integer usageType, Boolean exclusive, Real value, LuaBinding::StackVar v ) | |
Returns a modifier that you can apply to stuff. applicationType : MAT_EntityType, MAT_Entity, MAT_Player, MAT_Squad, MAT_SquadType, or MAT_Weapon.<BR/> modtype : Name of modifier from the modifiers table in the attribute editor.<BR/> usageType : MUT_Addition, MUT_Multiplication or MUT_Enable.<BR/> exclusive : This field is not currently used for modifiers created through script. <BR/> value : The value for the modifier.<BR/> extname : The name of the entity/squad blueprint for when the applicationType is MAT_EntityType or MAT_SquadType. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModifier.cpp] (113) |
Void Modifier_Destroy( ScarModifier modifier ) | |
Todo. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModifier.cpp] (169) |
Boolean Modifier_IsEnabled( EntityID pEntity, String modtype, Boolean bEnabledByDefault ) | |
Checks whether the modifier is enabled (requires an Entity and an Entity enable/disable modifier) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModifier.cpp] (293) |
Void Obj_AlertSitRep( PlayerID player, Integer id ) | |
Create an on screen event cue to alert new sit rep |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaObjectives.cpp] (181) |
Integer Obj_Create( LocString title, LocString desc, String icon, Integer type, MedalBlueprint medalPBG ) | |
Create an objective and returns the unique ID for it type could either be OT_Primary, OT_Secondary or OT_Medal |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaObjectives.cpp] (37) |
Integer Obj_GetState( Integer objectiveID ) | |
Get objective state ( OS_Off, OS_Incomplete, OS_Complete, OS_Failed ) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaObjectives.cpp] (120) |
Boolean Obj_GetVisible( Integer objectiveID ) | |
Get objective visibility |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaObjectives.cpp] (142) |
Void Obj_SetDescription( Integer objectiveID, LocString desc ) | |
Set description text localization ID for the objective |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaObjectives.cpp] (84) |
Void Obj_SetIcon( Integer objectiveID, String icon ) | |
Set icon path for the objective |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaObjectives.cpp] (94) |
Void Obj_SetObjectiveFunction( Integer id, Integer fnType, LuaFunction f ) | |
Set callback functions for the objective. FN_OnActivate is for triggering situation report. FN_OnShow is used to assign UI element when tactical map is open. FN_OnSelect is used to assign UI element when the objective is highlighted |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaObjectives.cpp] (155) |
Void Obj_SetState( Integer objectiveID, Integer state ) | |
Set objective state ( OS_Off, OS_Incomplete, OS_Complete, OS_Failed ) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaObjectives.cpp] (104) |
Void Obj_SetTitle( Integer objectiveID, LocString title ) | |
Set title text localization ID for the objective |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaObjectives.cpp] (74) |
Void Obj_SetVisible( Integer objectiveID, Boolean visible ) | |
Set objective visibility |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaObjectives.cpp] (132) |
String PlayerProfile_GetVar( String varname ) | |
Retrieve a custom value in current player profile. Returns an empty string if value does not exist |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameMisc.cpp] (304) |
Void PlayerProfile_SetVar( String varname, String value ) | |
Save a custom value in current player profile. |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameMisc.cpp] (319) |
Void PrintOnScreen( String text ) | |
Prints a message on the screen Prints the given message on the screen. It will stay there until you call PrintOnScreen_RemoveFromScreen() or print another message on the screen to replace it. |
|
Source: [WW2Data.sga/Scar/PrintOnScreen.scar] (21) |
Void PrintOnScreen_RemoveFromScreen( ) | |
Remove any messages from the screen Removes from the screen any messages put there with PrintOnScreen() |
|
Source: [WW2Data.sga/Scar/PrintOnScreen.scar] (57) |
ResourceAmount ResourceAmount_Add( ResourceAmount amt1, ResourceAmount amt2 ) | |
Add each element of the two passed in ResourceAmounts together |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModObjects.cpp] (44) |
ResourceAmount ResourceAmount_ClampToZero( ResourceAmount amt ) | |
Clamps the passed in resource to zero if it has any negative numbers |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModObjects.cpp] (68) |
Boolean ResourceAmount_Has( ResourceAmount amt1, ResourceAmount amt2 ) | |
Returns true if the first amount has enough resources for the second amount (amt2) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModObjects.cpp] (62) |
ResourceAmount ResourceAmount_Mult( ResourceAmount amt1, Real mult ) | |
Take a resource amount and multiply each value inside of it by mult |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModObjects.cpp] (50) |
ResourceAmount ResourceAmount_Subtract( ResourceAmount amt1, ResourceAmount amt2 ) | |
Subtract the second amount from the first and return the new ResourceAmount |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModObjects.cpp] (38) |
Real ResourceAmount_Sum( ResourceAmount amt1 ) | |
Add up all the numbers in the resource and return a single value |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModObjects.cpp] (56) |
ResourceAmount ResourceAmount_Zero( Void ) | |
Creates a new ResourceAmount all set to zero |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaModObjects.cpp] (32) |
Void Scar_Autosave( LocString checkpoint ) | |
Saves the game. the savegame name is built using the abbreviated mission name + checkpoint. |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameScar.cpp] (226) |
Void Scar_AwardMedal( MedalBlueprint medal ) | |
Awards a medal to the current player. The campaign must be set up to allow that medal to be awarded during this mission, or you will get a fatal SCAR error. |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameScar.cpp] (168) |
Void Scar_DebugConsoleExecute( String command ) | |
execute console command string. Will only work if dev mode is enabled! (it's OFF by default in RTM builds) |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameScar.cpp] (85) |
Boolean Scar_PlayerHasMedal( MedalBlueprint medal ) | |
Returns whether the player has a medal that can be awarded during this mission. |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameScar.cpp] (188) |
Void Scar_PlayNIS( String filename ) | |
Play NIS through SCAR. Should only be used inside a event function |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameScar.cpp] (126) |
Void Scar_PlayNIS2( String filename1, String filename2 ) | |
Play 2 NISs through SCAR. Should only be used inside a event function |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameScar.cpp] (132) |
Integer scartype( LuaBinding::StackVar v ) | |
Returns ST_NIL,ST_BOOLEAN,ST_NUMBER,ST_STRING,ST_TABLE,ST_FUNCTION,ST_SCARPOS,ST_EGROUP,ST_ENTITY,ST_SGROUP,ST_SQUAD,ST_TEAM,ST_MARKER, ST_PBG, or ST_UNKNOWN |
|
Source: [DLL, from file /Cross/SimEngine/Scar/Scar.cpp] (122) |
String scartype_tostring( LuaBinding::StackVar v ) | |
Returns a string representing the scartype |
|
Source: [DLL, from file /Cross/SimEngine/Scar/Scar.cpp] (176) |
Real Setup_GetVictoryPointTickerOption( Void ) | |
Get the victory point ticker option selected |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaGameSetup.cpp] (88) |
Void Setup_SetPlayerName( PlayerID player, LocString name ) | |
Set the UI name of a given player. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaGameSetup.cpp] (81) |
Void Setup_SetPlayerRace( PlayerID player, Integer raceIndex ) | |
Set the race for a given player. Use World_GetRaceIndex() to get the race index from the ME name. |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaGameSetup.cpp] (66) |
Void Setup_SetPlayerTeam( PlayerID p, Integer team_id ) | |
Put a player in a team. Use TEAM_NEUTRAL as the team_id to set the player as neutral |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaGameSetup.cpp] (99) |
Void SGroup_CallEntityFunction( SGroupID sgroup, Function entityFunction ) | |
Calls an Entity_ function on every entity in an sgroup The first parameter of the supplied function must be EntityID |
|
Source: [WW2Data.sga/Scar/Groups.scar] (385) |
Void SGroup_CallSquadFunction( SGroupID sgroup, Function squadFunction, variable!argument list ) | |
Calls a Squad_ function on every squad in an sgroup The first parameter of the supplied function must be SquadID |
|
Source: [WW2Data.sga/Scar/Groups.scar] (367) |
Void SGroup_CallSquadFunctionAllOrAny( SGroupID sgroup, Boolean all, Function squadFunction, variable!argument list ) | |
Returns whether ALL or ANY squads in an sgroup satisfy a condition, using a Squad_ function to perform the query on each squad The first parameter of the supplied function must be SquadID |
|
Source: [WW2Data.sga/Scar/Groups.scar] (376) |
Void Sound_ContainerDebug( Void ) | |
Turns container debugging on/off Example:<BR/><BR/> \Sound_ContainerDebug()<BR/> |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaSound.cpp] (329) |
Integer Sound_Play2D( String name ) | |
Plays a 2D sound from the Data:Sound folder. Use the path relative to Sound folder without the file extension. Returns handle to the sound container The sound needs to be 2D Example:<BR/><BR/> <TAB/>Sound_Play( "Blah/Mysound" )<BR/> |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaSound.cpp] (259) |
Integer Sound_Play3D( String name, EntityID actor ) | |
Plays a 3D sound from the Data:Sound folder on the entity. Use the path relative to Sound folder without the file extension. Returns handle to the sound container The sound needs to be 3D Example:<BR/><BR/> <TAB/>Sound_Play( "Speech/SpaceMarine/AddOnComplete", TheActor )<BR/> |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaSound.cpp] (250) |
Void Sound_PlayMusic( String name, Real fade, Real delay ) | |
Plays music from the Data:Sound folder. The new music will phase out the old one. There can only be one music playing at anytime besides the transition fade is the time to fade in the music; delay is the time in seconds to wait until the new music is started Example:<BR/><BR/> <TAB/>Sound_PlayMusic( "Music/GreatMusic", 0.0, 0.0 )<BR/> |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaSound.cpp] (284) |
Integer Sound_PlayStreamed( String name ) | |
Plays a streaming sound from the Data:Sound folder. Use the path relative to Sound folder without the file extension. Returns handle to the sound container The sound needs to be 2D Example:<BR/><BR/> <TAB/>Sound_PlayStreamed( "Blah/Mysound" )<BR/> |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaSound.cpp] (268) |
Void Sound_PreCacheSound( String name ) | |
pre-caches a sound Example:<BR/><BR/> <TAB/>Sound_PreCacheSound("nis/m02_n01_full")<BR/> |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaSound.cpp] (368) |
Void Sound_SetVolume( String name, Real volume, Real time ) | |
Sets a new volume for the group. Example:<BR/><BR/> <TAB/>Sound_Volume("Weapons", 0.5, 2)<BR/> |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaSound.cpp] (338) |
Void Sound_SetVolumeDefault( String name, Real time ) | |
Sets the default volume for the group. Example:<BR/><BR/> <TAB/>Sound_SetVolumeDefault("Weapons", 2)<BR/> |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaSound.cpp] (348) |
Void Sound_SetVolumeInv( String name, Real volume, Real time ) | |
Sets the volume for all groups except the one specified. Example:<BR/><BR/> <TAB/>Sound_VolumeInv("NIS", 0.5, 2)<BR/> |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaSound.cpp] (358) |
Void Sound_StartRecording( String name ) | |
Starts recording the sound driver output Example:<BR/><BR/> <TAB/>Sound_StartRecording("Recordings/MyRecording.wav")<BR/> |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaSound.cpp] (307) |
Void Sound_Stop( Integer handle ) | |
Stops sound associated with the container handle |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaSound.cpp] (274) |
Void Sound_StopMusic( Real fade, Real delay ) | |
Stop current playing music Currently playing music would be stopped. If nothing is playing, nothing will happen fade is the time to fade out the music; delay is the time in seconds wait until the new music is stopped Example:<BR/><BR/> <TAB/>Sound_StopMusic( "Music/GreatMusic", 0.0 )<BR/> |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaSound.cpp] (296) |
Void Sound_StopRecording( Void ) | |
Stops recording the sound driver output Example:<BR/><BR/> <TAB/>Sound_StopRecording()<BR/> |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/LuaSound.cpp] (318) |
Boolean SyncWeapon_CanAttackNow( SyncWeaponID weapon, egroup/sgroup/pos/marker target ) | |
Checks whether a sync weapon can attack a target without moving or turning. |
|
Source: [WW2Data.sga/Scar/SyncWeapons.scar] (198) |
Boolean SyncWeapon_Exists( SyncWeaponID weapon ) | |
Returns true if a sync weapon still exists in the game world |
|
Source: [WW2Data.sga/Scar/SyncWeapons.scar] (155) |
EntityID SyncWeapon_GetEntity( SyncWeaponID weapon ) | |
Returns the EntityID of a sync weapon, or nil if it's been destroyed |
|
Source: [WW2Data.sga/Scar/SyncWeapons.scar] (135) |
SyncWeaponID SyncWeapon_GetFromEGroup( EGroupID egroup ) | |
Registers the sync weapon in the egroup and returns a SyncWeaponID you can use to keep track of it |
|
Source: [WW2Data.sga/Scar/SyncWeapons.scar] (16) |
SyncWeaponID SyncWeapon_GetFromSGroup( SGroupID sgroup ) | |
Registers the sync weapon in the sgroup and returns a SyncWeaponID you can use to keep track of it |
|
Source: [WW2Data.sga/Scar/SyncWeapons.scar] (63) |
Position SyncWeapon_GetPosition( SyncWeaponID weapon ) | |
Returns the position of a sync weapon, or nil if it's been destroyed |
|
Source: [WW2Data.sga/Scar/SyncWeapons.scar] (145) |
Boolean SyncWeapon_IsAttacking( SyncWeaponID weapon, Real time ) | |
Checks whether or not the actual sync weapon in a squad attacking. |
|
Source: [WW2Data.sga/Scar/SyncWeapons.scar] (185) |
Boolean SyncWeapon_IsOwnedByPlayer( SyncWeaponID weapon, [PlayerID player] ) | |
Returns true if the specified player owns the sync weapon. Use a playerid of nil to see if it's unonwed. If player is not specified, then the code will check to see if the SyncWeapon is owned by the world. |
|
Source: [WW2Data.sga/Scar/SyncWeapons.scar] (103) |
Void SyncWeapon_SetAutoTargetting( SyncWeaponID weapon, String hardpoint, Bool enable ) | |
Sets whether a weapon to auto-target things or not |
|
Source: [WW2Data.sga/Scar/SyncWeapons.scar] (163) |
Void Team_CallPlayerFunction( TeamID team, Function playerFunction, variable!argument list ) | |
Calls an existing Player_ function on every player on a team The first parameter of the supplied function must be PlayerID |
|
Source: [WW2Data.sga/Scar/Team.scar] (70) |
Void Team_CallPlayerFunctionAllOrAny( TeamID team, Boolean all, Function playerFunction, variable!argument list ) | |
Returns whether ALL or ANY players on a team satisfy a condition, using a Player_ function to perform the query on each player restriction: the first parameter of the supplied function must be PlayerID |
|
Source: [WW2Data.sga/Scar/Team.scar] (114) |
TeamID Team_FindByRace( String race[, String race2 ) | |
Returns the TeamID for a given race. See LuaConsts for constants to use. You can pass in multiple races, for example: allies and commonwealth. |
|
Source: [WW2Data.sga/Scar/Team.scar] (162) |
Void Team_ForEach( TeamID team, LuaFunction function ) | |
Calls your function on each player on a team. Parameters of your function are: (TeamID, player index, PlayerID). You can return true to stop the loop |
|
Source: [WW2Data.sga/Scar/Team.scar] (30) |
Boolean Team_ForEachAllOrAny( TeamID team, Boolean all, LuaFunction function ) | |
Tests a condition on teams. Calls your function for each player. Parameters of your function: (TeamID, player index, PlayerID). Your function must return true or false to indicate whether the player meets the condition. |
|
Source: [WW2Data.sga/Scar/Team.scar] (48) |
TeamID Team_GetEnemyTeam( TeamID team ) | |
Returns a team's enemy |
|
Source: [WW2Data.sga/Scar/Team.scar] (187) |
Table Team_GetPlayers( TeamID team ) | |
Returns a table containing all the players on a team |
|
Source: [WW2Data.sga/Scar/Team.scar] (9) |
Void TutorialMenu_EnableResumeButton( Boolean enable ) | |
Enables or disables the Resume button in the tutorial menu. Can be called at any time. |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameScar.cpp] (161) |
Void TutorialMenu_SetButtonInfo( Integer index, Boolean enabled, LocString text, LocString tooltip, String icon, LuaFunction callback ) | |
Sets up a button on the tutorial menu. |
|
Source: [DLL, from file /Cross/Game/Src/LuaLibs/LuaGameScar.cpp] (154) |
Void Util_CreateEntities( PlayerID player, EGroupID egroup, Integer blueprintID, MarkerID/Pos location, Integer numentities[, MarkerID/Pos toward] ) | |
Creates a given number of entities at a location and adds them to an egroup. A PlayerID of nil will create the entities as world objects. |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (377) |
Void Util_CreateSquads( PlayerID player, SGroupID sgroup, SquadBlueprint/Table sbp, Marker/Pos/SGroup/EGroup spawn_point[, Position destination, Integer numsquads, Integer loadout, Boolean attackmove, Position dest_facing, UpgradeBlueprint/Table upgrades, Position spawn_facing] ) | |
High level function to create squads and give them basic orders upon spawning. detailed explanation found in Confluence |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (480) References: [Util_CreateSquads] |
Position Util_GetOffsetPosition( entity/squad/egroup/sgroup/marker/position pos, Integer offset, Real distance ) | |
Returns a position relative to a entity/squad/egroup/sgroup/marker/position's current position and orientation. see LuaConsts.scar for explanation of 'offset' parameter. |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (733) |
PlayerID Util_GetPlayerOwner( entity/squad/egroup/sgroup/player Object ) | |
Returns the player owner for any of: entity, squad, egroup, sgroup, player. for groups, the first item is used. Returns nil for world owned or empty groups |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (644) |
Integer --> R_ENEMY, R_ALLY, R_NEUTRAL, R_UNDEFINED, or nil (if world owned or invalid parameters) Util_GetRelationship( entity/squad/egroup/sgroup/player Object_1, entity/squad/egroup/sgroup/player Object_2 ) | |
Gets the relationship between two of: entity, squad, egroup, sgroup, player. for groups, the first item is used. |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (717) |
Void Util_Paradrop( PlayerID player, SGroupID sgroup, StackVar blueprint, Position location, Integer numsquads[, Integer loadout] ) | |
Paradrops in a given number of squads at a location and adds them to an sgroup. You can optionally also specify the loadout (it will default to the min loadout if left off) The squad is not created right away (it waits for the plane to be over the dropzone) so be careful using the sgroup right after calling this function. |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (433) |
Position Util_ScarPos( Real xpos, Real ypos ) | |
Converts a 2D top down position to a 3D ScarPosition. 3D ScarPositions have the x axis left to right, the z axis in to out, and the y axis down to up (y axis represents the height of the terrain). Use this function to convert a top-down 2D position to a 3D world position.<BR/><BR/> Note: (0,0) is in the center of the map. |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (369) |
Void Util_SetPlayerOwner( entity/squad/egroup/sgroup Object, PlayerID owner[, Boolean bApplyToSquadsHeld=true] ) | |
Sets the player owner for an entity, squad, egroup or sgroup. Also sets player owner of whatever is garrisoned inside them |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (683) |
Void Util_SpawnGlider( PlayerID player, ScarEntityPBG gliderEBP, Position start, Position land[, SGroupID sgroup] ) | |
Spawns a glider and puts the squads in an sgroup when they spawn |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (630) |
Void Util_StartNIS( String/Integer/LuaFunction NIS[, LuaFunction onComplete, egroup/sgroup/Player/Table hide, LuaFunction preNIS, LuaFunction postNIS] ) | |
Play an NIS. See confluence link below for more info. |
|
Source: [WW2Data.sga/Scar/NIS.scar] (20) References: [Scripting+NIS+Transitions] |
Void VIS_OccCullToggleOBB( Void ) | |
toggle the visibility of occlusion culling OBB |
|
Source: [DLL, from file /Cross/GameEngine/LuaLibs/luagameengine.cpp] (46) |
Boolean WC_CheckOneTeamLeft( String win_condition ) | |
If only one team is alive, players on that team win. Returns true if one team left. |
|
Source: [WW2Data.sga/Scar/WCUtil.scar] (10) |
World |
Functions |
Void Weather_SetType( String weatherLevelName ) | |
changes the weather state of all objects (options: sunny,lightrain,mediumrain, heavyrain) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (1129) |
Void World_CleanUpTheDead( PlayerID player ) | |
Kill off a specific player's dead bodies (enter ALL to clean them all up) |
|
Source: [WW2Data.sga/Scar/ScarUtil.scar] (1547) |
LuaTable World_CopyTable( LuaTable OriginalTable ) | |
Copies the contents of the original table returns a new table with the contents of that table |
|
Source: [WW2Data.sga/Scar/MoreUtils.scar] (165) |
Void World_DestroyWallsNearMarker( MarkerID marker ) | |
Destroys walls (entities with a wall_ext) near a marker |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (1094) |
Real World_DistanceEGroupToPoint( EGroupID egroup, Position p1, Boolean closest ) | |
Get the distance between a squad group and a point. Pass in true for 3rd parameter to get the closest point and pass in false to get the furthest point. The closest/furthest point is calculated on a per entity basis. So the closest distance would be that of the closest entity.<BR/> Also note, it is an error to call this function with an empty group.<BR/> |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaworld.cpp] (120) |
Real World_DistancePointToPoint( Position p1, Position p2 ) | |
Get the distance between two points. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaworld.cpp] (103) |
Real World_DistanceSGroupToPoint( SGroupID sgroup, Position p1, Boolean closest ) | |
Get the distance between a squad group and a point. Pass in true for 3rd parameter to get the closest point and pass in false to get the furthest point. The closest/furthest point is calculated on a per squadron basis. So the closest distance would be that of the closest squadron.<BR/> It is an error to call this function with an empty group. Check the group size with SquadGroup_Count( ) first. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaworld.cpp] (165) |
Real World_DistanceSquaredPointToPoint( Position p1, Position p2 ) | |
Get the distance squared between two points. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaworld.cpp] (110) |
Void World_EnablePlayerToPlayerFOW( PlayerID p0, PlayerID p1, Boolean enable ) | |
Enables or disables the fog of war between these two players |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (385) |
Void World_EndSP( Boolean win ) | |
Wins/loses a single team mission for the local teams |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (188) |
Variable World_GetClosest( Variable var, LuaTable items ) | |
Returns the closest object from the table of marker/pos/egroup/sgroup to the closest marker/pos/egroup/sgroup specified The table may mix together objects of different types. |
|
Source: [WW2Data.sga/Scar/MoreUtils.scar] (114) |
Integer World_GetEntitiesNearMarker( PlayerID player, EGroupID egroup, MarkerID marker, Integer ownerType ) | |
Find and add entities near the marker to the egroup Entities belonging to a squad would not be added to the egroup |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (797) |
Integer World_GetEntitiesNearPoint( PlayerID player, EGroupID egroup, Position pos, Real radius, Integer ownerType ) | |
Find and add entities near the point to the egroup Entities belonging to a squad would not be added to the egroup |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (625) |
Integer World_GetEntitiesWithinTerritorySector( PlayerID player, EGroupID egroup, Integer sectorID, Integer ownerType ) | |
Find and add entities within the territory sector to the egroup Entities belonging to a squad would not be added to the egroup |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (992) |
EntityID World_GetEntity( Integer index ) | |
Returns the EntityID at given index, use with World_GetNumEntities() to iterate through all the entities in the world |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (329) |
Variable World_GetFurthest( Variable var, LuaTable items ) | |
Returns the furthest object from the table of marker/pos/egroup/sgroup to the furthest marker/pos/egroup/sgroup specified. The table may mix together objects of different types. |
|
Source: [WW2Data.sga/Scar/MoreUtils.scar] (144) |
Real World_GetGameTime( Void ) | |
Return the total game time in seconds. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaworld.cpp] (42) |
Position World_GetHiddenPositionOnPath( PlayerID player, MarkerID/Pos origin, MarkerID/Pos destination, Integer checktype ) | |
Find a position on a path hidden from view, as close to the destination as possible whilst still satisfying your hidden checktype. Checktype can be either CHECK_IN_FOW, CHECK_OFFCAMERA or CHECK_BOTH. The path is always calculated as if it were plain infantry. This function returns nil if it can't find a suitable position, so you can do a backup plan. |
|
Source: [WW2Data.sga/Scar/MoreUtils.scar] (12) |
Real World_GetLength( Void ) | |
Returns the total playable length of the game world (z coordinate) Since the center of the map is 0,0 the world z range is (-l/2 -> l/2) |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaworld.cpp] (288) |
Integer World_GetNeutralEntitiesNearMarker( EGroupID egroup, MarkerID marker ) | |
Find and add neutral entities near the marker to the egroup Entities belonging to a squad would not be added to the egroup |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (894) |
Integer World_GetNeutralEntitiesNearPoint( EGroupID egroup, Position pos, Real radius ) | |
Find and add neutral entities near the point to the egroup Entities belonging to a squad would not be added to the egroup |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (691) |
Integer World_GetNeutralEntitiesWithinTerritorySector( EGroupID egroup, Integer sectorID ) | |
Find and add neutral entities within the territory sector to the egroup Entities belonging to a squad would not be added to the egroup |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (1063) |
Integer World_GetNumEntities( Void ) | |
Returns the number of spawned entities in the entire world (use sparingly and never at runtime) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (320) |
Integer World_GetNumEntitiesNearPoint( EntityBlueprint ebp, Position pos, Real radius ) | |
Return the number of entities of the same ebp in the sphere volume |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (518) |
Integer World_GetNumStrategicPoints( Void ) | |
Returns the number of strategic points on this map (does not count strat. objectives) |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (272) |
Integer World_GetNumVictoryPoints( Void ) | |
Returns the number of strategic objectives on this map |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (296) |
Position World_GetOffsetPosition( Position position, Position heading, Integer offset, Real distance ) | |
Returns a position that is offset a certain distance from the position/heading passed in. see LuaConsts.scar for explanation of 'offset' parameter. |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaworld.cpp] (207) |
PlayerID World_GetPlayerAt( Integer index ) | |
- Returns the player at a given index, numbers start at one |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaworld.cpp] (72) |
Integer World_GetPlayerCount( Void ) | |
Return the total number of players in the world |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaworld.cpp] (48) |
Integer World_GetPlayerIndex( PlayerID player ) | |
- Returns the player index given the Player* |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaworld.cpp] (87) |
EntityBlueprint World_GetPossibleBuildingsBlueprint( Integer race_index, Integer building_index ) | |
Returns the blueprint of a chosen building for a race |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (242) |
Integer World_GetPossibleBuildingsCount( Integer race_index ) | |
Returns the number of types of buildings a race can build |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (236) |
SquadBlueprint World_GetPossibleSquadsBlueprint( Integer race_index, Integer squad_index ) | |
Returns the blueprint of a chosen squad for a race |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (254) |
Integer World_GetPossibleSquadsCount( Integer race_index ) | |
Returns the number of types of squads a race can build |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (248) |
Integer World_GetRaceIndex( String racename ) | |
Returns the race index of a race, given its name (from the ME). Valid race names for COH are "allies" and "axis" |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (346) |
Integer World_GetRand( Integer min, Integer max ) | |
Returns a random integer with range [min, max] It is recomended you use this instead of luas math.random function |
|
Source: [DLL, from file /Cross/SimEngine/LuaExports/luaworld.cpp] (250) |
Position World_GetSpawnablePosition( Position around, EntityID entity ) | |
Given any position in the world, this function will return position safe for spawning a given entity |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (77) |
Integer World_GetSquadsNearMarker( PlayerID player, SGroupID sgroup, MarkerID marker, Integer ownerType ) | |
Find and add squads near the marker to the sgroup This function is faster if radius is small and/or number of squads to search for is large |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (700) |
Integer World_GetSquadsNearPoint( PlayerID player, SGroupID sgroup, Position pos, Real radius, Integer ownerType ) | |
Find and add squads near the point to the sgroup This function is faster if radius is small and/or number of squads to search for is large |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (558) |
Integer World_GetSquadsWithinTerritorySector( PlayerID player, SGroupID sgroup, Integer sectorID, Integer ownerType ) | |
Find and add squads within territory sector identified by sector ID Owner type could be OT_Player, OT_Ally, OT_Enemy or OT_Neutral |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (920) |
Real World_GetTeamsSuppliedTerritoryArea( Integer team_index ) | |
Returns the area in square meters of supplied territory this team has |
|
Source: [DLL, from file /Cross/WW2Mod/Simulation/LuaLibs/LuaWorld.cpp] (404) |