This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
led_examples [2021/11/28 20:13] – [Using Triggers] hneg | led_examples [2022/03/05 13:15] (current) – hneg | ||
---|---|---|---|
Line 112: | Line 112: | ||
Next, a bit more complex trigger controlled situation. | Next, a bit more complex trigger controlled situation. | ||
- | If you own for example the Laws of War DLC it comes with an ambulance that has the emergency lights on it. | + | If you own for example the **//Laws of War DLC//** it comes with an ambulance that has the emergency lights on it. |
Well, they look absolutely ridiculous compared to the real thing because in the dark you can see those things light up blocks away. Just Google some emergency vehicle images/ | Well, they look absolutely ridiculous compared to the real thing because in the dark you can see those things light up blocks away. Just Google some emergency vehicle images/ | ||
{{: | {{: | ||
Line 118: | Line 118: | ||
So, let’s put a couple of light emitters and triggers to emulate what they should kinda look like. I say " | So, let’s put a couple of light emitters and triggers to emulate what they should kinda look like. I say " | ||
Start a new scenario, put down some car, doesn’t have to be the previously mentioned ambulance, this is just an example. | Start a new scenario, put down some car, doesn’t have to be the previously mentioned ambulance, this is just an example. | ||
+ | {{: | ||
+ | |||
+ | Place down a light emitter, set the class **// | ||
+ | Fine-tune the emitter position so that it lights up the outside roof instead of the insides of the vehicle. | ||
+ | Place down another light emitter with class **// | ||
+ | |||
+ | Place five 0x0 triggers. | ||
+ | One next to each emitter, name the two to //blue// and //red// according to the color of the emitter. In the **// | ||
+ | < | ||
+ | and set it // | ||
+ | In the **// | ||
+ | < | ||
+ | and set it // | ||
+ | |||
+ | Then name one trigger to //start// (just to keep things easier to follow), in it’s **// | ||
+ | < | ||
+ | In it’s **//On Activation// | ||
+ | < | ||
+ | |||
+ | Then name the next trigger to // | ||
+ | Set it // | ||
+ | < | ||
+ | In it’s **//On Activation// | ||
+ | < | ||
+ | and in it’s **//On Deactivation// | ||
+ | < | ||
+ | Set the three **//Timer Values//** (min – mid - max) to **// | ||
+ | |||
+ | Name the last trigger to // | ||
+ | < | ||
+ | In its **//On Activation// | ||
+ | < | ||
+ | and in it’s **//On Deactivation// | ||
+ | < | ||
+ | Set the three **//Timer Values//** (min – mid - max) to 0.05. | ||
+ | |||
+ | Place down a player entity to observe and **//Play Scenario// | ||
+ | You should see the lights blinking (badly) on the vehicle roof, looking more like the real thing than the vanilla blinking textures: | ||
{{: | {{: | ||
- | Place down a light emitter, set the class Chemlight_red for it, change the intensity to 40000 (add one 0 to it) and the Attenuation start to 2. Select the global attach mode and move the emitter to the roof of the vehicle (or drag and SHIFT + ALT + A). You can fine-tune the attach position either by inputting data into the position field or with the translation widget. Fine-tune the emitter position so that it lights up the outside roof instead of the insides of the vehicle. | + | Of course setting **//Use Flare// |
- | Place down another light emitter with class Chemlight_blue, | + | |
- | Place five 0x0 triggers. One next to each emitter, name the two to blue and red according to the color of the emitter. In the condition field of the blue trigger | + | This example points out that the when synced with a trigger |
- | In the condition field of the red trigger write !(triggerActivated light_ctrl) && !(missionNamespace getVariable ["do_lightctrl", false]) | + | |
- | Then name one trigger to start (just to keep things easier to follow), in it’s condition field write true. In it’s on Activation field write do_mainctrl = true | + | Obviously making these lights look better |
+ | Such a script is included in an example at the end of this manual in the section [[todo|In-Game Functions –> Examples]], but it is quite crude and not really meant top be used, especially not tested in MP. | ||
- | Then name the next trigger to main_ctrl. Set it Repeatable and in it’s condition field write missionNamespace getVariable [" | ||
- | In it’s On Activation field write do_lightctrl = true and in it’s On Deactivation field do_lightctrl = false | ||
- | Set the three Timer Values (min – mid - max) to 0.1. | ||
- | Name the last trigger to light_ctrl. Set it Repeatable and in it’s condition field write missionNamespace getVariable [" | + | ===== Directional ===== |
- | In it’s On Activation field write do_mainctrl | + | <WRAP todo> |
- | Set the three Timer Values (min – mid - max) to 0.05. | + |