Jump to content
jamnj88

Secondary light control

Recommended Posts

I am working on a private American airport mod with a couple friends.  I am placing a single flashing yellow light on top of all emergency vehicles for use when the emergency strobes are not activated. I am trying to get some help figuring out how to make a button to activate just that light.

Edited by randomperson139
Removed completely unnecessary sentence
Link to comment
Share on other sites

I've removed the completely unnecessary sentence from your post. You're more than aware that all you'll accomplish with that is start an argument.

 

What you're after can be done by editing the standard blue light script. Set your new lights as one of the traffic light ones, and then edit the script so that it activates those lights when pressed.

Link to comment
Share on other sites

Well, I'll share my method of achieving secondary lights:

 

A number of my vehicles have a takedown/floodlight/spotlight that is separate from all other lights. I achieved this by assigning it to the TLR_GREEN light type. I then go into the script and specify the prototypes that have this "custom" light, and then set them to activate the TLR_GREEN light in script, and then the TLR_NONE type to turn it off.

if(StrCompare(v.GetPrototypeFileName(), PROTO_ENGINE01) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_ENGINE02) == 0 ||StrCompare(v.GetPrototypeFileName(), PROTO_ENGINE03) == 0 ||StrCompare(v.GetPrototypeFileName(), PROTO_USFS_ENGINE) == 0)	v.EnableTrafficLight(TLT_GREEN);else        v.EnableSpecialLights(true);

Here's an excerpt from the code I've set up. Thats to enable the light. You would need to do the opposite of that to disable the light via command.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...