ID:268242
 
I want to change an objects icon state while in air. I tried this:

obj/rock
icon='rock.dmi'
pixel_y=999999

mob/verb/test()
var/obj/o=/obj/rock
new o(usr.loc)
sleep(10)
o.icon_state="big"


But that doesn't work. Any help?
SSJ4_Gohan_Majin wrote:
I want to change an objects icon state while in air. I tried this:

> obj/rock
> icon='rock.dmi'
> pixel_y=999999
>
> mob/verb/test()
> var/obj/o=/obj/rock
> new o(usr.loc)
> sleep(10)
> o.icon_state="big"
>
>

But that doesn't work. Any help

try this

mob/verb/test()
var/obj/o='rock.dmi'
new o(usr.loc)
o.icon_state="big"
In response to Non-PC
Non-PC wrote:
SSJ4_Gohan_Majin wrote:
I want to change an objects icon state while in air. I tried this:

> > obj/rock
> > icon='rock.dmi'
> > pixel_y=999999
> >
> > mob/verb/test()
> > var/obj/o=/obj/rock
> > new o(usr.loc)
> > sleep(10)
> > o.icon_state="big"
> >
> >

But that doesn't work. Any help

try this

> mob/verb/test()
> var/obj/o='rock.dmi'
> new o(usr.loc)
> o.icon_state="big"
>


All you did was recode it.
I'm not sure what it is you're trying to accomplish here.
In response to Enigmaster2002
Enigmaster2002 wrote:
I'm not sure what it is you're trying to accomplish here.

When you press the verb test, the rock appears in air at it's small icon state. Then, wait 10 seconds, and the rock's icon state changes to a bigger size.
In response to SSJ4_Gohan_Majin
Well, first off, 10 ticks is only one second, not ten seconds.
obj
rock
icon = 'rock.dmi'
icon_state = "small"
mob
verb
Test()
var/obj/O = new/obj/rock(src.loc)
sleep(100)
O.icon_state = "big"