// written in AGk V2.20
// set window properties
SetWindowSize( 800, 480, 0 )
SetVirtualResolution( 800, 480 )
my_tween = CreateTweenCustom(2.0)
SetTweenCustomFloat1(my_tween,0.0,1.0,0)
do
// press left mouse button or tap screen to start
if GetPointerPressed() = 1
PlayTweenCustom(my_tween,0.0)
endif
// get the tween value
tween_value# = GetTweenCustomFloat1(my_tween)
print("press left mouse button or tap screen to start")
print(tween_value#)
UpdateAllTweens( getframetime() )
sync()
loop
Help make AGK better by submitting an example for this command! (All examples are subject to approval)
// written in AGk V2.20 // set window properties SetWindowSize( 800, 480, 0 ) SetVirtualResolution( 800, 480 ) my_tween = CreateTweenCustom(2.0) SetTweenCustomFloat1(my_tween,0.0,1.0,0) do // press left mouse button or tap screen to start if GetPointerPressed() = 1 PlayTweenCustom(my_tween,0.0) endif // get the tween value tween_value# = GetTweenCustomFloat1(my_tween) print("press left mouse button or tap screen to start") print(tween_value#) UpdateAllTweens( getframetime() ) sync() loop