hello all... im trying to figure out how to make a certain mob drop a certain item after death like world of warcraft and all that... you kill a bird you want a feather.. soo.. can some one help me plz i tried to turn the deathcheck sytem around and couldt figure it out so some help plz
ID:157716
Jan 14 2010, 9:38 am
|
|
Store the type of item you want the monster to drop in a var in the monster. Have your death proc create that item in the monsters location when the monster dies.
|
In response to Warlord Fred
|
|
sorry dont under stand
tryed ex: mob bird icon = 'bird.dmi' health = 25 ?? mob bird icon= 'bird.dmi' health =25 var/????? |
In response to Kawasakitommy
|
|
If you havn't you should read the guide I did and it helped me alot
|
In response to Kawasakitommy
|
|
You can find many applicable code examples using the forum search. =)
|
This should give you an idea. When it comes to specific objects, override their procs. And like everyone else said use the forum database (that's exactly what I did to answer you).
gold |
In response to Hulio-G
|
|
Hulio-G wrote:
This should give you an idea. When it comes to specific objects, override their procs. And like everyone else said use the forum database (that's exactly what I did to answer you). > gold In this case, New() and Del() aren't part of /mob/bird. Also, since the object is completely deleted after Del() is called, moving it to death_zone is pointless. |
In response to Immibis
|
|
Immibis wrote:
Also, since the object is completely deleted after Del() is called, moving it to death_zone is pointless. The object isn't being deleted at all, since he's never calling the default function that does the actual deletion with ..(). Which means, in this specific case, that no mobs could possibly be deleted, ever. |
In response to Kaioken
|
|
Kaioken wrote:
Immibis wrote: @New() & Del() Gah, didn't copy indention's correctly. @del & loc Good call. I assume he could either deal with death by either using del, or just relocating. (I heard deleting objects is a pretty intensive process, so I'd choose the latter). |
In response to Hulio-G
|
|
well i got it to work for obj by
mob hawlabird icon = 'enemy.dmi' icon_state = "hawlabird" health = 25 contents = newlist(/obj/feathers,/obj/gold) mob/proc/DeathCheck() if(src.health <= 0) if(src.client == null) src.loc.contents += src.contents usr.exp +=rand(7,16) usr.LevelUp() del(src) else but when i put gold in there it doesnt give me my amount such as rand(6,12) also i was wondering how to make certain level monsters give certain amount of gold.. the higher the level the more gold any idea's and i dont under stand half of the guide sooo ....................... |
Why don't you actually make an effort to help yourself first? Use the forum search, this topic has been covered many times already, like many others.