Clickteam Fusion 2.5

Clickteam Fusion 2.5

soup 25 Jan, 2015 @ 12:32pm
What is the highest global value possible?
Im running a circle which is rotating on a global variable, and the longer it rotates the longer/higher the number gets, 360, 720, 850 degree etc. And it keeping getting higher so is there a cap on how big the global variable can be? Otherwise part way through game it might stop. Thnx - Ama
< >
Showing 1-3 of 3 comments
kisguri  [developer] 25 Jan, 2015 @ 3:37pm 
No there isn't, but to be neat and clean run the value through the direction calculator object and change to a 360 base degree number, its a expression in that object.
Squatter 25 Jan, 2015 @ 4:26pm 
Example of what kisguri is saying

under Active object in event editor
Direction -> Select Direction -> Click 1+1 (which is calculate direction)

and input the math formula you want... it will loop the values between 0 and 31, if you add 1 to 31, it changes it to 0.

Not sure how to change the base number to 360, since it is between 0 and 31... but you can always do a math conversion... such as 0 = 0 and 360 = 0 and 180 = 16 and 90 = 8 and 270 = 24 and etc.

Math would be along the lines of
(16/180) * Degree = Direction
and
(180/16) * Direction = Degree

Note that with this math 32 Direction = 360 Degree = 0 Direction = 0 Degree

The math may make it 32 or 360 or 0 or 0... luckily the program loops so when it gets to 32, it flips it to 0 so this should not be an issue

NOTE: since decimals are at play... make sure you do (16.0/180.0) * Degree = Direction... otherwise it will round

NOTE 2: o and when you have it convert to an odd direction to lets say like 14.2... i would assume that the "calculate direction" would round it to 14, since direction 14.2 does not exist. Or if you want more control of how it is rounded, round the numbers yourself. The program otherwise may only round down so 14.9 might be 14 still.
Last edited by Squatter; 25 Jan, 2015 @ 4:40pm
soup 25 Jan, 2015 @ 9:28pm 
Sounds complicated but I will give it a go, thnx man for telling me how I can do it exactly :D
< >
Showing 1-3 of 3 comments
Per page: 1530 50

Date Posted: 25 Jan, 2015 @ 12:32pm
Posts: 3