Warning: file_put_contents(/ff_86322220437cb19a07a9459152e16ee7d28508d7efe6d7f0.php): failed to open stream: Permission denied in /home/ofpecsav/public_html/forum/Sources/Subs-ForumFirewall.php on line 1619
Tip of the week archive | OFPEC The Editing Center

Tip of the week archive

By hoz

Tip #1

Adding a percentile(%) to the format command may seem like an impossible task. This little trick of appending a string of "%" to the format command makes it possible!

This will not display the percentile.

format["You have %1% ammo remaining", _mypercentage];

This will display the percentile.

format["You have %1%2 ammo remaining", _mypercentage, "%"];

As you can see here, the % within the quotes is an actual string, and the %2 sucks in the string and appends it.

 

Tip #2

Make all the units of a group sit down.

{
  doStop _x;          
  sleep 0.5;           
  _x action ["SitDown", _x];
} forEach units MyGroupName;

Tip #3

If you want turn off the default conversation with NPCs...

unit setVariable ["BIS_noCoreConversations", true]


The unit could be the player in most cases.

Advertisement