Commands

How to add commands to your script to make the cool stuff happen.

Part 3 - Commands.

Commands are just different words that make my program do different stuff. Here's the list of commands you have access to. (Don't worry, we'll look at how to use them too.)

set1x (int stickValue)
set1y (int stickValue)
set2x (int stickValue)
set2y (int stickValue)

lerp1x (int finalStickValue) (int time)
lerp1y (int finalStickValue) (int time)
lerp2x (int finalStickValue) (int time)
lerp2y (int finalStickValue) (int time)

ssSet (int stick1X) (int stick1Y) (int stick2X) (int stick2Y) (int amountSS) (int timeToWait)

sleep (int time)

resetall ()

set1x (int stickValue)

This command sets the X Axis of the 1st stick (the left one) to whatever value you pass in. Stick values can range from -32767 (far left of the stick) to 32767 (far right). Ex:

set1x 32767 //Sets left stick all the way to the right.
set1x -10000 //Sets the left stick a bit to the left.

Do keep in mind that the default deadzone on controllers is between -8000 and 8000, which means any values inside that are basically 0.

set1y (int stickValue)

This command sets the Y Axis of the 1st stick (the left one) to whatever value you pass in. Stick values can range from -32767 (very bottom of the stick) to 32767 (the top).

set1y 32767 //Sets the left stick all the way down.
set1y -15000 //Sets the left stick up a bit.

All the other set2 etc. commands do the same thing as the set1 ones, except hey obvious apply to the 2nd stick instead.

lerp1x (int finalStickValue) (int time)

This sets the X Axis of the 1st stick to a value, except it transitions from whatever value the stick is currently at to the new value smoothly over a period of time.

finalStickValue is the final value you want the stick to be at. (between -32767 and 32767)

time is the amount of seconds you want it to take to get to that.

lerp1x 32767 2 //Transitions the left stick to the far right over 2 seconds.
lerp1x -15000 10 //Transitions the left stick slightly left over 10 seconds.

All the other lerp commands do the exact same thing except for their corresponding stick and axis.

sleep (int time)

Makes the script sleep for the time you put (in MS). Use this if you want to delay a certain camera movement till later.

sleep 5000 //The script waits for 5 seconds.
sleep 1500 //The script waits for 1.5 seconds.

resetall

Resets the sticks all back to default.

resetall //Complex, eh?

ssSet (int stick1X) (int stick1Y) (int stick2X) (int stick2Y) (int amountSS) (int timeToWait)

This one looks pretty complex, but it's really powerful. It's kind of hard to explain what this one does, you'll just need to watch a video that I haven't made yet.

stick1X the value of the stick1X every iteration. (Same with all the others, you get the drill.)

amountSS is the amount of times it will loop, thus, the total amount of screenshots it takes.

timeToWait is the amount of time it waits between taking each screenshot and moving (in MS).

ssSet 16000 0 -16000 0 60 1000 //Moves to the left and turns to the right

Now that you know how to use all the commands, to some degree, let's look at some example scripts and what they do.

Last updated