Shield hit callin

Shield hit callin

Requests for features in the spring code.

Moderator: Moderators

Post Reply
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Shield hit callin

Post by Google_Frog »

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.
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: Shield hit callin

Post by TheFatController »

+1

Also - related topic, still relevant..
http://springrts.com/phpbb/viewtopic.php?f=21&t=19657
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Shield hit callin

Post by Argh »

+1, it would be cheaper than constantly checking the state of the Shields, for area shields.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Shield hit callin

Post by zwzsg »

Google_Frog wrote:ShieldID, AttackerID, damage, collision position.
You forgot the most important one, weaponID.
User avatar
thesleepless
Posts: 417
Joined: 24 Oct 2007, 04:49

Re: Shield hit callin

Post by thesleepless »

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 ?
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Shield hit callin

Post by zwzsg »

I've not seen any Lua commands affecting projectiles, so no, you could not apply impulse to the projectile via Lua.
User avatar
thesleepless
Posts: 417
Joined: 24 Oct 2007, 04:49

Re: Shield hit callin

Post by thesleepless »

not with that attitude!

could make some lua projectile functions
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Shield hit callin

Post by Kloot »

zwzsg wrote:I've not seen any Lua commands affecting projectiles
Use your eyes better:

http://springrts.com/wiki/LuaCallinReturn#Projectiles
http://springrts.com/wiki/Lua_SyncedCtrl#Projectiles

(There are more than these.)
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Shield hit callin

Post by zwzsg »

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
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Shield hit callin

Post by Licho »

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.
Post Reply

Return to “Feature Requests”