OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: abomb1508 on 06 Sep 2002, 12:31:26
-
i thought it a bit unusual to have the lights going in wartime at 4:30 am in a town taken over by the army, so i was wondering if there was a command line to turn them out? hopefully another to turn them back on again when the alarm was raised would be nice too.
Cheers,
A-Bomb
Developer for CoC www.thechainofcommand.com
-
If you've got Res then do the following:
Turn on object ids and find the lampost
Then in a trigger you can put :
(object IDNUMBER) switchlight "OFF"
You can use ON, OFF or AUTO in the last part.
M
-
Or if you're not using that fancy RES malarky, you can do it with some good ol' fashioned nearestObject'ing.
place gamelogic close to where the lamppost is, name gamelogic (GL1, in example).
Make trigger, and place following into activation field:
lamp= nearestObject [GL1, "StreetLamp"]; lamp switchLight "OFF"
should do the same as mikeb's suggestion. Although if you do it his way you're a wuss. Godarnit. (*needs OFP:R*)
Just repeat for all streetlamps. Good luck!
Wolfrug out.
-
well, i do have res (harhar) and although i do not like to be called a wuss, they always say the simplest solution is often the best, because there are then less places that things can go wrong.
so i'll take option 1. but how do i find which id is the lamppost?