Announcement

Collapse
No announcement yet.

Weirdest problem in flash evar.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Weirdest problem in flash evar.

    Well, I had got all sorts of problems in UDK scripting history but this one it's weeeeeeiiiird, my game has 2 arena game modes, solo and team, in both you use of a SL (scrolling list) to populate it with combatants, IDK Why in solo you receive all combatants just fine when you hit random 5 - 10 combatants and when you choose team, you get crazy amount like the array system it´s not working 70 80 then my game crashes, who the freak is hacking me XD.

    Code:
    
    //Description: This gets triggered when the button is hit
    function RandomNumberOfGladiatorsEasy(event:Object)
    {
    //Initialized variables.
    DefinitiveGladiatorsNum = 0;
    NumOfLoops = 0;
    
    ClearSLOfGladiators();
    
    
    
        DefinitiveGladiatorsNum = ReturnRandomNumberOfGladiators()
     trace(" FROM Solo bot taker the def num of glads is "+DefinitiveGladiators );
    
        if( DefinitiveGladiatorsNum < 5)
     {
      DefinitiveGladiatorsNum = 8;
     }
    
    
        for( I = 0; I < DefinitiveGladiatorsNum; I++)
     {
     trace(" FROM Solo bot taker looping ");
    
     GladiatorsClassInfo.push(GladiatorClassOptionStepper.dataProvider[random(5)]);
    
     if( random( 4 ) == 0 )
     {
      GladiatorsDifficultyInfo.push(GladiatorDifficultyOptionStepper.dataProvider[1]);
     }
     else
     {
         GladiatorsDifficultyInfo.push(GladiatorDifficultyOptionStepper.dataProvider[0]);
     }
    
      if( GladiatorsClassInfo[GladiatorsClassInfo.length -1] == "Gladiatrix" )
      {
          GladiatorNameInfo.push( GladiatorFemaleNames[random(GladiatorFemaleNames.length)] );
      }
      else
      {
       GladiatorNameInfo.push( GladiatorMaleNames[random(GladiatorMaleNames.length)] );
      } 
    
    
        Gladiators.push("Gladiator "+GladiatorsClassInfo.length+" "+GladiatorNameInfo[GladiatorNameInfo.length-1]+" Class "+GladiatorsClassInfo[ GladiatorsClassInfo.length -1 ]+" Difficulty "+GladiatorsDifficultyInfo[ GladiatorsDifficultyInfo.length -1 ]  );
    
     GladiatorClassOptionStepper.selectedIndex = random(5);
    
      gladiatorsolotakersl.dataProvider = Gladiators;
     gladiatorsolotakersl.invalidate();  
     }
    
    trace( "FROM TeamBOTTAKER the num of bots is "+GladiatorsClassInfo.length );
    
    }
    Some cool unreal projects you may like!


    Developer of GOTA - Survivalism Gladiatorial game Buy the game google gladiators of the arena steam https://store.steampowered.com/app/7..._Of_The_Arena/

    Download the demo Download the demo
    external link Dropbox DropBox

    Become a c++ Professional now C++ Networking Tutorial

    #2
    Fixed it but still there is a weirdo array returning weird numbers o.O.
    Some cool unreal projects you may like!


    Developer of GOTA - Survivalism Gladiatorial game Buy the game google gladiators of the arena steam https://store.steampowered.com/app/7..._Of_The_Arena/

    Download the demo Download the demo
    external link Dropbox DropBox

    Become a c++ Professional now C++ Networking Tutorial

    Comment

    Working...
    X