OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Case on 10 May 2007, 23:42:23
-
I have bits and pieces (from reading here), of what I need to do.
What I eventually want to do, is create a random number, 0 or 1 and set dammage to a group of civilians to that number. So basically, at the start of a mission either all the civilians are alive or dead.
I have created a group of civilians, and in the leader set init to 'grpCiv1 = Group This'.
For now, I am not randomizing the 0 or 1, I am just try to kill them all the time.
So,
In init.sqs I have:
"_x setdamage 1" foreach units grpCiv1;
This gives an error on mission load talking about string, expected code.
So, I create a radio trigger calling script that has the same line in it, but nothing happens when I activate the radio.
Can anyone help me out?
Thanks!
-
hmmm, let me see......I think.......
{_x setdamage 1} foreach units grpCiv1;
might be the answer.....possibly.
Planck
-
Thanks,
That worked perfectly, and just before you post I found a reference to the " being replaced by {} in Arma, thankfully, I can see how people had problems with using quotes...
Anyway, sorry for the newbie question, but thanks for the help.