[solved] Absolute value
3 posts • Page 1 of 1
[solved] Absolute value
Hi
I made a simple text kph speedometer with this
and I found this from an older post
problem is that I have no idea how to put these together also how the 2nd script works?
I made a simple text kph speedometer with this
- Code: Select all
text = {"" + math.toInt(vel(0) * 3.6)}
and I found this from an older post
- Code: Select all
scene.my.abs = (n)=>{n < 0 ? - n : n}
problem is that I have no idea how to put these together also how the 2nd script works?
Last edited by therestofguys on Wed Mar 04, 2015 1:35 pm, edited 2 times in total.
-

therestofguys - Posts: 10
- Joined: Sat May 17, 2014 9:34 am
Re: [Q]Absolute value
type scene.my... definition in console, then you could use it as a function:
text = {""+scene.my.abs(math.toInt(vel(0)*3.6))}
text = {""+scene.my.abs(math.toInt(vel(0)*3.6))}
Dream of Algodoo as game development engine...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: [Q]Absolute value
Thanks, I didn't realize that
-

therestofguys - Posts: 10
- Joined: Sat May 17, 2014 9:34 am
3 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 6 guests



