Navigation

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

    Is there a way to tell if a variable increases

    Beginners
    2
    3
    289
    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.
    • poof92
      poof92 last edited by

      If it increases then run a function once until it increases again?

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

        If I've understood correctly, you could do something like

        // before the main loop
        a = 1
        aPrev = a
        
        // inside main loop
        if a > aPrev then
            function()
            aPrev = a
        endif
        
        poof92 1 Reply Last reply Reply Quote 0
        • poof92
          poof92 @Kat last edited by

          @kat Awesome thanks so much I'll give it a try

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