arma2:scripting
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
arma2:scripting [2011/07/12 15:11] – added code_optimization link. snakeman | arma2:scripting [2011/08/10 06:06] – added group_in_vehicle link. snakeman | ||
---|---|---|---|
Line 13: | Line 13: | ||
**initJIPcompatible.sqf** is automatically started at unknown time, best guess would be when JIP player joins? | **initJIPcompatible.sqf** is automatically started at unknown time, best guess would be when JIP player joins? | ||
+ | [[arma2: | ||
Multiplayer [[arma2: | Multiplayer [[arma2: | ||
Line 18: | Line 19: | ||
Some [[arma2: | Some [[arma2: | ||
+ | [[arma2: | ||
- | ====== Scripting Commands ====== | + | [[arma2: |
- | + | ||
- | There' | + | |
- | + | ||
- | 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 " | + | |
- | </ | + | |
- | Usage of isNil is still valid. | + | |
Few more [[arma2: | Few more [[arma2: | ||
+ | [[arma2: | ||
- | ====== taskHint.sqf ====== | + | [[arma2:scripting: |
- | + | ||
- | 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, | + | |
- | </ | + | |
- | + | ||
- | 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: " | + | |
- | + | ||
- | * This command does not set the state of the task, so you still need to do this command, and the setTaskState command | + | |
- | * 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.txt · Last modified: 2024/08/01 22:38 by snakeman