Code:
Problem description:
So yeah. I was just reading through Zilal's tutorial on Action/RPG games. I did everything it told me to do, and I learned alot. But than I got stuck on the gold part. IT compiles and everything, but it when I play the game and kill the bug. It won't drop Here's the code.
mob
bug icon = 'bug.dmi'
icon = 'person.dmi' var HP = 30 var Durability=1
Login() icon_state = gender ..()
proc DeathCheck() if (HP <= 0) world << "[src] dies!" del(src)
verb Attack(mob/D as mob in oview(1)) usr << "You attack [D]!" oview() << "[usr] attacks [D]!" var/damage = rand(1,10) world << "[damage] damage!" D.HP -= damage D.DeathCheck()
Say(msg as text) world << "[usr]: [msg]"
turf grass icon = 'grass.dmi'
world turf = /turf/grass
turf tree icon='tree.dmi' density=1
turf wall icon='wall.dmi' density=1 mob verb Intangible() density = 0 world << "[usr] is able to move through walls!"
mob verb Tangible() density= 1 world << "[usr] is not able to move through walls!"
mob/verb/Wink() set src in view() view() << "[usr] winks at [src]."
mob/bug/Wink() ..() usr << "[src] shouts, 'I'll have my revenge!'"
obj gold icon = 'gold.dmi' var amount Del() var/obj/gold/G = new(loc) G.amount = rand(1,100) ..()
<dm>
|