AimWeaponX params (heading, pitch) as a LUA get function.

AimWeaponX params (heading, pitch) as a LUA get function.

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
Pendrokar
Posts: 658
Joined: 30 May 2007, 10:45

AimWeaponX params (heading, pitch) as a LUA get function.

Post by Pendrokar »

I really need this for Kustorion weaponsystem.
I tried making invisible units to target the units that some other unit needs so it would target right. [EDIT] Problem was that I have to wait for the call-in.
What this function would do is calculate the heading and pitch and return it.
Something like this:
Spring.CalculateAim(unitID, piecenum, WeaponDef, targetID|{x,y,z}) -> (heading, pitch)
--(unitID->unit from which piece to target, piecenum, WeaponDef(can be either beamweapon, hitscan, ballistic), targetID location or a x,y,z table)
Post Reply

Return to “Lua Scripts”