Shield hit callin
Moderator: Moderators
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Shield hit callin
CA needs to detect when shields are hit by projectiles if the shield behaviour is going to be improved. Params would at least need to be ShieldID, AttackerID, damage, collision position. The callin would need to be called even if a weapon has more damage than shield charge (ie it would pass through the shield). The callin should return whether the projectile should be destroyed or not.
- TheFatController
- Balanced Annihilation Developer
- Posts: 1177
- Joined: 10 Dec 2006, 18:46
Re: Shield hit callin
+1, it would be cheaper than constantly checking the state of the Shields, for area shields.
Re: Shield hit callin
You forgot the most important one, weaponID.Google_Frog wrote:ShieldID, AttackerID, damage, collision position.
- thesleepless
- Posts: 417
- Joined: 24 Oct 2007, 04:49
Re: Shield hit callin
wouldn't it be better if it gave you the projectile object as well? then you could choose to do actions on that such as destroy, apply impulse, or modify it in other ways ?
Re: Shield hit callin
I've not seen any Lua commands affecting projectiles, so no, you could not apply impulse to the projectile via Lua.
- thesleepless
- Posts: 417
- Joined: 24 Oct 2007, 04:49
Re: Shield hit callin
not with that attitude!
could make some lua projectile functions
could make some lua projectile functions
Re: Shield hit callin
Use your eyes better:zwzsg wrote:I've not seen any Lua commands affecting projectiles
http://springrts.com/wiki/LuaCallinReturn#Projectiles
http://springrts.com/wiki/Lua_SyncedCtrl#Projectiles
(There are more than these.)
Re: Shield hit callin
I stand corrected.
0.77b1, 0.77b2 changelog wrote: - new projectile call-outs:
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
Re: Shield hit callin
Its usefull not just for gameplay but also for effects - we could spawn some nice ripples on shield surface or make completely customized shield visualisation.