#1
mob/verb/rock()
var/obj/o = 'rocks.dmi'
new o(usr.loc)
sleep(1)
o.pixel_y += 2
#2
mob/verb/rock()
var/obj/o = 'rocks.dmi'
new o(usr.loc)
while(o)
sleep(1); o.pixel_y+=2
Those don't work. I get runtime errors.
RUNTIME ERROR FOR #1:
runtime error: Cannot create objects of type null.
proc name: rock (/mob/verb/rock)
source file: Verbs.dm,130
usr: \[Designer] SSJ4_Gohan_Majin (/mob/characters/Male_White)
src: \[Designer] SSJ4_Gohan_Majin (/mob/characters/Male_White)
call stack:
\[Designer] SSJ4_Gohan_Majin (/mob/characters/Male_White): rock()
RUNTIME ERROR FOR #2: SAME ERROR AS #1
Please help if you can, thanks!
--Dan
Try something like this:
There are a few problems with this snippet, but it's a start. You may not even see the rock at all, depending on how high you hover it, and how big your mob's icon is. The rock will be on a lower layer than the mob, so it may be behind it. Set the objects layer var to MOB_LAYER+1 to fix this temporarily.
You would also need to check to be sure Height is a valid
value. You wouldn't want a negative value to get passed, etc.