Posts: 160
Threads: 31
Joined: Oct 2011
Thanks: 0
Given 0 thank(s) in 0 post(s)
I think the world class should gain m_MobLimit, m_CurrentPlayers and m_CurrentMobs. If ( m_CurrentMobs * m_CurrentPlayers > m_MobLimit), then no more mobs can spawn. When a mob spawns add + 1 to m_CurrentMobs, when it is removed, remove one from it. Same thing with m_CurrentPlayers.
The mob rate should also be slower and a bit more random I think.
How does this sound?
Posts: 372
Threads: 29
Joined: Mar 2011
Thanks: 1
Given 5 thank(s) in 17 post(s)
Yeah better perhaps they also should have there own m_Health.
So we can set how much health they have.
Posts: 372
Threads: 29
Joined: Mar 2011
Thanks: 1
Given 5 thank(s) in 17 post(s)
How do i go about setting them ?
Like chicken having 2 harts / 4 heatlh ?
Posts: 372
Threads: 29
Joined: Mar 2011
Thanks: 1
Given 5 thank(s) in 17 post(s)
Hey,
Thanks i'm able to set health now really nice thanks alot.
Now to make it actually be able to drop multiple items.
Client just seems to crash not sure why.
Going to do some testing as the current code does actually allow multiple drops so its somewhere in my code.
Posts: 160
Threads: 31
Joined: Oct 2011
Thanks: 0
Given 0 thank(s) in 0 post(s)
I couldn't get the game to drop raw beef without crashing the client. Anything else I tried worked just fine. I don't know why and haven't looked into it at all. I moved on to another project and stopped working with drops.
Posts: 1,450
Threads: 53
Joined: Feb 2011
Thanks: 0
Given 38 thank(s) in 89 post(s)
Yes it is. The parent constructor is called before the child constructor, so the child can overwrite the m_MobType value. These values in cMonster are simply default values.
Posts: 372
Threads: 29
Joined: Mar 2011
Thanks: 1
Given 5 thank(s) in 17 post(s)
Ah i see haha then couldnt mobtype be just 93 chicken or something instead random ?