OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: trooper543 on 27 Jan 2009, 00:22:45

Title: Buoy Script (Solved)
Post by: trooper543 on 27 Jan 2009, 00:22:45
Hi there again

Sorry to trouble you guys again,  I have tried a search and have come up with nothing

What it is that i am trying to do is change the lights on the BIS Bouy Objects as i would very much like to have one flashing Red and One Flashing Green to indicate Port & Starboard

If anyone can assist then that would be most appreciated.

Many thanks in advance

cheers



Title: Re: Buoy Script
Post by: Mandoble on 27 Jan 2009, 13:22:10
Do you mean to modify the object (the addon)?
Title: Re: Buoy Script
Post by: Planck on 27 Jan 2009, 14:36:40
I don't think adding a green or red light is possible with scripting, only way I can think of is by config and/or making a separate addon.


Planck
Title: Re: Buoy Script
Post by: laggy on 27 Jan 2009, 16:54:21
You could try createVehicle #lightpoint
See wiki or download my mission 1-6 Retrievers to see how it works.
#lightpoint don't seem to be a global "vehicle" in MP which means that you have to run the script on all computers.

Good luck,

Laggy

Mission link:

http://www.ofpec.com/forum/index.php?topic=31063.0
Title: Re: Buoy Script
Post by: Planck on 27 Jan 2009, 17:39:31
Nice, it actually makes light, however, I can't see this 'special class' written in any config anywhere in the game, so it must be an engine coded thing.

However the light is not a point source of light as you would expect for a blinking positional light, it is more of a diffuse globe of light several meters wide
And of course it doesn't blink.  :P


Planck
Title: Re: Buoy Script
Post by: laggy on 27 Jan 2009, 19:50:14
EDIT: Increased lightstrength. Mission updated.


Hi,

Made this quick solution.
Example mission included.
Can't turn off original bouy light, but maybe you think this works well enough.

Laggy
Title: Re: Buoy Script
Post by: Worldeater on 27 Jan 2009, 20:11:17
Can anyone confirm that using switchLight (http://www.ofpec.com/COMREF/index.php?action=details&id=362) on buoys crashes ArmA?
Title: Re: Bouy Script
Post by: laggy on 27 Jan 2009, 20:24:52
Hi,

I find that starting ArmA crashes ArmA  ;) Sorry couldn't help it.
But yes ... this switchlight "OFF" on a bouy made it crash instantly.

Laggy
Title: Re: Buoy Script
Post by: Planck on 27 Jan 2009, 22:06:56
switchlight crash ArmA? ....

Indeed it does, in fact I think it is only meant for streetlights and even then .wrp embedded ones.

The word is Buoy btw    :P


Planck
Title: Re: Buoy Script
Post by: Worldeater on 27 Jan 2009, 22:20:58
Here's a small script that adds "blinkenlights" to a buoy. ;)

This (http://i39.tinypic.com/33e4gux.jpg) is how it looks like in-game.
Title: Re: Buoy Script (Solved)
Post by: trooper543 on 27 Jan 2009, 23:44:30
Thank YOu very Much Gents for all the Help

Much Appreciated

Thanks

Title: Re: Buoy Script (Solved)
Post by: Rommel92 on 28 Jan 2009, 14:32:00
http://community.bistudio.com/wiki/lightAttachObject

Example code provided on that page:
Quote
_light = "#lightpoint" createVehicleLocal pos;

_light setLightBrightness 1.0;

_light setLightAmbient[0.0, 1.0, 0.0];

_light setLightColor[0.0, 1.0, 0.0];

_light lightAttachObject [_object, [0,0,0]]

This may have been solved, but I didn't see a in-thread code solution other then the uploaded script, and thought may aswell post this.