User Tools

Site Tools


arma2:scripting:comref

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
arma2:scripting:comref [2011/07/12 15:05] – created comref initial page. snakemanarma2:scripting:comref [2024/08/01 22:25] (current) – links added. snakeman
Line 1: Line 1:
-====== Scripting Command Reference ======+====== ArmA 2 Scripting Command Reference ====== 
 + 
 +[[https://www.pmctactical.org/forum/viewforum.php?f=50|ArmA 2 Forum]], [[:arma2|ArmA 2 Home]], [[arma2:config|ArmA 2 Config]], [[arma2:file_formats|ArmA 2 File Formats]], [[arma2:missions|ArmA 2 Missions]], [[arma2:modeling|ArmA 2 3D Modeling]], [[arma2:scripting|ArmA 2 Scripting]], [[arma2:terrain|ArmA 2 Terrain]], [[arma2:texturing|ArmA 2 Texturing]], [[arma2:tools|ArmA 2 Tools]]
  
 ArmA 2 scripting command reference. Not full reference, just most commonly used commands listed. ArmA 2 scripting command reference. Not full reference, just most commonly used commands listed.
 +
 +There's a lot of cool scripts (functions) available in Modules.pbo - especially under "Functions" and even an multiplayer Framework in "MP".
 +
 +Since ArmA 2 you must first initialize a variable before you reference it in your scripts. In ArmA, it was not a problem, at least for conditions.
 +<code cpp>
 +// this will error if myBoolean was not previously defined.
 +if (myBoolean) then { hint "test" };
 +</code>
 +Usage of isNil is still valid.
  
  
-====== BIS fnc locations ======+====== bis fnc locations ======
  
-BIS fnc locations+bis fnc locations
  
 Description: Creates or registers location logics (used in various modules, like [[arma2:editor_modules:alice|Ambient Civilians]], [[arma2:editor_modules:silvie|Ambient Civilian Vehicles]] or Warfare 2). Description: Creates or registers location logics (used in various modules, like [[arma2:editor_modules:alice|Ambient Civilians]], [[arma2:editor_modules:silvie|Ambient Civilian Vehicles]] or Warfare 2).
Line 313: Line 324:
 hndl = player execVM "group_follow.sqf"; hndl = player execVM "group_follow.sqf";
 </code> </code>
 +
 +
 +====== taskHint.sqf ======
 +
 +How to make task hints
 +
 +taskHint is relatively useless itself (because it requires too much effort), but there is a script that makes it easier to use. So instead of executing a hint, do this:
 +<code cpp>
 +[objNull, objNull, tskExample1, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";
 +</code>
 +
 +The first 2 arguments are useless so i just send objNull, the 3rd is the task that you've created, and the 4th is the status.
 +
 +Supported task states: "CREATED", "CURRENT", "CANCELED", "SUCCEEDED" and "FAILED".
 +
 +  * This command does not set the state of the task, so you still need to do this command, and the setTaskState command in your trigger.
 +  * It creates the hint in the middle of the screen, not at the right side (this means that taskHint and hint can be used at the same time).
 +
arma2/scripting/comref.1310483127.txt.gz · Last modified: 2011/07/12 15:05 (external edit)