Home   Help Search Login Register  

Author Topic: Buoy Script (Solved)  (Read 2387 times)

0 Members and 1 Guest are viewing this topic.

Offline trooper543

  • Members
  • *
Buoy Script (Solved)
« 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



« Last Edit: 28 Jan 2009, 02:05:28 by Planck »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Buoy Script
« Reply #1 on: 27 Jan 2009, 13:22:10 »
Do you mean to modify the object (the addon)?
« Last Edit: 28 Jan 2009, 02:05:42 by Planck »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Buoy Script
« Reply #2 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
« Last Edit: 28 Jan 2009, 02:05:54 by Planck »
I know a little about a lot, and a lot about a little.

Offline laggy

  • Members
  • *
  • "Behold a pale horse"
Re: Buoy Script
« Reply #3 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
« Last Edit: 28 Jan 2009, 02:06:08 by Planck »
And I looked and beheld a pale horse and his name that sat on him was Death and Hell followed with him.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Buoy Script
« Reply #4 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
« Last Edit: 28 Jan 2009, 02:06:21 by Planck »
I know a little about a lot, and a lot about a little.

Offline laggy

  • Members
  • *
  • "Behold a pale horse"
Re: Buoy Script
« Reply #5 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
« Last Edit: 28 Jan 2009, 02:06:32 by Planck »
And I looked and beheld a pale horse and his name that sat on him was Death and Hell followed with him.

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: Buoy Script
« Reply #6 on: 27 Jan 2009, 20:11:17 »
Can anyone confirm that using switchLight on buoys crashes ArmA?
« Last Edit: 28 Jan 2009, 02:06:44 by Planck »
try { return true; } finally { return false; }

Offline laggy

  • Members
  • *
  • "Behold a pale horse"
Re: Bouy Script
« Reply #7 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
And I looked and beheld a pale horse and his name that sat on him was Death and Hell followed with him.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Buoy Script
« Reply #8 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
« Last Edit: 28 Jan 2009, 02:06:55 by Planck »
I know a little about a lot, and a lot about a little.

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: Buoy Script
« Reply #9 on: 27 Jan 2009, 22:20:58 »
Here's a small script that adds "blinkenlights" to a buoy. ;)

This is how it looks like in-game.
« Last Edit: 28 Jan 2009, 02:07:05 by Planck »
try { return true; } finally { return false; }

Offline trooper543

  • Members
  • *
Re: Buoy Script (Solved)
« Reply #10 on: 27 Jan 2009, 23:44:30 »
Thank YOu very Much Gents for all the Help

Much Appreciated

Thanks

« Last Edit: 28 Jan 2009, 02:07:20 by Planck »

Offline Rommel92

  • Members
  • *
Re: Buoy Script (Solved)
« Reply #11 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.