Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    update() required to read controls?

    Beginners
    2
    2
    215
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Wanderer1412
      Wanderer1412 Donator last edited by

      I thought the update() function was to update the screen graphics.... but it seems it's also required to read the controls?

      If I want to wait for the "A" button to be pressed, then this works...

      c=controls(0)
      while not c.a loop
           c=controls(0)
           update()
      repeat
      

      But, if I miss out update()....

      c=controls(0)
      while not c.a loop
           c=controls(0)
      repeat
      

      ...then I get "Stack overflow. Too many functions called, maximum memory for variables exceeded (line 3)"

      1 Reply Last reply Reply Quote 0
      • Willpowered
        Willpowered Fuze Team last edited by

        update also polls input internally, so you're correct- it is required for this!

        1 Reply Last reply Reply Quote 1
        • First post
          Last post