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
"Switch" loops not working as it should
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#2
RE: "Switch" loops not working as it should

Don't think this will make a difference, but in this situation, it would probably be better to use an if-else statement.

PHP Code: (Select All)
void reloop_1(string &in asParentstring &in asChildint alState)
{
    for(
int i 1<=5i++)
    {
    
float x;
    if(
== 1) {
        
1.0f;
    }
    else {
        
0.001f;
    }
    
AddEnemyPatrolNode("grunt_1""PathNodeLoop_"+ix"");
    }


Also, I made x a float. That was your problem there. You were trying to set x to 0.001 when it was an int.

In Ruins [WIP]
(This post was last modified: 02-18-2013, 07:22 PM by NaxEla.)
02-18-2013, 07:20 PM
Find


Messages In This Thread
RE: "Switch" loops not working as it should - by NaxEla - 02-18-2013, 07:20 PM



Users browsing this thread: 1 Guest(s)