OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: The-Architect on 03 Sep 2003, 18:50:51
-
The-Architect here,
I just put switchlight off command into a trigger and flashpoint crashed to desktop. It does it every time!
I have an M2 Machinegun east (empty), and a nva soldier (moveingunner m2),
and I've tried the command in both init fields and with a trigger.
Is there another way to have the light off?
:-[
-
i think the code is this
" x switchlight off" x = the soldiers name
or put the soldiers behaviour to stealth like this
x setbehaviour "stealth" x = the soldiers name
i think
-
You cant turn off the light on the M2.
Switchlight is for steetlamps. The correct usage is:
(object xxxxx) swithlamp "on/off/auto"
where xxxxx is the object id of the streetlamp.
Sucks, doesn't it :)
-
Yep, that's true. I tried it with a truck to turn the lights on, and if Flashpoint didn't crash on me, the truck became dammaged and useless. ::)
-
actualy dere was a script 2 make da MG turn its lights off ;D
use search function - nd if u dont find it ill do ;)
bout da switchlight - as deaddog said - 4 streetlamps only
LCD OUT
-
I tried the setbehaviour "stealth" command and still nothing. Check how I've set the guns up (seperated man from gun). Also I can't find the script anywhere either. :-[
-
check da next thread
http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=9854;start=0
answer is dere somwere ;)
LCD OUT
-
;Lightoff.sqs
#Loop
_this select 0 action ["Light Off"]
~0.01
goto "Loop"
Name your M2 say....M2 :P
Activate the script by typing M2 exec "Lightoff.sqs" in the init.sqs or [this] exec "Lightoff.sqs" in the M2's init field
-
;Lightoff.sqs
#Loop
_this select 0 action ["Light Off"]
~0.01
goto "Loop"
Name your M2 say....M2 :P
Activate the script by typing M2 exec "Lightoff.sqs" in the init.sqs or [this] exec "Lightoff.sqs" in the M2's init field
Hmmm... Why should you type different argument type for the same script...? It wouldn't work!
Cuz at the init.sqs you'd have an object - 'M2' - and at the M2's initField you'd have an array - '[this]'.
Therefore you should use the argument 'this' (the object) at the initField or keep the init.sqs syntax as it's shown and modify your script into the following:
;Lightoff.sqs
#Loop
_this action ["Light Off"]
~0.01
goto "Loop"