Home   Help Search Login Register  

Author Topic: Using 'Condition of Presence' to create unit at start  (Read 658 times)

0 Members and 4 Guests are viewing this topic.

micropilot

  • Guest
Heres what I'm trying to do.  I have a group of 3 east tanks: t-72(named t72_1), t-72(t72_2), and t-80(t80_1).  t72_2 has a probability of presence set at %50.  I want to put a condition in t80_1's Condition of presence line to have it only available if t72_2 is not there to provide some randomness to a mission.

I've tried using !alive t72_2 and this does not work if the tank is not there.  (returns a value of 'bool' instead of true.  I've also tried various permutations of this same thing with no success. (!alive commander t72_2, leader group this == commander t72_1 and other more backwards and convoluted ideas.

It seems the problem is only if you want to see if the unit is not present.  If I check for the presence (alive t72_2), this works great, but I want to only have the t-80 there is the t-72 is not.

Anyone got any ideas on how to make this work.  

Offline Alan34

  • Members
  • *
  • Praise the Lord and pass the Carl Gustav
    • Red Devils
Re:Using 'Condition of Presence' to create unit at start
« Reply #1 on: 24 Jan 2003, 05:10:57 »
I have a simple solution.  It's not pretty but it works.  Set up a 0X0 trigger with NONE for activation.  On Condition field use your alive reference for the T72.  In the on activation field, use setpos getpos to move the T80 to a remote section of the map.  When the mission starts, if the T72 is there, the T80 will move off the map.  I used a gamelogic to tell it where to go.  You can put the gamelogic in the water if u want and it will definitely not get invloved in the mission. I made a sample mission, if u wish to see it, let me know.

Cheers

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Using 'Condition of Presence' to create unit at start
« Reply #2 on: 24 Jan 2003, 09:38:40 »
hmm - that's really no pretty solution Alan  ;D

You know why? - there's a deleteVehicle command
available. This can be used to delete any vehicle, without
having to setpos/getpos it into deep blue sea  ;)

~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 Alan34

  • Members
  • *
  • Praise the Lord and pass the Carl Gustav
    • Red Devils
Re:Using 'Condition of Presence' to create unit at start
« Reply #3 on: 24 Jan 2003, 23:29:15 »
Here's the problem with using DeleteVehicle. It will not remove the tanks crew.  They will be standing there, (minus the tank) when the other tank, T72 referred to in the original post; is present.


Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Using 'Condition of Presence' to create unit at start
« Reply #4 on: 25 Jan 2003, 14:13:34 »
you can use deletevehicle if you don't use already manned tanks. use empty tanks and make a separate crew for them with this in their init field

unitname moveincommander tankname
unitname moveingunner tankname
unitname moveindriver tankname

now have a crew you can handle  ;)
Not all is lost.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Using 'Condition of Presence' to create unit at start
« Reply #5 on: 26 Jan 2003, 01:39:13 »
Or, if you are using already manned tanks, just use:

deleteVehicle driver tankname
deleteVehicle gunner tankname
deleteVehicle commander tankname
deleteVehicle tankname

                                ;)

~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