First, let me say thanks for reading and welcome to CheatSync and the Cheat Device!
This is a very simple tutorial on how to make your very own button cheat that will teleport Vic to any place that you want to with the press of a button!
Let's first start out by naming our cheat. Let's call our cheat "Hello Cheat Device!" (Corny, I know, but you can name it whatever you want.)
So, the first thing we do is go to our cheats.txt file and add the following:
#cheat Hello Cheat Device!
#cheat basically means new cheat, and next to it you put the name.
Now under this line is where we put our code!
So, first, we should make the teleport code itself. We will need some coordinates, so go to VCS and turn on "Display Coordinates." Now go to the exact place that you want to teleport to and write down the coordinates.
Time to make the teleport function!
All you need to do is put those 3 numbers, in order, into this function:
teleport(x, y, z);
I wrote down the following numbers:
76.5, 234.6, and 15.5
So, you simply put them in order into the function, like so:
teleport(76.5, 234.6, 15.5);
This will tell the cheat device to set the player's coordinates to the ones we entered and turn off the cheat.
Now that that is done, we want to make the code only activate if a button is pressed.
To do this we will need to make an if statement.
An if statement is a structure of code that checks if something is true, and if it is, it will do something.
So, we still start out with this:
#cheat Hello Cheat Device!
if() {
teleport(76.5, 234.6, 15.5);
}
If you try this, it won't work, because there is nothing in the parenthesis.
The stuff in the curly braces {} is what will be ran if what is in the parenthesis () is true. So, we need to tell it what we want to check.
For button pressing, we have 2 parts. The type (press, hold, etc) and the button to check for.
For this, we will be using press.
So, we add press to our code!
#cheat Hello Cheat Device!
if(press) {
teleport(76.5, 234.6, 15.5);
}
Now we need to tell it what button to check for. To do this, we will put a & after the word press and add "CTRL_CIRCLE". This tells the cheat device to check for the O button.
#cheat Hello Cheat Device!
if(press & CTRL_CIRCLE) {
teleport(76.5, 234.6, 15.5);
}
Congratulations! You just made your very first advanced Cheat Device cheat! Try it out!