OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: W0lle on 01 Aug 2005, 02:40:24

Title: Rearm/Refuel when inside a trigger
Post by: W0lle on 01 Aug 2005, 02:40:24
Is it possible that if for example, I land with my chopper within a trigger it gets rearmed/refuelled/repaired without the use of support trucks?

To get more into detail:
For a MP mission I'm working on I have pilots in a group and a few empty choppers. Each time one of the pilots land with his chopper in a trigger area, his chopper should be repaired and rearmed automatically.

Yes I search the forums and editors depot but wasn't able to find what I'm looking for.

Any help much appreciated
Title: Re:Rearm/Refuel when inside a trigger
Post by: Dane on 01 Aug 2005, 03:21:45
Yes, write in trigger cond field: getpos namechopper select 2 <= 0.5
And in activation field: chopper setFuel 1;chopper setDammage 0; removeAllWeapons chopper;chopper addMagazine "magName";chopper addWeapon "weapName".

This way the will be refueled and rearmed when in trigger area and its altitude is 0.5m or less.
Title: Re:Rearm/Refuel when inside a trigger
Post by: W0lle on 01 Aug 2005, 15:48:03
Thanks Dane, that does the job  :)
Title: Re:Rearm/Refuel when inside a trigger
Post by: Triggerhappy on 01 Aug 2005, 23:11:46
not quite.
that trigger will go off no matter where the chopper is, as long as it is less the half a meter above the ground

i would say group the trigger to the chopper, set the activation to present, and add this && (what dane said)

this && (getpos namechopper select 2 <= 0.5)
Title: Re:Rearm/Refuel when inside a trigger
Post by: W0lle on 02 Aug 2005, 06:12:53
Noticed that issue now as I've tested the mission once more. The other problem I encountered is that I use different choppers with different (non BIS weapons).

My solution now is that I made a small addon which contains a Heli H and wrote a small config which makes the H to a FARP where I can rearm/refuel my choppers.
Title: Re:Rearm/Refuel when inside a trigger
Post by: Dane on 02 Aug 2005, 10:49:59
Quote
Yes, write in trigger cond field: getpos namechopper select 2 <= 0.5

Code: [Select]
that trigger will go off no matter where the chopper is, as long as it is less the half a meter above the ground
oops. Sorry, it was getting late last night when i posted that ::)
Title: Re:Rearm/Refuel when inside a trigger
Post by: Triggerhappy on 04 Aug 2005, 03:48:21
Noticed that issue now as I've tested the mission once more. The other problem I encountered is that I use different choppers with different (non BIS weapons).

My solution now is that I made a small addon which contains a Heli H and wrote a small config which makes the H to a FARP where I can rearm/refuel my choppers.

i don't quite understand how modded choppers would be a problem...
just check the readme for mag names or open up the config (if you know what to look for) and find it in there thats the only problem i could imagine you having
Title: Re: Rearm/Refuel when inside a trigger
Post by: Gen.Iceman on 03 Aug 2008, 13:57:19
Quote
Yes, write in trigger cond field: getpos namechopper select 2 <= 0.5
And in activation field: chopper setFuel 1;chopper setDammage 0; removeAllWeapons chopper;chopper addMagazine "magName";chopper addWeapon "weapName".

is there a way to have a vehicletype rearm/repair/refuel instead of a "named" vehicle...this would make it a more dynamic farp I think..as it could rearm all airtype vehicles without having to name them all..and also wouldnt the farp still work when the vehicles respawn mabey?? unlike the way the above code is setup? only for one vehicle..


Regards,
   Iceman