ID:178940
 
Just wondering what are some of the ways to make like a land mine, and when a usr walks over it it blows up??/

Can ppl post code snippets of how to check for the mob/obj ???

I've got mine to work making he mine as a turf,and using Entered(). But I don't wanna do that, I want to keep it an object, and make the damage and del src call from the obj/mine itself. Not the mob either. Can anyone show a good way to do this? I can't find a proc that will give me a working solution yet..

LJR
LordJR wrote:
Just wondering what are some of the ways to make like a land mine, and when a usr walks over it it blows up??/

Can ppl post code snippets of how to check for the mob/obj ???

I've got mine to work making he mine as a turf,and using Entered(). But I don't wanna do that, I want to keep it an object, and make the damage and del src call from the obj/mine itself. Not the mob either. Can anyone show a good way to do this? I can't find a proc that will give me a working solution yet..

LJR

Make the Mine object dense and use mob/Bump() to check for the mine.
I use something like the following. Different objs can do different things when they are stepped on, yet it doen't hinder movement like the Bump() method would.

obj/triggered
proc
Trigger(A)
// A triggered (stepped on) src
// prototype to be overridden by specific objs

turf
Entered(A)
..() // do the default
for(var/obj/triggered/O in src.contents)
O.Trigger(A)

Then just override Trigger() for mines

obj/triggered/mine/Trigger(A)
// do your KABOOM here :)
A << sound('KABOOM.WAV')

You can get a great kaboom.wav here: http://shadowdarke.byond.com/KABOOM.WAV ;)
In response to Ebonshadow
Ebonshadow wrote:
LordJR wrote:

Make the Mine object dense and use mob/Bump() to check for the mine.

Yeah I tried this already.. but not really what I'm looking for...

LJR
In response to Shadowdarke
Shadowdarke wrote:
You can get a great kaboom.wav here: http://shadowdarke.byond.com/KABOOM.WAV ;)

Cute :P

Yeah this is what I had in mind and I was hoping you'd be one the ones to answer my post! :D

LJR
In response to Shadowdarke
SWEET MAN!! That helped alot.. got it all working now!! :D

LJR