Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
For-loop - not declared [SOLVED]
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#2
RE: For-loop - not declared

I don't think the script can find the int variable there, considering it's not a global int either. I would put the int variable in the CheckBattle script as well.

void CheckBattle()
{
    //ENEMY//
    
     int EnemyMonsterHealth = 10;
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();
    }
    
}

Derp.
08-22-2014, 06:41 PM
Find


Messages In This Thread
RE: For-loop - not declared - by Neelke - 08-22-2014, 06:41 PM
RE: For-loop - not declared - by Wapez - 08-22-2014, 06:45 PM



Users browsing this thread: 1 Guest(s)