ID:176437
![]() Jan 13 2003, 11:52 am
|
|
....after getting shot. i have the shooting verb all set up, i just need to know how to get the mob to disappear when the "bullet" comes in contact with him. this should go for player controlled character as well as NPCs. thanks.
|
try changing M.Die() with M.del
Its simple and effective, and it doesnt seem you want much complication with procs. |
still getting the same kind of errors.. =( maybe i can run a test game so you can see what i'm trying to do?
|
M.die() is the proc belonging to all mobs that dictates how they die. You need to write one yourself.
|
mob/proc/die()the proc I hope that should help... |
yeah....i tried making the die() proc, but it won't work. i'm sorry i just don't know how to do it. i looked at the reference and guide and stuff and still nothing. oh, and making your text really big to make me look stupid isn't really cool...
|
Garthor doesn't need to make you look stupid. You're doing a fine job of that already.
I already gave you one example of a die() proc in [link] |
ok sorry...it still won't work though. here's what i have:
obj bullet Bump(mob/M) if(ismob(M)) die() icon = 'projectile.dmi' icon_state = "bullet" New(mob/owner) ..() walk(src,owner.dir) sleep(10) del src mob/proc/die(mob/killer) if (killer==src) world << "[src] committed suicide" else world << "[killer] kills [src]" del src |
EnjoiStaticX wrote:
ok sorry...it still won't work though. here's what i have: That's supposed to be M.die(), and as I showed you yesterday that should really be M.die(owner). Why are you using (a form of) my die() proc, but not any of the other changes you needed to make? New(mob/owner) This is indented too far, which is why you're getting those errors. And it's still wrong. I showed you yesterday how to do the New() proc correctly. Lummox JR |
Lummox JR wrote:
That's supposed to be M.die(), and as I showed you yesterday that should really be M.die(owner). Why are you using (a form of) my die() proc, but not any of the other changes you needed to make? That's mine, actually. :-) I _did_ tell him to supply the killer argument though. Copy 'n' paste syndrome, methinks. |
Crispy wrote:
That's mine, actually. :-) I _did_ tell him to supply the killer argument though. Copy 'n' paste syndrome, methinks. Ah. I noticed the interior wasn't quite mine but the killer arg was one I put in. I could tell that what he's been doing (including the removal of M from M.die() at one point) has been making partial changes based on what people tell them, whether the advice is good or not, and then not trying to tie it all together or even undo the bigger blunders. Lummox JR |
if(ismob(M))
M.die()