SetUnit({guid=XXXX speed=YYY})

All discussions & material related to Command's Lua interface

Moderators: angster, RoryAndersonCDT, michaelm75au, MOD_Command

Post Reply
User avatar
SeaQueen
Posts: 1436
Joined: Sat Apr 14, 2007 4:20 am
Location: Washington D.C.

SetUnit({guid=XXXX speed=YYY})

Post by SeaQueen »

I'm trying to sequence some aircraft and I'd like to change their speed. Theoretically that ought to be easy to do using the SetUnit() function, but for some reason it's not accepting the speed I'm telling them to have. Has anyone had any trouble with that?
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: SetUnit({guid=XXXX speed=YYY})

Post by michaelm75au »

You would need to use manualSpeed to set the speed as if in manual override mode. The 'speed' in the function is the unit current speed and would be changed as game runs.
ScenEdit_SetUnit({Side ='Germany', Name = 'S 172', ManualSpeed=8})
Michael
User avatar
SeaQueen
Posts: 1436
Joined: Sat Apr 14, 2007 4:20 am
Location: Washington D.C.

RE: SetUnit({guid=XXXX speed=YYY})

Post by SeaQueen »

Doh!
Post Reply

Return to “Lua Legion”