ID:157716
 
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
Kawasakitommy wrote:
can some one help me plz i tried to turn the deathcheck
so some help plz

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.
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
parent_type = /obj
icon = 'gold.dmi'

mob
bird
icon = 'bird.dmi'
health = 25
New() //create bird, I hope you know have to use /new type() to access New()
loc = locate(where_ever)//move on map

Del() //when bird is killed, accessed with del()
new /gold(loc) //create gold. It's using old loc still.
loc = locate(death_zone)//override's old loc

Kill_Bird(var/mob/M as mob in world)
del(M) //calls Del()
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
> parent_type = /obj
> icon = 'gold.dmi'
>
> mob
> bird
> icon = 'bird.dmi'
> health = 25
> New() //create bird, I hope you know have to use /new type() to access New()
> loc = locate(where_ever)//move on map
>
> Del() //when bird is killed, accessed with del()
> new /gold(loc) //create gold. It's using old loc still.
> loc = locate(death_zone)//override's old loc
>
> Kill_Bird(var/mob/M as mob in world)
> del(M) //calls Del()
>


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:
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.

@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 .......................