How modify some variable of the player I know…but how i can create some command sequence to like :
Down, Down, Up , Left, Right, A to gain full health or something?
How modify some variable of the player I know…but how i can create some command sequence to like :
Down, Down, Up , Left, Right, A to gain full health or something?
Well one way would be to create a variable with the sequence (translate an input to a letter or number).
For each input you save it in there and at a certain length you go through all your codes which you saved somewhere.
Can you post a screenshot?
First you obviously need to get the input. Lazy ■■■ I am I use a custom event to append the string but that doesn’t matter. The important part is: Those keys simply append the string by whatever stand in the “Char” field.
I use the double down reset to reset the code. So every cheatcode had to start with that. You can see it in the picture at the “True Branch”. Before that I simply check for the last character in the string. If it was a d it resets the code and simply puts in a single d. You could also make it start with a dd (since you set the code) so a single d won’t trigger it.
And last but not least I check if that is a code.
Because the user can input whatever I check first if it has a certain length and if it’s too long so it won’t go through all codes always. In case you use buttons which are used ingame this might be irritating and if you have tons of codes it might impact performance otherwise. You might also want to add something to reset the string automatically since otherwise it might get too long and I have no idea what happens in that case. I tried 180 characters until I became tired but it might crash at more… honestly no idea. But it’s never a good idea to have a potentially infinite string.
Good! I will read with more attention because there are some nodes i never used…but thanks anyway…i will made a test soon…
OH YEAH!!! THANKS…the button to reset the password was little trick to understand…but…yeah…it works!