obj/proc//Begining the proc...
Explosion()//Naming the Proc...
oview() << "<big> \red BOOM!"
view() << sound('explosio.wav')
for (var/turf/X in range(src,1))//If it is withing 1 tile of the "Explosion"...
X.overlays+= /obj/boom//Overlay the Explosion icon
spawn(5)//Wait a little bit
X.overlays.Cut()//Delete the explosion, not all things last forever :)
..()
for(var/obj/hideable/T in range(src,1))
var/oldicon = T.icon
T.icon = null
T.density = 0
T.verbs -= /obj/hideable/verb/Hide
sleep(rand(300,600))
T.icon = oldicon
T.density = 1
T.verbs += /obj/hideable/verb/Hide
..()
for(var/mob/smiley/M in range(src,1))
M.SetHealthIconState()
M << "<big> \red BOOM!"
M.damage(10,M,"explode")
..()
This is the code that I am using. I think it might be my code instead of a bug that I mentioned in ID:110588 .
It leaves a Barrel....just look at the link I gave ya, please ;)
-ST
First problem: You have the order of arguments wrong. That should be range(1,src), not the other way around.
Second problem: You didn't indent that line under spawn(), so you're spawning out nothing at all.
Third problem: Why are you calling ..() if you only just defined the proc? There's no previous proc to fall back on, and even if there was, you probably wouldn't want to call it 3 times.
Potential problem: Your hideable objects need some way of knowing they're alreayd hiding, and how long they'll be hiding. Otherwise a second stick of dynamite could foul the works.
Last problem: There's no "O" in "dynamite".
Lummox JR