Announcement

Collapse
No announcement yet.

(Sleep); woes!!!!

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

    (Sleep); woes!!!!

    This is some of the weapon code I used in 2k3, but it doesn't work in 2k4. I get a 'bad command or expression' error on 'Sleep'. Can anyone tell me how to fix this darned thing? Why does 'sleep' cause an error?

    Code:
    class Meh extends ProjectileFire;
    
    var int nrand;  
    
    function DoFireEffect()
    {
        local int nrand;
        nrand = rand(10);
    
        if (nrand <= 5)
        {    
            FireAnim='FireAnim1';
            gotostate('blah');
        }
        else
        {    
            FireAnim='FireAnim2'; 
            gotostate('blahsomemore');
        }
        super.DoFireEffect();
    }
    
    state blahsomemore
    {
        event ModeDoFire()
        {}
    
    begin:
        Sleep(5.0);
        gotostate('none');
    }
    
    state blah
    {
        event ModeDoFire()
        {}
    
    begin:
        Sleep(2.0);
    
     
        gotostate('none');
    }

    #2
    [code] tags please!

    Comment


      #3
      Uhm... what error? How 'bout moving the begin: part to the beginning of the State block?

      Comment


        #4
        I made the changes but it's still no go.

        'Error 'Sleep' bad command or expression.'

        Comment


          #5
          sleep is defined in actor class , so you cant use it in the weaponfire code, since weaponfire isn't a subclass of actor.

          Comment

          Working...
          X