Kitty Rapist
The Trustworth Douche
Uh, i was doing some LUA tests when i found myself stuck in a big tiny problem:
Basically my script is supposed to give you the magnet shield (the one that attracts rings) to you while you are in the super form, and remove it from you when you turn back to normal.
Cool, the part where "it gives the shield to you" works completely fine, but no matter what i do, i can't remove it from the player once he returns to his regular form.
Here is the both scripts i made:
This is the first one that gives you the shield when you are super:
And this is the script that was supposed to remove it from you when you turn back to normal
Can someone tell me what in the living hell i'm doing wrong? Because i honestly have no idea.
Really sorry for bothering any of you with this silly issue i have.
EDIT: i think that might be of some help. the console gives me this exact message when i load up the wad:
Basically my script is supposed to give you the magnet shield (the one that attracts rings) to you while you are in the super form, and remove it from you when you turn back to normal.
Cool, the part where "it gives the shield to you" works completely fine, but no matter what i do, i can't remove it from the player once he returns to his regular form.
Here is the both scripts i made:
This is the first one that gives you the shield when you are super:
Code:
addHook("ThinkFrame", do
for player in players.iterate
if player.mo //if player exists (lolwot)
and player.powers[pw_super] //And you're in your super form
player.powers[pw_shield] = SH_ATTRACT //you will also have the magnet shield ability
end
end
end)
Code:
addHook("ThinkFrame", do
for player in players.iterate
if player.mo //if player exists (lolwot)
and player.powers[pw_shield] = SH_ATTRACT //and you currently have the Magnet Shield
and player.prevrings < 1 //and if your previous amount of rings are less than 1...
player.powers[pw_shield] = SH_NONE //you will have no shields what-so-ever
end
end
end)
Really sorry for bothering any of you with this silly issue i have.
EDIT: i think that might be of some help. the console gives me this exact message when i load up the wad:
WARNING: shield.wad|LUA_SHID:4: unexpected symbol near ' ='
Last edited: