Maximum Values for Variables

New releases and general discussions.

Post » Fri Feb 19, 2010 8:08 am

You might remember Aeal made a variable object way back, perhaps you could get him to a a min/ max to that?
[url:zy0p5rke]http://www.scirra.com/forum/viewtopic.php?f=17&t=3414[/url:zy0p5rke]
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Thu Feb 25, 2010 9:27 pm

i think this might be, or be similar to, what 'clamping' is, but try this:

maximumvalue-(maximumvalue-(currentvalue))

thats the basic structure... i dont know what context your using this is though... i agree it shud be in the UI though.
B
3
S
1
G
2
Posts: 14
Reputation: 878

Post » Thu Feb 25, 2010 9:37 pm

[quote="newt":250tm9pg]You might remember Aeal made a variable object way back, perhaps you could get him to a a min/ max to that?
[url:250tm9pg]http://www.scirra.com/forum/viewtopic.php?f=17&t=3414[/url:250tm9pg][/quote:250tm9pg]

lol I forgot I made that
B
5
S
2
G
4
Posts: 632
Reputation: 2,829

Post » Thu Feb 25, 2010 9:38 pm

It'd just streamline it quite a bit. Right now I have a whole event sheet just to clamp various variables. If the min / max stuff is hard coded into the UI, I wouldn't need to do that.
B
6
S
2
G
3
Posts: 520
Reputation: 2,690

Previous

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 4 guests