obj/magic
ThunderShield
name = "Thunder Shield On/Off."
Click()
if(!on)
var/obj/TS1 = new/obj/thundershield/one(locate(usr.x-1,usr.y+1,usr.z))
var/obj/TS2 = new/obj/thundershield/two(locate(usr.x,usr.y+1,usr.z))
var/obj/TS3 = new/obj/thundershield/three(locate(usr.x+1,usr.y+1,usr.z))
var/obj/TS4 = new/obj/thundershield/four(locate(usr.x-1,usr.y,usr.z))
var/obj/TS5 = new/obj/thundershield/five(usr.loc)
var/obj/TS6 = new/obj/thundershield/six(locate(usr.x+1,usr.y,usr.z))
var/obj/TS7 = new/obj/thundershield/seven(locate(usr.x-1,usr.y-1,usr.z))
var/obj/TS8 = new/obj/thundershield/eight(locate(usr.x,usr.y-1,usr.z))
var/obj/TS9 = new/obj/thundershield/nine(locate(usr.x+1,usr.y-1,usr.z))
usr << "<B>You put on your Thunder Shield."
on = 1
sleep(30)
del(TS1)
del(TS2)
del(TS3)
del(TS4)
del(TS5)
del(TS6)
del(TS7)
del(TS8)
del(TS9)
if(on)
del(TS1)
del(TS2)
del(TS3)
del(TS4)
del(TS5)
del(TS6)
del(TS7)
del(TS8)
del(TS9)
on = 0
usr << "<B>You turn off your Thunder Shield."
if(usr.logout == 1)
del(TS1)
del(TS2)
del(TS3)
del(TS4)
del(TS5)
del(TS6)
del(TS7)
del(TS8)
del(TS9)
usr.logout = 0
Mana Skills.dm:128:error:TS1:undefined var
Mana Skills.dm:129:error:TS2:undefined var
Mana Skills.dm:130:error:TS3:undefined var
Mana Skills.dm:131:error:TS4:undefined var
Mana Skills.dm:132:error:TS5:undefined var
Mana Skills.dm:133:error:TS6:undefined var
Mana Skills.dm:134:error:TS7:undefined var
Mana Skills.dm:135:error:TS8:undefined var
Mana Skills.dm:136:error:TS9:undefined var
Mana Skills.dm:140:error:TS1:undefined var
Mana Skills.dm:141:error:TS2:undefined var
Mana Skills.dm:142:error:TS3:undefined var
Mana Skills.dm:143:error:TS4:undefined var
Mana Skills.dm:144:error:TS5:undefined var
Mana Skills.dm:145:error:TS6:undefined var
Mana Skills.dm:146:error:TS7:undefined var
Mana Skills.dm:147:error:TS8:undefined var
Mana Skills.dm:148:error:TS9:undefined var
I know why this is, but is there a way to make an on/off trigger with an auto deleting system within a time period or when the player logs out?