Home   Help Search Login Register  

Author Topic: reinforcments when half the group dies?  (Read 1235 times)

0 Members and 1 Guest are viewing this topic.

Azraell

  • Guest
reinforcments when half the group dies?
« on: 20 Sep 2002, 14:18:18 »
hi, wondering if i could get some help.... havent played ofp for a year so i stopped learning how to edit it till res came out now my interest has continued... anyhow, i was needing a way to get help to come, whether it be a squad of men or a helo, when half ur group dies or half an enemies group.....say like u got 12 soilders and 7 get offed(doesnt matter which 7 guys die), that will activate a trigger that will send in the reinforments..... appreciate any help u can give me...its prolly some simple little code:)

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:reinforcments when half the group dies?
« Reply #1 on: 20 Sep 2002, 16:54:03 »
In the init field of the groupleader type:
mygroup = group this; groupcount = count (units mygroup)

Now create a trigger;
activation: none
condition: count (units mygroup) < (groupcount * 0.5)

This trigger should become active, once your group is less
than the half.

:note - mygroup and groupcount are 2 names of my choice,
you can exchange them to any name, you want (except
reserved variables or already used variables somewhere else in
your mission)

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:reinforcments when half the group dies?
« Reply #2 on: 20 Sep 2002, 17:11:46 »


[attachment deleted by admin]
« Last Edit: 20 Sep 2002, 17:14:24 by Tomb »

Azraell

  • Guest
Re:reinforcments when half the group dies?
« Reply #3 on: 20 Sep 2002, 18:38:03 »
cool, thanks guys, this all looks good:)