Home   Help Search Login Register  

Author Topic: Randomly kill 3 guys  (Read 842 times)

0 Members and 1 Guest are viewing this topic.

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
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?
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."

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
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.
Plenty of reviewed ArmA missions for you to play

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
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?
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

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
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.
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."