Assuming you're talking about Lua, and that you have a variable named player that holds a player object, you can check the player's current shield by doing something with:
Code:
player.powers[pw_shield]
For example:
Code:
local shield = player.powers[pw_shield]
local thingToFire = MT_REDRING
if shield == SH_PITY then
print("You are using the Pity shield.")
thingToFire = MT_THROWNAUTOMATIC
elseif shield == SH_WHIRLWIND then
print("You are using the Whirlwind shield.")
thingToFire = MT_THROWNSCATTER
end
-- And so on...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.