ID:954126
 
Code:
    sagemode()
hengeback()
cloakoff()
if(swim||paralysed||dead||addled||buttonjam||resting||caught||seals||moving||dous||busy)return
dous=1
for(var/obj/jutsu/sage/Sage_Mode/M in src)M.overlays+='timer.dmi'
spawn(30)
for(var/obj/jutsu/sage/Sage_Mode/M in src)M.overlays-='timer.dmi'
dous=0
if(!sagemode)
new/obj/eyeac(loc)
client.byakrange=12
view(8)<<"<font color=#FFD700><b>[usr]: <FONT COLOR=#ffd700>S</FONT><FONT COLOR=#ffbf00>a</FONT><FONT COLOR=#ffa500>g</FONT><FONT COLOR=#ff8c00>e</FONT><FONT COLOR=#ffb300>.</FONT><FONT COLOR=#ffd900>.</FONT><FONT COLOR=#ffff00>.</FONT><FONT COLOR=#ffe300>M</FONT><FONT COLOR=#ffc600>O</FONT><FONT COLOR=#ffa900>D</FONT><FONT COLOR=#ff8c00>E</FONT><FONT COLOR=#ffa500>!</FONT><FONT COLOR=#ffbf00>!</FONT><FONT COLOR=#ffd700>!</FONT>"
if(agi>=70&&con>=70)
client.byakrange+=4
if(agi>=140&&con>=140)
client.byakrange+=4
byakucreate()
overlay()
sagemode=1
client.addsagemode()
client.byakuganupdate()
else
client.removebyakugan()
new/obj/eyeac(loc)
sagemode=0
overlay()
view(8)<<"<font color=#FFD700>[usr] deactivates his Sage Mode."


Problem description:
So heres the problem, when i activate sage in game the eye icon doesnt show up, but if i use another move say, sharingan, and then then deactivate sharingan, the sage mode icon shows up. Why doesnt it show up when activated?
I smell a rip...
umm okay, can you help me fix this problem?
What is that won't show up the timer delay overlay thing or the sage eye icon overlay?
the sage eye overlay
Okay and which line exactly is meant to add the overlay because I'm slightly confused with so many different(seemingly unnecessary) things going on.
In response to GreatFisher
GreatFisher wrote:
Okay and which line exactly is meant to add the overlay because I'm slightly confused with so many different(seemingly unnecessary) things going on.
Im pretty sure overlay()

    overlay()
if(henge||coffined==2||demon||istype(src,/mob/NPC/RandomNPC/roguedude))return
var/L[0]
var/h1i
var/h2i
var/pixel_yoff=0
switch(eye)
if("Black")h2i='blackeyes.dmi'
if("Brown")h2i='browneyes.dmi'
if("Hyuuga")h2i='hyuugaeyes.dmi'
if("Blue")h2i='blueeyes.dmi'
if("Green")h2i='greeneyes.dmi'
if(sharingan)h2i='sharingan.dmi'
if(sagemode)h2i='sageeyes.dmi'
Right well that doesn't actually add any overlays to the mob, Where are the overlays actually added? Also in the overlays proc why is h1i defined when it isn't even used(and L[0] and pixely_off)?
Dont worry about the h1i and L etc, they are used further down, but i dont understand "where are the overlays actually added?" thing
Well nowhere on the code you've showed me are any overlays to do with sage mode overlay actually applied to the mob.

Edit: Unless I have missed something here...
shouldnt the "overlay()" apply the icon?
In response to Zan9
overlay() does not. It's useless in the way you use it. At no point do you set icon=anything in overlay() nor do you set overlays+=anything in overlay(). In this proc, you're just setting h2i to a icon and doing nothing else with it.

        var/L[0]
var/h1i
var/h2i//this is the only var used in what you posted.
var/pixel_yoff=0

I would assume that there's more to this proc than you give.
To be perfectly honest we cannot really help you if you have absolutely no idea what the code does...
Lol, but that doesnt make any sense being something with almost the exact same code has absolutely no problem....
In response to Zan9
Ripping always yields bad results. More so when you don't understand what's happening with what you're ripping.

Simply adding something because it works on something else, other than being immoral, is wrong.[EDIT] Wrong in the sense that it wont turn out how you intend, because it wasn't made for your intentions. It was made to suit whomever actually made it.[END EDIT]
Wow i get that, and im talking about within the same source >.>

Also, whats wrong with learning how to do things from a completed source?
In response to Zan9
And how do you use it on the other part that works for you?
In response to NNAAAAHH
NNAAAAHH wrote:
And how do you use it on the other part that works for you?

I dont understand, its practically the same exact thing

        byakugan()
hengeback()
cloakoff()
if(swim||paralysed||dead||addled||buttonjam||resting||caught||seals||moving||dous||busy)return
dous=1
for(var/obj/jutsu/hyuuga/Byakugan/M in src)M.overlays+='timer.dmi'
spawn(30)
for(var/obj/jutsu/hyuuga/Byakugan/M in src)M.overlays-='timer.dmi'
dous=0
if(!byakugan)
new/obj/eyeac(loc)
byakugan++
client.byakrange=12
view(8)<<output("<font color=silver><b>[usr]: <FONT COLOR=#dcdcdc>B</FONT><FONT COLOR=#c6c6c6>y</FONT><FONT COLOR=#afafaf>a</FONT><FONT COLOR=#979797>k</FONT><FONT COLOR=#808080>u</FONT><FONT COLOR=#9e9ea0>g</FONT><FONT COLOR=#bdbdc0>a</FONT><FONT COLOR=#dbdbe0>n</FONT><FONT COLOR=#f8f8ff>!</FONT>","infobox")
if(agi>=70&&con>=70)
byakugan++
client.byakrange+=4
if(agi>=140&&con>=140)
byakugan++
client.byakrange+=4
byakucreate()
overlay()
client.addbyakugan()
client.byakuganupdate()
else
client.removebyakugan()
new/obj/eyeac(loc)
byakugan=0
overlay()
view(8)<<output("<font color=silver><b>[usr] deactivates his Byakugan.","infobox")
            client.addsagemode()
client.byakuganupdate()

                client.addbyakugan()
client.byakuganupdate()


I assume it has something to do with this. But, you still do nothing in overlay() that you've shown us.
In response to NNAAAAHH
NNAAAAHH wrote:
>             client.addsagemode()
> client.byakuganupdate()

>                 client.addbyakugan()
> client.byakuganupdate()

I assume it has something to do with this. But, you still do nothing in overlay() that you've shown us.


I doubt it has anything to do with that, being client.addsagemode() is just like client.addbyakugan(), honestly i get what you are getting at with the overlay thing but i dont understand why it works with byakugan with out overlay+=blah blah and why sage does not