OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started 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.
-
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.
-
In the condition field of your trigger :
(gunner myMachineGun) IsNull
Don't forget to set your trig on repeatedly if need be !
-
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
-
Sorry skid, I meant :
IsNull (gunner blabla)
blabla is the name of the mg.
:cheers:
-
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
-
Ok thanks guys I sorted it now it did work I just had to put a 1 second delay in the trigger.
Cheers sel