ID:176985
 
Im having real trouble defining the stats of each mob.
i do 1 and its fine but when i do the next it just says error duplicate definition.
Pls help me
Are you defining the stats under the Stat() proc? eg

Stat()
stat("HP",HP)
stat("GP",GP)

if not, thats how you do it.
Take out the duplicate definintion. It means you did something like this:

mob
var/X
var/Y

mob
var/X
var/Y

You want to create sub-mob, like this:

mob
Stupid
var/X
Smart
var/X
var/Y

Of course, everything inherits, so...

mob
var/X
Stupid
Smart
var/Y
In response to Hazman
im doin this

mob/player
hp = 100
maxhp = 100

mob/bug
hp = 30
maxhp = 30
In response to Garthor
no that dint work =(
In response to ShadowBlade6300
nothing has worked :(
In response to ShadowBlade6300
ShadowBlade6300 wrote:
im doin this

mob/player
hp = 100
maxhp = 100

mob/bug
hp = 30
maxhp = 30

That's good, but you need those vars to exist in the first place. So you should define the vars under /mob:
mob
var/hp
var/maxhp
When you use the var/ part, it says that you're declaring a brand new variable. When you don't use var/, Dream Maker assumes the var has already been set up and you're just overriding the old value.

I can actually save you a little typing here so you don't have to always set hp and maxhp the same. The solution: Set hp in mob/New():
mob
var/hp
var/maxhp=1 // a default

New()
..() // just in case
hp=maxhp // now set hp to max

mob/player
maxhp=100

mob/bug
maxhp=30
New() will be called whenever the mob is created. Thus your hp can be set automatically for you.

Lummox JR

In response to Lummox JR
thx m8 thats great