Im creating a simple event and im experimenting issues with the monster.
I need take off the regen of the monsters, when die, stays die. And with my code, the monsters regen after die.
Any ideas?
I need take off the regen of the monsters, when die, stays die. And with my code, the monsters regen after die.
Code:
int MobPos = gObjMonsterAdd(this->Monster[iMonCount].MonsterIndex, this->Monster[iMonCount].Map, this->Monster[iMonCount].X, this->Monster[iMonCount].Y);
if (MobPos >= 0)
{
int MobID = gObjAddMonster(this->Monster[iMonCount].Map);
if (MobID >= 0)
{
gObjSetPosMonster(MobID, MobPos);
gObjSetMonster(MobID, this->Monster[iMonCount].MonsterIndex);
if (this->Monster[iMonCount].Boss == 0) { gObj[MobID].m_Attribute = 99; }
if (this->Monster[iMonCount].Boss == 0) { gObj[MobID].m_Attribute = 98; }
// Monster stats
gObj[MobID].m_AttackDamageMin = this->Monster[iMonCount].AttackDamageMin;
gObj[MobID].m_AttackDamageMax = this->Monster[iMonCount].AttackDamageMax;
gObj[MobID].Dir = this->Monster[iMonCount].Dir;
gObj[MobID].m_Defense = this->Monster[iMonCount].Defense;
gObj[MobID].m_SuccessfulBlocking = 700;
gObj[MobID].Live = 1;
gObj[MobID].DieRegen = 0;
gObj[MobID].MaxRegenTime = 100000;
gObj[MobID].RegenTime = 100000;
gObj[MobID].m_State = 1;
gObj[MobID].MaxLife = this->Monster[iMonCount].Life;
gObj[MobID].Life = this->Monster[iMonCount].Life;
gObj[MobID].Dir = this->Monster[iMonCount].Dir;
gObj[MobID].m_MoveRange = 0;
);
}
}