tn_prvteye Posted August 11, 2017 Posted August 11, 2017 I can't code...like, at all. But what I can do is take snippets of other people's stuff and mash them together to do things I need. I don't release these franken-scripts, and only use them for my own off-line missions. I hope this is acceptable, and won't get me in trouble. Anyway, I'm having an issue. I'm trying to run a function at mission start that was originally called from the F10 Radio menu. Is this possible?
shagrat Posted August 11, 2017 Posted August 11, 2017 (edited) First, usually nobody here has a problem with using snippets. Credit the original creators on top of the script and if possible inform them in advance. Second, if it is a function run from the F10 radio is it part of a run script file or a run script (text is in the editor) depending on that you want to call the function from a trigger, or you need to run the script file and call the function at the end. A typical function call would include the parameters and look like this. Function_name ( parameter1, parameter2, parameterN) Important in a script file is to have the function before the function call. Hope this helps. EDIT oh, and there is no such thing as a dumb question.... Edited August 11, 2017 by shagrat 1 Shagrat - Flying Sims since 1984 - Win 11 | Ryzen 9 7900X3D | 64GB | GeForce RTX 4090 - Asus VG34VQL1B | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore)
tn_prvteye Posted August 11, 2017 Author Posted August 11, 2017 Ah function call AFTER the function. Makes sense.
tn_prvteye Posted August 11, 2017 Author Posted August 11, 2017 Is there a parameter that essentially means "On mission start"? I've looked around Hoggit, but can't find what I'm looking for. This is a 'Do Script File', BTW.
shagrat Posted August 11, 2017 Posted August 11, 2017 Is there a parameter that essentially means "On mission start"? I've looked around Hoggit, but can't find what I'm looking for. This is a 'Do Script File', BTW. There is a trigger condition "On Mission start" that can be used with the "Do script file". Shagrat - Flying Sims since 1984 - Win 11 | Ryzen 9 7900X3D | 64GB | GeForce RTX 4090 - Asus VG34VQL1B | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore)
shagrat Posted August 11, 2017 Posted August 11, 2017 If you have to load something like MIST or Moose framework for the script, use a normal "Once" Trigger and create a "time more" condition set to 5-6 seconds to give the sim time to load the framework script first. Shagrat - Flying Sims since 1984 - Win 11 | Ryzen 9 7900X3D | 64GB | GeForce RTX 4090 - Asus VG34VQL1B | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore)
Recommended Posts