Inkompetent – User talk

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>" to "<code style="display: block">")
 
(2 intermediate revisions by one other user not shown)
Line 9: Line 9:


Example:
Example:
<code>if ((nr >= 0) and {alive(someArray select nr)}) then {};</code>
<code style="display: block">if ((nr >= 0) and {alive(someArray select nr)}) then {};</code>




Line 24: Line 24:
     false
     false
};</pre>
};</pre>
'''Mute annoying in-game comms'''
Use any of the below alone or in combination depending on wanted result:
<code style="display: block">enableRadio false; //disable radio messages to be heard and shown in the left lower corner of the screen</code>
<code style="display: block">0 fadeRadio 0; //mute in-game radio commands</code>
<code style="display: block">player setVariable ["BIS_noCoreConversations", true]; //disable greeting menu</code>




Line 48: Line 60:


http://forums.bistudio.com/showthread.php?115836-Some-advises
http://forums.bistudio.com/showthread.php?115836-Some-advises
== ACE-related tips and tricks ==
'''Proper DAGR. No map'''
by using ''showGPS = 0;'' in description.ext the DAGR can't use the default GPS map-function (Ctrl-M), but otherwise works as it should.

Latest revision as of 11:52, 11 January 2023

Gathered know-how

Proper use of IF-function:

Only ever use one single check per IF-function, because SQF doesn't do lazy evaluations. ALL of the checks in an IF-clause will be tested, even if the first one and all before the current tested one has failed.


NOTE EXCEPTION: Code can be used for lazy evaluation since build 93640.

Example: if ((nr >= 0) and {alive(someArray select nr)}) then {};


Substitute while-loop with waitUntil

Since while-loops only run for 10000 iterations one can instead use waitUntil with a false return value to emulate a while-loop that needs to run for the entire mission.

Example:

waitUntil
{
    ...your code here...
    sleep 0.5;
    false
};


Mute annoying in-game comms

Use any of the below alone or in combination depending on wanted result:

enableRadio false; //disable radio messages to be heard and shown in the left lower corner of the screen

0 fadeRadio 0; //mute in-game radio commands

player setVariable ["BIS_noCoreConversations", true]; //disable greeting menu


Multiplayer Scripting

http://community.bistudio.com/wiki/6thSense.eu:EG


Code Optimization

http://community.bistudio.com/wiki/Code_Optimisation


CONFIGS

http://community.bistudio.com/wiki/6thSense.eu:CG


Programming standards and suggestions

http://forums.bistudio.com/showthread.php?115836-Some-advises

ACE-related tips and tricks

Proper DAGR. No map

by using showGPS = 0; in description.ext the DAGR can't use the default GPS map-function (Ctrl-M), but otherwise works as it should.