ID:158402
 
Okay, so, basically, the players at main menu have no icon, but are a /mob/Player, then when they create a character, it gives them the icon 'icons/Base1.dmi', and it works fine. But, for some reason, only hand-seal usage can change the iconstates, punch, kick, defense, and training don't change it.
http://www.byond.com/docs/ref/ - Go to icon_state.
In response to Megelic
I know how to program. I checked, and the names are the same. Can it not use capitals, or something?
In response to Asellia
It's case-sensitive, so if you wrote "BLaH", then "blah" won't work.
In response to Garthor
I checked, and made them both all lowercase to make sure, it doesn't change icon states.

verb
Train()
if(usr.training==0)
if(usr.trainingpoints<100)
usr.training = 1
usr.icon_state = "training"
usr.CanMove=0
while(usr.trainingpoints<100&&usr.training==1)
sleep(30)
var/exp = (usr.EXPN / 30) + (usr.Level * rand(1,30))
usr.EXP += exp
usr.trainingpoints++
LevelCheck(usr)
ExpSet(usr)
else
usr.icon_state = ""
usr.CanMove = 1
usr.training = 0
else
usr.training = 0
usr.CanMove = 1
usr.icon_state = ""


And the icon state in the icon file is "training" without the quotations
In response to Asellia
Just a suggestion, but wouldn't flick, be more useful in this situation?
In response to Asellia
Are both requirements for the first two if() chains true? (training being 0, and trainingpoints being less than 100)
In response to Megelic
It's not the if statements, because the experience bar fills up. Would flick work? It's an infinite animation. I need it to stop when the usr stops training, or training points reach 100?
In response to Asellia
Update! Is it possible for an icon file to go corrupt?

I made sure it's the -exact- name, and tried flick, but it blinks nothing. (an image of nothing) then reverts to normal?
In response to Asellia
Yeah, or, they can be a outdated version of byond.
In response to Megelic
I fixed it!

It was a really noobie mistake!

Basically, when assigning the icon originally, and the few other times it does (Icon, not the state)

it was usr.icon = 'base1.dmi'

and I changed it to usr.icon = 'Icons/base1.dmi'

since it's in Icons folder, and works great now! Thanks for helping all of you.