OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Pingo on 01 Feb 2005, 03:38:31

Title: units & light
Post by: Pingo on 01 Feb 2005, 03:38:31
Hi there..

Well.

If i have a unit "mg" and it's dark, the unit turns on his lights.. how can i get the unit to turn off the light.. have the same prob with uaz's.. ?!

Title: Re:units & light
Post by: JackDVS on 01 Feb 2005, 03:54:25
You can put his behavior on stealth
Title: Re:units & light
Post by: Pingo on 01 Feb 2005, 04:42:50
Yeah..

tryed that.. does'nt work here.. ?!

Title: Re:units & light
Post by: Mattheus on 01 Feb 2005, 09:39:44
Hi...

For a car or a vehicle, JackDVS is right. Setting behaviour on stealth works fine.

For a machinegun post. It's a bit different. I've used the command action "light off". The problem is that the machine gun automatically turns on its light just after switched it off.
So I don't know how to solve this problem.

Look at the test mission. I've made a stupid script wich, with a smart loop, turns off the ligth of the mg. It works, but I think there's a more easy way to do it. It's not a good solution, because a such loop take too much memory.

Ask to advanced scripters...
Title: Re:units & light
Post by: Pingo on 01 Feb 2005, 13:20:50
As you said JackDVS with the car it was right...

But it's the mg witch is the prob...  ;)

I'll try to look at the test mission..

Thx m8
Title: Re:units & light
Post by: GI-YO on 01 Feb 2005, 13:29:05
If you set the gun to COMBAT then the light will be off.

GI-YO
Title: Re:units & light
Post by: Pingo on 01 Feb 2005, 16:02:44
Well it's does'nt work.. ?!


Im getting a AI to moveingunner on the mg.. I've tryed this out..


this moveingunner mg1; this setbehaviour "stealth";

this moveingunner mg1; this setbehaviour "combat";

Title: Re:units & light
Post by: Grizzlie on 01 Feb 2005, 16:42:02
I have been fighting with it for some time.
And in the end i have finished with writting a small add-on - config only, where i have created new MG, based on M2, but with removed whole class Reflectors.
Now i have 2 types of MG - with and without lights :)
Title: Re:units & light
Post by: Mr.Peanut on 01 Feb 2005, 16:44:55
MG lights are a sharp stabbing bleeding pain in the arse.  If you are going for an element of surprise, your only choice is not to man the MG until players are within close range.
Title: Re:units & light
Post by: 456820 on 01 Feb 2005, 21:17:27
how about "mg lightoff" then make a loop so it will stay off but the loop must bee something with a small gap in
Title: Re:units & light
Post by: macguba on 02 Feb 2005, 19:05:34
Somebody solved this perennial tricky one some time ago ... I think it was a fast looping script but I'm not sure.     Use the forum search function and keep beating it over the head until you find it.