08-22-2014, 06:23 PM
Hey guys.
Take a look at this:
I hope this lines up correctly.
It says EnemyMonsterHealth is not declared.
When I am clearly declaring it here:
What I'm trying to do is make a for loop check how much health the monster has by grabbing the actual health as the lowest and the max health (+1) as the highest.
Am I doing something wrong?
Take a look at this:
PHP Code:
void CheckBattle()
{
//ENEMY//
for(int EnemyHealthCounter=EnemyMonsterHealth;EnemyHealthCounter<11;EnemyHealthCounter++)SetLampLit("EnemyHealth_"+EnemyHealthCounter, false);
//FRIENDLY//
for(int FriendlyHealthCounter=FriendlyMonsterHealth;FriendlyHealthCounter<11;FriendlyHealthCounter++)SetLampLit("FriendlyHealth_"+FriendlyHealthCounter, false);
for(int i=1;i<5;i++)SetEntityActive("Move_"+i, false);
//MOVES//
for(int MoveCounter=1;MoveCounter<MoveAmount+1;MoveCounter++)SetEntityActive("Move_"+MoveCounter, true);
CreateParticleSystemAtEntity("MoveParticle_"+MoveCounter, "ps_orb_absorb.ps", "Move_"+MoveCounter, false);
if(EnemyMonsterHealth <= 0)
{
BattleEnd();
}
}
I hope this lines up correctly.
It says EnemyMonsterHealth is not declared.
When I am clearly declaring it here:
PHP Code:
void BattlePreparation()
{
SetLocalVarInt("InBattle", 1);
//ENEMY MONSTER//
int EnemyMonsterHealth = 10;
int MonsterNumber = RandInt(1,2);
SetEntityActive("MonsterBox_"+MonsterNumber, true);
CheckBattle();
}
What I'm trying to do is make a for loop check how much health the monster has by grabbing the actual health as the lowest and the max health (+1) as the highest.
Am I doing something wrong?