I hope someone can help me with this and I hope this can also help other people having difficulties with scripting in freepieIf -20 > Wiimote1.SteeringAngle > 20 degrees Then
key.A = False
Key.D = False
wait 0.02
end
If Wiimote1.SteeringAngle > 40 degrees Then
Key.A = False
key.D = True
end
If Wiimote1.SteeringAngle < -40 degrees Then
key.D = False
key.A = True
end
If Wiimote1.SteeringAngle > 60 degrees Then
Key.A = False
key.D = True
key.W = True
wait 0.001
key.W = False
end
If Wiimote1.SteeringAngle < -60 degrees Then
key.D = False
key.A = True
key.W = True
wait 0.001
key.W = False
end
If Wiimote1.SteeringAngle > 30 degrees Then
key.D = True
Wait 0.04
Key.D = False
end
If Wiimote1.SteeringAngle < -30 degrees Then
key.A = True
Wait 0.04
Key.A = False
end
If -30 < Wiimote1.SteeringAngle < -20 degrees Then
key.A = True
Wait 0.02
Key.A = False
wait 0.02
end
If 30 > Wiimote1.SteeringAngle > 20 degrees Then
key.D = True
Wait 0.02
Key.D = False
wait 0.02
end
W = Wiimote1.1
S = Wiimote1.2
A = Wiimote1.A
HELP : scripting for wiimote
-
- One Eyed Hopeful
- Posts: 2
- Joined: Wed Dec 11, 2013 1:47 pm
HELP : scripting for wiimote
Hi, i've come accross freepie a few weeks ago and it looks awesome, but I can't understand how the scripting works, I've already worked with glovepie (which doesn't fully support my wiimote; it's a non-oem motionplus one) and I have writen this simple script (even though it's long it's quite repetitive, I just want to know how to generate a key press when tilt exceeds a certain angle, and if possible tell it to wait for some time in that state (aka pressed or not)) Anyway, here's the script :
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: HELP : scripting for wiimote
Start with the script I posted in this thread, if it works I can help you with a script
http://www.mtbs3d.com/phpBB/viewtopic.php?f=139&t=18991
http://www.mtbs3d.com/phpBB/viewtopic.php?f=139&t=18991
-
- One Eyed Hopeful
- Posts: 2
- Joined: Wed Dec 11, 2013 1:47 pm
Re: HELP : scripting for wiimote
Thanks ! I guess that script is better than my fake analog script