Navigation

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

    Is that a bug?

    Work In Progress
    7
    17
    412
    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.
    • pianofire
      pianofire Fuze Team last edited by

      More details here: https://fuzearena.com/forum/topic/725/new-community-sharing-on-fuze4

      waldron 1 Reply Last reply Reply Quote 0
      • waldron
        waldron F @pianofire last edited by

        @pianofire said in Is that a bug?:

        More details here: https://fuzearena.com/forum/topic/725/new-community-sharing-on-fuze4

        3 in 1 lol seems like we posted at the same time

        1 Reply Last reply Reply Quote 1
        • M
          Mechanical last edited by

          ID: NXHQWQSD1V
          Pending

          1 Reply Last reply Reply Quote 0
          • LinkCraft
            LinkCraft F last edited by

            So I got rid of the for loop at the end of your program and the 2 if statements in it and replaced a normal loop with the for loop and it works for me

            M 1 Reply Last reply Reply Quote 0
            • M
              Mechanical @LinkCraft last edited by

              @LinkCraft so did it crash like for me?
              Is the for loop the problem?

              1 Reply Last reply Reply Quote 0
              • M
                Mechanical last edited by

                I have tested it without the for loop, seems to work now.

                Okay then I'm in front of another problem.

                If an infinite for loop gets my game to crash how am I going to build a timer for my abilities? Time is an important factor...

                1 Reply Last reply Reply Quote 0
                • PickleCatStars
                  PickleCatStars F last edited by

                  how do you have an infinite for loop?

                  I’m not saying it’s what’s causing your crash, but non-stopping loops should probably use ‘while’..?

                  M 1 Reply Last reply Reply Quote 0
                  • M
                    Mechanical @PickleCatStars last edited by

                    @toxibunny infininite for loop example:

                    For i = 0 to 60 step 1 loop

                    If i = 60 then i = 0 endif
                    Repeat

                    Easy as that

                    pianofire 1 Reply Last reply Reply Quote 0
                    • pianofire
                      pianofire Fuze Team @Mechanical last edited by pianofire

                      @Mechanical So what are you trying to achieve here? A counter that goes from 0 to 59 because this would be neater:

                      i = 0
                      loop
                        i = (i + 1) % 60
                      repeat
                      M 1 Reply Last reply Reply Quote 0
                      • Martin
                        Martin Fuze Team last edited by

                        Also, the step 1 is not required. That's the default.

                        1 Reply Last reply Reply Quote 1
                        • M
                          Mechanical @pianofire last edited by

                          @pianofire im trying to achieve a timer for some abilitys.
                          Just the ability to measure time would be great.

                          1 Reply Last reply Reply Quote 0
                          • LinkCraft
                            LinkCraft F last edited by

                            Use settimer()

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

                              Have a look at these posts:

                              https://fuzearena.com/forum/topic/817/frames-delta-time/4

                              https://fuzearena.com/forum/topic/1060/best-way-to-track-the-timing-of-user-interactions/2

                              1 Reply Last reply Reply Quote 0
                              • PickleCatStars
                                PickleCatStars F last edited by

                                Use the time() command. Have variables called starttime, currenttime, and elapsedtime. Put a starttime = time() right at the beginning before your main loop, put a currenttime = time() inside your main loop, and then just remember that elapsedtime = currenttime-starttime. Making starttime=currenttime will reset the counter (don’t do that every loop though, obviously), and if you just want seconds, then secondscounter = elapsedtime%60

                                The % means ‘modulo’ , btw. Google it, it’s very useful!

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