Ok... so... uh...
We have two synced callouts, designed to take projectileIDs. Problem is, I don't see any callouts or references to them anywhere else in Lua. Maybe I'm just overlooking something, but I searched everywhere, and I'm drawing a blank here. Nobody's using these callouts, that I know of.
So... how do we get projectileIDs in Lua? Or are those functions not useful right now, because we don't have that data available? I searched through every mod / game and through Spring's source- there's a reference to a GetWatchWeapon (although it just returns a boolean, so I guess that's an explosion check only, and nobody uses that, either), and there's stuff that indicates that weaponIDs become the property of the AllyTeam whose Unit initiated an attack... so I'm pretty confused- is there anywhere in the engine that either COB or Lua can get a projectileID, or cause that ID to be returned (i.e., in Shot(), etc.)?
Just curious.
There's hardly anything useful that I can do with this right now, and for projectileIDs to be worth anything, they need to be able to be related back to the weaponID anyhow.
But at that point, all sorts of very cool things are possible. And even cooler things are possible, if I could get Piece names from a weaponID's model reference.
ProjectileIDs
Moderator: Moderators
Re: ProjectileIDs
Please. Read. The. ChangeLog.:
Added multiple new callins:
...
- ProjectileCreated(projectileID, projectileOwnerID) (arg #2 is -1 if no owner)
- ProjectileDestroyed(projectileID)
...
Re: ProjectileIDs
Well, at least it's documented somewhere... seriously, I looked everywhere else...
Callins:
ProjectileCreated(projectileID, projectileOwnerID) (arg #2 is -1 if no owner)
ProjectileDestroyed(projectileID)
Callouts:
Spring.GetProjectilePosition(projectileID) -> px, py, pz
Spring.GetProjectileVelocity(projectileID) -> vx, vy, vz
Spring.SetProjectilePosition(projectileID, px, py, pz) -> nil
Spring.SetProjectileVelocity(projectileID, vx, vy, vz) -> nil
Spring.SetProjectileDetonate(projectileID) -> nil
Callins:
ProjectileCreated(projectileID, projectileOwnerID) (arg #2 is -1 if no owner)
ProjectileDestroyed(projectileID)
Callouts:
Spring.GetProjectilePosition(projectileID) -> px, py, pz
Spring.GetProjectileVelocity(projectileID) -> vx, vy, vz
Spring.SetProjectilePosition(projectileID, px, py, pz) -> nil
Spring.SetProjectileVelocity(projectileID, vx, vy, vz) -> nil
Spring.SetProjectileDetonate(projectileID) -> nil