FUEL TRIGGER - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 09-14-2018, 11:39 PM   #1
Colmillo
Member
 
Colmillo's Avatar
 
Join Date: Sep 2016
Location: CHILE
Posts: 103
Question FUEL TRIGGER

Hi Pilots
I want to ask for your help. I have tried for several days to set up a mission that indicates when a plane (specifically the F1 has a certain amount of fuel. The idea is that a group does air refueling and when it has 10,000 for example, it notifies the rest of the airplanes that action.
I have tried with parameters, but I do not know which one to use from the list I found (clickabledata.lua), I also tried to use Arguments, but I can not get it.
Does anyone know the magic words?

Thank you very much in advance
Attached Files
File Type: lua clickabledata.lua (43.7 KB, 49 views)
__________________

MB Gigabite GA-Z170X-GAMING 7 1.0 INTEL CORE I7 6700K 4.00 NO COOLER, I love danger...
(Just Kidding H115i) ZOTAC GeForce GTX 1080Ti 11GB RAM 64 SSD 1T ThrustMaster HOTAS
Warthog Oculus Rift (thanks to KORIEL advice) Saitek Pro Rudder
Colmillo is offline   Reply With Quote
Old 09-15-2018, 12:17 AM   #3
Colmillo
Member
 
Colmillo's Avatar
 
Join Date: Sep 2016
Location: CHILE
Posts: 103
Default

Thank you for your advice, I will try learning how to use those .lua
If you have any real example, it will be very helfull
Thanks again
Colmillo is offline   Reply With Quote
Old 09-15-2018, 12:37 AM   #4
feefifofum
3rd Party Developer
 
feefifofum's Avatar
 
Join Date: Jan 2015
Location: USA
Posts: 2,778
Default

Max fuel for the Hornet is XXXXX -> desired message comes when fuel level is YYYYY

So divide YYYYY by XXXXX to determine the decimal value. Then you'd do something along these lines. Disclaimer: I haven't tested this and I don't do a whole lot of .lua work.

Type:
3 CONTINUOUS (Fuel check at tanker, NO EVENT)
Conditions:
UNIT INSIDE MOVING ZONE (Hornet, Tanker, QuarterMile)
Triggered Actions:
DO SCRIPT (
Code:
if
Unit.getByName('Hornet'):getFuel = 0.7
then
trigger.action.setUserFlag(1, 1)
)

This checks the fuel state of a unit named "Hornet" when it is within a quarter-mile sized moving zone you have previously defined using the "create trigger zone" button and setting a 1/4 mile radius.
When the unit hits 70% of its total internal fuel, flag 1 is set to true. You can then create another trigger that looks for flag one to be true and performs an action using the GUI or use the outText and outSound functions if you want to contain the entire series of events to one script.

If you really want to dig in you can also do the unit spacing checks via script.

Last edited by feefifofum; 09-15-2018 at 12:43 AM.
feefifofum is offline   Reply With Quote
Old 09-15-2018, 01:22 AM   #5
Colmillo
Member
 
Colmillo's Avatar
 
Join Date: Sep 2016
Location: CHILE
Posts: 103
Default

Excellent
I will try that, unfortunately in 5 more days, I am leaving home right now for work...
And thank you so much for your time helping me.
I ll tell you how it goes
Colmillo is offline   Reply With Quote
Old 09-15-2018, 05:18 AM   #6
BlacleyCole
Senior Member
 
BlacleyCole's Avatar
 
Join Date: Dec 2017
Location: New Mexico
Posts: 1,424
Default

If you want to do anywhere I think the continuous condition would work not sure if you need a.zone to activate then it works continuously and sets the flag when the fuel hits the appropriate amount
__________________
BlackeyCole 20years usaf
XP-11. Dcs 2.5OB
Acer predator laptop/ i7 7720, 2.4ghz, 32 gb ddr4 ram, 500gb ssd,1tb hdd,nvidia 1080 8gb vram


New FlightSim Blog at https://blackeysblog.wordpress.com. Go visit it and leave me feedback and or comments so I can make it better
BlacleyCole is offline   Reply With Quote
Old 09-15-2018, 05:28 AM   #7
feefifofum
3rd Party Developer
 
feefifofum's Avatar
 
Join Date: Jan 2015
Location: USA
Posts: 2,778
Default

Right, but then it would also fire when the aircraft initially depletes its fuel prior to initiating refueling, which wouldn't produce the desired effect of displaying a message while the aircraft is refueling.
feefifofum is offline   Reply With Quote
Old 09-17-2018, 10:18 AM   #8
Hardcard
Member
 
Hardcard's Avatar
 
Join Date: May 2013
Posts: 201
Default

@Colmillo

I'm afraid this would require a full script in order to work as intended.

I've written scripts that accomplish similar things, problem is that you'll need basic Lua knowledge to understand them.

Using scripts, I was able to determine the amount of external fuel tanks on, say, an F15C (based on fuel quantity), then use fuel quantity checks while refuelling, in order to receive different kinds of messages (air refuelling "success" or "failure", basically), which took the number of external fuel tanks "detected" into account.
Flags and/or scheduler stoppers can be used to prevent those messages from showing all the time, which is probably what you want.

Spanish is one of my native languages, so, if you want to, I can show you the basics of Lua, that way you can create your own scripts and overcome the limitations of the Mission Editor.

Mándame un privado y te comento.

Last edited by Hardcard; 09-17-2018 at 10:29 AM.
Hardcard is offline   Reply With Quote
Old 09-17-2018, 06:50 PM   #9
Hardcard
Member
 
Hardcard's Avatar
 
Join Date: May 2013
Posts: 201
Default

@ Colmillo

Parece que tienes los mensajes privados desactivados, puedes enviarlos, pero no recibirlos.
Cambia la configuración de tu cuenta (customize profile > Edit Options > Activa "Enable Private Messaging" y desactiva "Receive Private Messages only from Contacts and Moderators")

Last edited by Hardcard; 09-17-2018 at 06:53 PM.
Hardcard is offline   Reply With Quote
Old 09-17-2018, 08:09 PM   #10
Colmillo
Member
 
Colmillo's Avatar
 
Join Date: Sep 2016
Location: CHILE
Posts: 103
Default

Gracias, Estaba activado "Enable Private msg", pero no desactivado "Receive Private Messages only from Contacts and Moderators"
(Estoy saliendo de KLAX - SCEL, te contesto a mi arribo)
__________________

MB Gigabite GA-Z170X-GAMING 7 1.0 INTEL CORE I7 6700K 4.00 NO COOLER, I love danger...
(Just Kidding H115i) ZOTAC GeForce GTX 1080Ti 11GB RAM 64 SSD 1T ThrustMaster HOTAS
Warthog Oculus Rift (thanks to KORIEL advice) Saitek Pro Rudder

Last edited by Colmillo; 09-17-2018 at 08:12 PM.
Colmillo is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 07:47 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.