Set Submarine Depth

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
butch4343
Posts: 327
Joined: Thu Mar 26, 2015 2:09 pm

Set Submarine Depth

Post by butch4343 »

Folks,

I come to you seeking your help, I am looking to set up a script where a submarine will randomly change its depth every so often, ie after 1 hr the submarine will either remain at the same depth or slip under the laye, or over or whatever. I understand the random math seed part ok, I just cant seem to find a script that will change the depth.

Would it be something like:

ScenEdit_SetUnit({side ="WP", name = "Victor", moveto = true, altitude = '-500 ft'})

Or could I use the phrase "under the layer" or "shallow"?

Any help would be gratefully recieved

Regards

Butch
User avatar
michaelm75au
Posts: 12464
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: Set Submarine Depth

Post by michaelm75au »

Try this -
ScenEdit_SetUnit({side ="WP", name = "Victor", moveto = true, depth= '500 ft'})
Michael
butch4343
Posts: 327
Joined: Thu Mar 26, 2015 2:09 pm

RE: Set Submarine Depth

Post by butch4343 »

ORIGINAL: michaelm75au

Try this -
ScenEdit_SetUnit({side ="WP", name = "Victor", moveto = true, depth= '500 ft'})

Michael

That worked great mate [:)]

As always am obliged to you [&o]

Regards

Butch
Post Reply

Return to “Lua Legion”