CSLALUKI/Sandbox – User

From Bohemia Interactive Community
Jump to navigation Jump to search
(proposal)
 
mNo edit summary
Line 1: Line 1:
{{RV|type=command
== Description ==
Populate buildings in a given area with enemies.


|descr= Populate buildings in a given area with enemies.
== Syntax: ==
<sqf>[entity_name, max_distance, player_side_defined, is_debugging] execVM "\csla_scripts\mission\CSLA_fn_populateHouses.sqf"</sqf>


|s1= <sqf>[entity_name, max_distance, player_side_defined, is_debugging] execVM "\csla_scripts\mission\CSLA_fn_populateHouses.sqf"</sqf>
== Parameters ==


|p1= entity_name: [[Object]] - this object is used as the center of the radius
* entity_name: [[Object]] - this object is used as the center of the radius
 
* max_distance: [[Number]] - maximum distance from the entity in which buildings are filled with the enemy units
|p2= max_distance: [[Number]] - maximum distance from the entity in which buildings are filled with the enemy units
* player_side_defined: [[Boolean]] - True to set the enemy side to the opposite as the player's side, False to keep it default (FIA)
 
|p3= player_side_defined: [[Boolean]] - True to set the enemy side to the opposite as the player's side, False to keep it default (FIA)
{{Feature|important|Side selection is handled as follows:
{{Feature|important|Side selection is handled as follows:
* If the third argument is TRUE, and the player plays on the WEST side, the enemies have the EAST side assigned, and vice versa
* If the third argument is TRUE, and the player plays on the WEST side, the enemies have the EAST side assigned, and vice versa
Line 15: Line 15:
}}
}}


|p4= is_debugging: [[Boolean]] - True to print debug messages during init, False to prevent displaying debug messages
* is_debugging: [[Boolean]] - True to print debug messages during init, False to prevent displaying debug messages


|r1= [[Nothing]]


|x1= Populate buildings in 500 meters radius around the player: <sqf>[player, 500, TRUE, FALSE] execVM "\csla_scripts\mission\CSLA_fn_populateHouses.sqf";</sqf>
Return value: [[Nothing]]


|x2= Populate buildings in 250 meters radius around the "placedEntityInEden" object: <sqf>[placedEntityInEden, 250, FALSE, FALSE] execVM "\csla_scripts\mission\CSLA_fn_populateHouses.sqf";</sqf>
== Examples ==
Example 1: Populate buildings in 500 meters radius around the player:  
<sqf>[player, 500, TRUE, FALSE] execVM "\csla_scripts\mission\CSLA_fn_populateHouses.sqf";</sqf>


|x3= Use ''this'' in the ''Init'' field of the entity to populate buildings in 250 meters radius around the object: <sqf>[this, 250, FALSE, FALSE] execVM "\csla_scripts\mission\CSLA_fn_populateHouses.sqf";</sqf>
Example 2: Populate buildings in 250 meters radius around the "placedEntityInEden" object:  
<sqf>[placedEntityInEden, 250, FALSE, FALSE] execVM "\csla_scripts\mission\CSLA_fn_populateHouses.sqf";</sqf>


}}
Example 3: Use ''this'' in the ''Init'' field of the entity to populate buildings in 250 meters radius around the object:
<sqf>[this, 250, FALSE, FALSE] execVM "\csla_scripts\mission\CSLA_fn_populateHouses.sqf";</sqf>

Revision as of 23:40, 14 November 2022

Description

Populate buildings in a given area with enemies.

Syntax:

[entity_name, max_distance, player_side_defined, is_debugging] execVM "\csla_scripts\mission\CSLA_fn_populateHouses.sqf"

Parameters

  • entity_name: Object - this object is used as the center of the radius
  • max_distance: Number - maximum distance from the entity in which buildings are filled with the enemy units
  • player_side_defined: Boolean - True to set the enemy side to the opposite as the player's side, False to keep it default (FIA)
Side selection is handled as follows:
  • If the third argument is TRUE, and the player plays on the WEST side, the enemies have the EAST side assigned, and vice versa
  • If the third argument is FALSE, the GUER/RESISTANCE side is used
  • is_debugging: Boolean - True to print debug messages during init, False to prevent displaying debug messages


Return value: Nothing

Examples

Example 1: Populate buildings in 500 meters radius around the player:

[player, 500, TRUE, FALSE] execVM "\csla_scripts\mission\CSLA_fn_populateHouses.sqf";

Example 2: Populate buildings in 250 meters radius around the "placedEntityInEden" object:

[placedEntityInEden, 250, FALSE, FALSE] execVM "\csla_scripts\mission\CSLA_fn_populateHouses.sqf";

Example 3: Use this in the Init field of the entity to populate buildings in 250 meters radius around the object:

[this, 250, FALSE, FALSE] execVM "\csla_scripts\mission\CSLA_fn_populateHouses.sqf";