OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: nominesine on 07 Jul 2009, 17:46:09
-
According to the wiki I can limit the spawn distance of ambient civilians with this code:
BIS_alice_mainscope setvariable ["spawnDistance",500];
How do I implement it? Just add it to the init line of the editor module? Or do I need to name the module and refer to it somehow???
-
init.sqf should do.
-
Remember modules take approximately '0.5s' to initiate, so you may want a delay or a waituntil till you execute that code.
-
Thanks. I noteced as much. I'm new to sqf.scripting. Can you show me a working example of the "wait until" syntax, with the above statement included and all the brackets in the right place. I feel a bit lost
::)
-
waitUntil { BIS_alice_mainscope getVariable "init" };
should wait the right amount of time.
-
Would the following syntax suffice too? Or does line breaks make a difference in sqf-scripting, just as they do in sqs-scripting?
waitUntil
{
BIS_alice_mainscope getVariable "init"
};
I find it much easier to learn if I can work with nicely structured code. I've also noticed that ArmA2 does not give me an error message when I make a syntax error in a script. Someone adviced me to look for a rpt-report. What is that? Where do I find it?
-
If you're using XP it should be located at:
C:\Documents and Settings\User name\Local Settings\Application Data\ArmA 2\arma2.RPT
Just open the file with Notepad.
Not sure where it is on Vista though.
I do find it a bit odd that they removed those error messages. They were quite useful. :dunno: