obj
Cannon2
name = "CannonWep"
icon = 'bars.dmi'
screen_loc = "4,1"
icon_state = "can"
layer = MOB_LAYER+100
Click()
if(usr.Level<10)
usr<<"Not Powerful Enough"
return
if(usr.DyingWill <= 50)
usr<<"You dont have enough DyingWill!"
return
if(usr.firing)
usr<<"Not now."
return
if(usr.froze)
usr<<"Your frozen"
return
if(usr.resting)
usr<<"Not while resting"
return
if(usr.meditating)
usr<<"Not while meditating"
return
if(usr.Frozen)
usr<<"Your frozen"
return
if(usr.captured)
usr<<"Your captured"
return
if(!usr.firing)
view()<<"<font color = red>[usr]: I will Defeat You with my Flame Weapon!"
usr<<'DyingWill.wma'
if(usr.skygg==1&&!usr.DWarmor)
usr.overlays += 'SkyCan.dmi'
usr.DWP = usr.DWP*1.1
usr.attack = usr.attack*1.1
usr.defence = usr.defence*1.1
usr.DWarmor =1
if(usr.FOR)
usr.attack=usr.attack*2
if(usr.HI)
usr.DWP=usr.DWP*3
return
if(usr.stgg==1&&!usr.DWarmor)
usr.overlays += 'StormCan.dmi'
usr.DWP = usr.DWP*1.05
usr.attack = usr.attack*1.05
usr.defence = usr.defence*1.05
usr.DWarmor =1
return
if(usr.sugg==1&&!usr.DWarmor)
usr.overlays += 'SunCan.dmi'
usr.DWP = usr.DWP*1.05
usr.attack = usr.attack*1.05
usr.defence = usr.defence*1.05
usr.DWarmor =1
return
if(usr.mgg==1&&!usr.DWarmor)
usr.overlays += 'MistCan.dmi'
usr.DWP = usr.DWP*1.05
usr.attack = usr.attack*1.05
usr.defence = usr.defence*1.05
usr.DWarmor =1
return
if(usr.rgg==1&&!usr.DWarmor)
usr.overlays += 'RainCan.dmi'
usr.DWP = usr.DWP*1.05
usr.attack = usr.attack*1.05
usr.defence = usr.defence*1.05
usr.DWarmor =1
return
if(usr.cgg==1&&!usr.DWarmor)
usr.overlays += 'CloudCan.dmi'
usr.DWP = usr.DWP*1.05
usr.attack = usr.attack*1.05
usr.defence = usr.defence*1.05
usr.DWarmor =1
return
if(usr.tgg==1&&!usr.DWarmor)
usr.overlays += 'ThunderCan.dmi'
usr.DWP = usr.DWP*1.05
usr.attack = usr.attack*1.05
usr.defence = usr.defence*1.05
usr.DWarmor =1
return
Problem description:
My Goal Is Simple, I Just Want to make a clickable button with this obj so where the player Click Once, It On, Activate. Click Again Its Off Remove Overlay.
I tried many things like.
else if(usr.DWarmor)
usr.overlays -= 'example.dmi'
but it never works..? Someone help me out.
What Am i doing wrong. Thanks in an Advance, For bringing me this far.
Edit: My Problem Is That The Overlay Never Goes Off once activated.
Even Trying many coding.
Try to keep your code a little cleaner. Instead of having that giant wall of text in Click(), call a proc. Split your code up to make it more manageable.