Announcement

Collapse
No announcement yet.

Wating for an event.

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

    Wating for an event.

    this is my last question then my rotor will be done.

    ok i have

    simulated event DrivingStatusChanged()
    {
    if (bDriving)
    Enable('Tick');
    else
    SpinDown=True;
    wait(!SpinDown)
    Disable('Tick');
    }

    now i know wait dose not work but i whant to know how or what i can put there so that it dosent end Tick untill SpinDown == false.

    #2
    I don't know try a for loop perhaps?

    Comment


      #3
      i already tryed that

      error runaway loop

      10000000 iterations

      loops dont work for that.

      Comment


        #4
        BTW my event is still waiting to beable to wait.

        Comment


          #5
          SpinDown=True;
          while (SpinDown) { }
          Disable('Tick');

          maybe if you included a little more info.. ;x

          Comment


            #6
            Originally posted by Bigcheeese
            i already tryed that

            error runaway loop

            10000000 iterations

            loops dont work for that.
            its inside a tick... i already said that.

            Comment


              #7
              if it's inside a tick you have to let it end the current iteration of tick and check every instance when tick occurs whether the rotor has stopped spinning and then shut down tick...

              perhaps you could stuff in a bool bShuttingdown... when it is set you skip all innessessary handling in the tick and just check whether the rotor has stopped spinning already and then disable tick...

              a loop won't work because it stops the game... and what you want is to let the game go on and just wait for the rotor to stop spinning, right?

              Comment

              Working...
              X