Home
Intel Depot
Editors Depot
Missions Depot
Addons Depot
Forum
Home
Help
Search
Login
Register
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
OFP - Editing/Scripting General
(Moderators:
h-
,
savedbygrace
,
Gruntage
) »
Randomly kill 3 guys
« previous
next »
Send this topic
Print
Pages: [
1
]
Go Down
Author
Topic: Randomly kill 3 guys (Read 841 times)
0 Members and 1 Guest are viewing this topic.
The-Architect
Former Staff
Bite my shiny metal...
Randomly kill 3 guys
«
on:
13 Dec 2004, 13:24:49 »
I have a group which needs to board a chopper with limited seats. I have 11 men, chopper has 8 seats.
How can I have a script which will check how many units I have, and then, if I have more than 8, kill 3 ramdomly with a bmp shell?
Logged
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."
macguba
Former Staff
Re:Randomly kill 3 guys
«
Reply #1 on:
13 Dec 2004, 13:49:17 »
Condition: randKill and "alive _x" count units grp1 > 8
As for the Activation line, that's a bit trickier. What are the circumstances? Is the player in the area? Why is the group too big? Could you use two choppers? Or have the second one crash and the extra guys have to walk home.
Logged
Plenty of
reviewed ArmA missions
for you to play
Artak
The old beanbag shaker
Former Staff
You want to talk about it, yes?
Re:Randomly kill 3 guys
«
Reply #2 on:
13 Dec 2004, 13:55:54 »
#start
_units = units
groupname
_unitcount = count units
groupname
#loop
~2
?_unitcount < 9: exit
_selector = random _unitcount
_unit = _units select (_selector - (_selector mod 1))
_shell = "shell73" camcreate getpos _unit
~5
_units = units
groupname
_unitcount = count units
groupname
goto "loop"
Would that do?
Logged
Not all is lost.
bored_onion
Guest
Re:Randomly kill 3 guys
«
Reply #3 on:
13 Dec 2004, 17:52:18 »
wouldnt a shell artificially killing 3 guys be a bit precarious for the rest of the squad and the player in real terms - not to mention the chopper
Logged
The-Architect
Former Staff
Bite my shiny metal...
Re:Randomly kill 3 guys
«
Reply #4 on:
14 Dec 2004, 00:37:03 »
Its ok, I changed the Huey to a UH-1H which has 12 seats.
Too complicated to get into particulars about what I needed to do.
Cheers guys.
Logged
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."
Send this topic
Print
Pages: [
1
]
Go Up
« previous
next »
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
OFP - Editing/Scripting General
(Moderators:
h-
,
savedbygrace
,
Gruntage
) »
Randomly kill 3 guys
Top of page