Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / can i change a variables value over time?

Author
Message
KristianXD1
8
Years of Service
User Offline
Joined: 15th Jul 2016
Location:
Posted: 10th Sep 2016 18:29
Hi,
i have been playing around with agk for a bit now and i've run into a problem.

let me explain what i want to accomplish.
if i have a variable like this:

test_var = 200

and i want to gradually change the value to 250 in the span of 400ms for example, how would i go about doing that?
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 10th Sep 2016 22:38
I generally do this sort of thing using my own maths:



Or you can use a customer tween (which I never realised AppGameKit did)

Hover Car Race Challenge! - available now on Google Play
Invaders of the 29th Dimension - available now on Google Play
Find me on indieDB
KristianXD1
8
Years of Service
User Offline
Joined: 15th Jul 2016
Location:
Posted: 11th Sep 2016 02:45 Edited at: 11th Sep 2016 02:46
thanks, i think i'm gonna do something similar to that.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th Sep 2016 15:11
I feel this is a bit more simplified.


"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

Login to post a reply

Server time is: 2024-11-21 20:47:12
Your offset time is: 2024-11-21 20:47:12