mob/Enemies/Thug
icon = 'thug_m1.dmi'
HP = 20
MAX_HP = 20
MP = 0
MAX_MP = 0
Min_Damage = 2
Max_Damage = 4
Strength = 2
Defense = 0
AC = 0
AGI = 1
DEX = 3
Gold = 0
EXP = 0
EXP_To_Next = 0
EXP_Give = 20
Gold_Give = 17
Drops = "obj/Potion"
mob/proc/Postdeath(mob/Enemies/M) //These statements can all be overwritten by a more specific type like say /mob/Enemies/Large_Dog.
//In all of the "Postthis" "Postthat" "Prethis" "Prethat" proc ro whatever, we are using M as the victim, and usr is the attacker.
//First, lets get rid of the amount of gold specified that they give:
if(M.Gold_Give > 0)
var/G = new /obj/Gold(M.loc) //This creates a new variable, that we can afterward, modify. It is very important that you know how to do this.
G:amount = M.Gold_Give //We use : instead of . because : searches variables that don't include a specific type.
for(var/D in M.Drops) //In here, we will search to see if there is any contents in the Drops list that each monster has defined.
new D(M.loc) //We want to drop every single thing in the mob's Drops list. This is how items are dropped.
ID:174025
Oct 11 2003, 7:46 am
|
|
It just doesnt work....:
|
In response to Lummox JR
|
|
ummm, i want the monster to drop a potion
|
Nave wrote:
It just doesnt work....: > mob/Enemies/Thug that each monster has defined. Um, your Drops variable isn't a list... I think you meant this Drops = newlist(/obj/Potion) |
In response to Unknown Person
|
|
WOw that was wierd, i didnt get any errors but when i was playing i killed a thug, and it said:
runtime error: Cannot create objects of type /obj/Potion. proc name: Postdeath (/mob/proc/Postdeath) usr: Nave (/mob/PC) src: Nave (/mob/PC) call stack: Nave (/mob/PC): Postdeath(Thug (/mob/Enemies/Thug)) Thug (/mob/Enemies/Thug): DeathCheck() Nave (/mob/PC): Auto Attack(Thug (/mob/Enemies/Thug)) You hit Thug for 3 points of damage. Thug was slain by Nave! Then it died and dropped some gold, but did not drop a potion.... |
In response to Nave
|
|
ok this is KUNARKS FRIGGIN DEMO
Drops = list(/obj/Poo) thats what you type and no problems and it you want a random drop of money and Items contact me ok? |
In response to Darkfirewolf5
|
|
i guess i would like to know the random drops
|
In response to Nave
|
|
i thank you guys for your help i fixed it
|
Lummox JR