OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: skid on 16 Jul 2003, 01:14:03

Title: empty Vehicle
Post by: skid on 16 Jul 2003, 01:14:03
Can anyone tell me if it is possible to find out if a vehicle is empty?.

I'm looking for a trigger to be activated if the Machine gun becomes empty.

I carn't use not(alive who) because I don't know who current  Machine gunner is.

All I need to know is is it empty.
Title: Re:empty Vehicle
Post by: macguba on 16 Jul 2003, 01:21:33
I believe there's a script in the Ed Depot which checks if an MG is empty and assigns a new gunner if it is.
Title: Re:empty Vehicle
Post by: Igor Drukov on 16 Jul 2003, 01:58:10
In the condition field of your trigger :

(gunner myMachineGun) IsNull


Don't forget to set your trig on repeatedly if need be !
Title: Re:empty Vehicle
Post by: skid on 16 Jul 2003, 02:48:51
The script may work for what I want I haven't had time to test it yet.

I did try (gunner myMachineGun) IsNull

but it didn't work I get this
 (gunner mygrp) IsNull  unknown operator isnull
the hash between mygrp) and isnull
this would be great if it worked I have a need for something like this.

Thanks guys
Title: Re:empty Vehicle
Post by: Igor Drukov on 16 Jul 2003, 03:00:04
Sorry skid, I meant :

IsNull (gunner blabla)

blabla is the name of the mg.

 :cheers:
Title: Re:empty Vehicle
Post by: skid on 16 Jul 2003, 03:22:29
yes I had the same thought I don't get an error  now
but it won't activate the trigger either.

I have the following setup
an empty machinegun mg1

Repeated trig
cond: isnull (gunner mg1)

But it won't activate if I replace the "isnull (gunner mg1)"   with "THIS" and have a man entering the trigger it activates.
So I know the trig works it just the isnull that doesn't

Thanks



Title: Re:empty Vehicle
Post by: skid on 16 Jul 2003, 03:40:56
Ok thanks guys I sorted it now it did work I just had to put a 1 second delay in the trigger.

Cheers sel