Editing an obj's state in Developer Help
|
|
I'm working on a HUD for my zelda game, and so far it's up. but I'm trying to make it change bweapon's icon_state to "rusty", but i keep getting an undefined var error. What the problem?
Here the code where I define bweapon:
obj
hud
layer = MOB_LAYER + 1//appears above mobs
icon = 'hud.dmi'
declarations for other parts of my hud
bweapon
layer = MOB_LAYER + 2
dir = NORTH
icon = 'weapons.dmi'
icon_state = ""
New(client/C)
screen_loc = "10,13"
C.screen+=src
and ive tried using obj/hud/bweapon/icon_state = "rusty", but that doesnt work, I've also tried a MILLION variants of that. Whats wrong?
|