Home   Help Search Login Register  

Author Topic: Ambient civilians  (Read 1997 times)

0 Members and 1 Guest are viewing this topic.

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Ambient civilians
« on: 07 Jul 2009, 17:46:09 »
According to the wiki I can limit the spawn distance of ambient civilians with this code:

Code: [Select]
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???
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: Ambient civilians
« Reply #1 on: 07 Jul 2009, 18:04:22 »
init.sqf should do.

Offline Rommel92

  • Members
  • *
Re: Ambient civilians
« Reply #2 on: 10 Jul 2009, 07:13:09 »
Remember modules take approximately '0.5s' to initiate, so you may want a delay or a waituntil till you execute that code.

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: Ambient civilians
« Reply #3 on: 10 Jul 2009, 17:59:50 »
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

  ::)
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Ambient civilians
« Reply #4 on: 10 Jul 2009, 23:50:08 »
Code: [Select]
waitUntil { BIS_alice_mainscope getVariable "init" };should wait the right amount of time.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: Ambient civilians
« Reply #5 on: 11 Jul 2009, 12:11:10 »
Would the following syntax suffice too? Or does line breaks make a difference in sqf-scripting, just as they do in sqs-scripting?

Code: [Select]
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?
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Zipper5

  • BIS Team
  • ****
Re: Ambient civilians
« Reply #6 on: 11 Jul 2009, 12:15:04 »
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: