Sometimes I see that even though the wiimote is standing still, its acceleration is sometimes more than 9.8, which should not be possible. I want to watch the wiimote[0].acceleration.z output over time and see what the biggest number so far has been. Occasionally it'll even be a 2 digit number, but only for a frame or two.
How can I watch the maximum output of a variable?
Maximum value of a variable?
-
- One Eyed Hopeful
- Posts: 13
- Joined: Mon Jan 29, 2018 4:41 pm
-
- Cross Eyed!
- Posts: 197
- Joined: Mon Mar 02, 2015 3:58 pm
Re: Maximum value of a variable?
Declare a gobal variable, as described here:
https://github.com/AndersMalmgren/FreeP ... /Scripting
If the reported input is higher than the variable, put it in the variable.
Watch the variable.
https://github.com/AndersMalmgren/FreeP ... /Scripting
If the reported input is higher than the variable, put it in the variable.
Watch the variable.
-
- One Eyed Hopeful
- Posts: 13
- Joined: Mon Jan 29, 2018 4:41 pm
Re: Maximum value of a variable?
works like a charm. Thanks!Jabberwock wrote:Declare a gobal variable, as described here:
https://github.com/AndersMalmgren/FreeP ... /Scripting
If the reported input is higher than the variable, put it in the variable.
Watch the variable.
-
- Cross Eyed!
- Posts: 197
- Joined: Mon Mar 02, 2015 3:58 pm
Re: Maximum value of a variable?
Glad I could help!