OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: RedHouse on 11 Feb 2005, 23:36:01
-
How the hell do you get an M2 to switch off its light at night? Tried all sorts of things to get it to work, the action command ["LIGHT OFF"] dont work, behaviour dont work.
Any ideas?
-
There have been several posts in the past asking about that and i pretty sure the answer has been we don't bloody know :P :(
i suggest that you use General Barron's man mg script from the Ed Depot and put an extra varible in the init line, then initialize that from another trigger with a WEST DETECTED BY EAST setting. :P
-
We do know. This one was solved .... maybe a year ago.
Can't remember what the answer was though. Suspect a fast looping script, although I'm not sure what command. Try the forum search function and be persistant.
-
Hmm, well, i've talked to several loons i know, and they said they've gotten mixed actions from that. Sometimes it works, for others the sodding things flicker like a strobe. :0
if you wanna try it, go ahead ;)
-
ok thx for the help ill have a look for the script
edit: I can't find this script, does anyone have a link?
-
Yeah mate, here:
http://www.ofpec.com/editors/browse.php?browseon=&browsewhat=2&category=2&subcategory=2_-1&numreturn=25&displayformat=0&ofpv=1&searchstring=General+Baron&searchwhat=4&searchlevel=0&searchopts= (http://www.ofpec.com/editors/browse.php?browseon=&browsewhat=2&category=2&subcategory=2_-1&numreturn=25&displayformat=0&ofpv=1&searchstring=General+Baron&searchwhat=4&searchlevel=0&searchopts=)
its the second from top i believe :)
-
no ofense, but what has that got to do with the light?
-
sorry, wrong link. I can't seem to find it anymore though.
Just make a script with something like:
_unit = _this select 0
#LightOff
_unit action ["Light Off",_unit]
goto "LightOff"
that kills your performance though :P If you try to add a time delay, then the lights strobe, and it doesn't work.
(Maccy, it was in the "The Time For Action Has Come" thread ::) )
-
Thank's Tyger, I knew I'd seen it somewhere.
It's in this thread, (http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=9376;view=all) Reply#19. Well done JDSH.
You should probably add a delay into the loop. Experiment till you find the longest delay that works, maybe ~0.03
-
so the key is getting the exact time for the delay, not to fast to create un needed lag or crashing OFP and not to slow to create a strobe. So the time should equal the time it takes the ai to switch there light back on.
Thx