Navigation

    CCBlueX Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    [Legendary] How to make an animation?

    ScriptAPI
    2
    6
    140
    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.
    • DreamWasFucked
      DreamWasFucked Banned last edited by

      And so I know that with eventData.getPartialTicks() in render2D you can somehow make an animation, but how to do it?

      exit scammed 1 Reply Last reply Reply Quote 0
      • exit scammed
        exit scammed @DreamWasFucked last edited by

        @skidma wdym animation

        DreamWasFucked 1 Reply Last reply Reply Quote 3
        • DreamWasFucked
          DreamWasFucked Banned @exit scammed last edited by

          @asutoboki-kun smooth rect animation

          exit scammed 1 Reply Last reply Reply Quote 0
          • exit scammed
            exit scammed @DreamWasFucked last edited by

            @skidma still can't get it

            DreamWasFucked 1 Reply Last reply Reply Quote 3
            • DreamWasFucked
              DreamWasFucked Banned @exit scammed last edited by

              @asutoboki-kun dadad.png
              ZERODAY B20.6 RELEASED | HYPIXEL ZOOMING & BOOMING – 01:59
              — Intent Store

              (TargetHud health bar animation)

              exit scammed 1 Reply Last reply Reply Quote 0
              • exit scammed
                exit scammed @DreamWasFucked last edited by exit scammed

                @skidma uh

                function animate(target, current, speed, partialTicks) {
                	dif = target - current;
                	if (speed < 0) {
                		speed = 0;
                	}
                	if (speed > 1) {
                		speed = 1;
                	}
                	factor = dif * speed * partialTicks;
                	if (target > current) {
                		current += factor;
                	} else {
                		current -= factor;
                	}
                	return current;
                }
                
                var shit;
                //...(the following lines of code will use Core)
                	
                	onRender2D: function(event) {
                		shit = animate(target_here, shit, speed_here, event.getPartialTicks());
                		//too lazy since it's late rn
                	}
                
                
                1 Reply Last reply Reply Quote 3
                • First post
                  Last post