OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: sharkyjoe on 22 Feb 2005, 02:51:10

Title: Turn Off M2 Machine Gun Light??
Post by: sharkyjoe on 22 Feb 2005, 02:51:10
Just wondering how to Turn off the  East M2 machine gun's light?  Then when enemy is spotted turn back on?
Title: Re:Turn Off M2 Machine Gun Light??
Post by: macguba on 22 Feb 2005, 02:58:41
There is something very strange about this forum.    It is that when a question comes up, it often comes up again a few days later.     This is particularly true if it is a perennial question, like this one.

Being in a generous mood, I have looked up the thread.    It is here. (http://www.ofpec.com/forum/index.php?topic=21997.0)
Title: Re:Turn Off M2 Machine Gun Light??
Post by: Dubieman on 22 Feb 2005, 03:00:01
Oiiii, not this can of worms again... ::) ;D

http://www.ofpec.com/forum/index.php?topic=21796.0

And there are prolly a few more, its usually not easy to turn those lights off.... :P ;D

Edit: ooo Macca with the fast typing hands...
I do not like the search function, it is not very good when you're actually looking for something... :P :D ::)

Title: Re:Turn Off M2 Machine Gun Light??
Post by: sharkyjoe on 22 Feb 2005, 03:43:40
Sorry guys looked in Tutes and also the OFP Editing FAQ.  :-[
But i  used the moveingunner route in a trigger activation.
However, it is a little silly looking the guy just POPS into the gun placement.
Any ideas to make it look smoothe?? Like walk or run to M2 and get in.
this is to help anybody that needs a quick fix
East soilder name : Gnr2
Machine Gun 2 : MG2
Trigger Activation: West (Use East its easier to watch Gnr2 to move into it)
On Activation : Gnr2 moveingunner MG2
Title: Re:Turn Off M2 Machine Gun Light??
Post by: Dubieman on 22 Feb 2005, 04:00:49
Use a script like:

#start
Gnr2 domove (getpos MG2)
~10
#check
Gnr2 distance MG2 < 5 : goto "getin"
goto "start"

#getin
Gnr2 moveingunner MG2
exit

to make it smooth. (soz if my sentence is cut/paste... :P :)) Sytax may not work but its roughly what you might want. Can't do a "correct" errorproof script cause I'm doing something else sorta right now. :P ;)
Title: Re:Turn Off M2 Machine Gun Light??
Post by: sharkyjoe on 22 Feb 2005, 04:50:33
Thanks for the Help Guys.  :)
I used bits and pieces and put together this:
Pretty close to above but use assginasguuner and ordergetin TRUE

East Soldier-- name: Gnr2
Empty East M2-- name:MG2

Trigger: West
East Detect West
On Activation: [Gnr2] ordergetin True ; Gnr2 assignasgunner MG2

This Looks more Realistic, guys standing or sitting around a machine gun inplacement. Once the action starts My guy hits the ground, crawls up to the gun, gets in, Then the "LIGHT" comes on.
This Mystery is Solved!!
Thanks Again ;D