Unity 3D Tutorial Part 114 Land: In Game Cheats

I need to walk back to a new 3d tutorial this will be land so as you surround previously hopefully right to the end this time a user commented for and so you type in O with secret phrase or a word or something and it gives you extra features or some abilities and I was thinking old style cheese that’d be awesome so instead of going up down left left right left and just that would be a bit difficult well harder to do than normal what we’re gonna do is do it like Sims style or yeah sim style where you I get the cheap my new so we’re gonna use shift and see that’s what I want to use and then if you press type in a phrase and press the button it does something so the ideas I have are and the classic big head mode because everybody loves big head mode so if I find the surgeon just shefket area and the head will be using his BIP head and it’s really simple to do so we do is just scale it up to 2 to 2 so if you watch big head mode the only issue is is as a bit it was delicious on the back that the pixels on will have small head mode so we have really really tiny heads awesome and then we’re gonna have some like default ones like extra life or increased speed or something right something cool so like I do could watch some proper cool cheese so it should be really really easy to do so first we’re gonna do is go to our levels levels of scripts and we’re gonna just make in our huts just in the mind 1 create JavaScript cheat screen and we’re gonna assign this to our GUI to our GUI scripts which I don’t yeah so just get you all this so sticky tongue here and first thing we need to do is cut them on gooey just to enable it so we’ll do a time yeah private bar cheat enabled equals false and in our function update wasn’t it tight if cheat enabled equals true that needs to show up giving text box so change this to 1 G UI so if she enabled equals true then we need a string to store our text thanks so we’re gonna cut private bar cheat well input will be string equals nothing and we’ll put input equals GUI text field and then he’ll get wrecked for it so they’re out 0 by 200 across from 2030 down that seems reasonable and then we put what we wanted to be so import then how long it’s a 300 characters so that I should do a flower import so we now need a way to enable the Qi enabled there so in a function of day you’re gonna type if import get key we’ll just Yusuf in our guest key yeah then FG enabled equals true that will make you folks otherwise else this is a one-way use the else statement if you didn’t see my previous video else if equals false and make it show so when you Romney if you press the each and hopefully she talks so let’s see so we play it and we press C and it should pop up your textbook 0 0 0 yes perfect so now we can type it in ba ba ba ba however what I want to do is black out or doc now the entire area or the whole screen so what I’m gonna do as well is here I’m gonna type GUI box rect will be

screen width and screen got high so completely come here entire thing your entire viewport that it’ll only make it slightly darker from you it is default clean and if we ever had the GUI skin was can just add a quick small texture to it so let’s see as you see it’s gone gone darker Percy again it was away and now what I want to do is make it so all the game freezes when you press C so if IOC it whole freezes everything freezes and we’ve done this before so you type will type it here you type time duck timescale equals zero point zero so that will leave a completely freeze our game from doing anything or make it work perfectly so also below this what we’re gonna do is above the box box so without the behind we do the type if you wish GUI doctor so I want to activate cheat board next to it till the time wrecked and this will be torn turns it across so it’s right next to the actual input text I’ll be zero down and we’ll say 70 cross TV so we’ll say it’s a bit but what we’re gonna do here is this is really enabled cheat but don’t worry not all when we do it you’ll see so let’s test it and the time scale hopefully it works when you see how easy it is to do because you can create so many evil so let’s see see everything stops I can type let’s see again it works perfect that’s quite good I was actually very the time will continuously go because we can’t stop time yeah don’t stop time that’s probably not a good idea to try to do either so we’re gonna set input equals nothing so soon as we click it any of all me of the same portable thing because it’s pointless having it keeping your default ones so we can now enable cheats here so first gr one is the classic bighead mode so if when we click the out activate awesome respond if import equals big head simple then we need to activate the code for big head mode just like and then we’re gonna do here else and now the reason doing else is instead of saying big head mode and this on this on this it’s only ever gonna be cool one thing so if it can’t find it I’ll search everything else so else if input equals equals small head so that’s when we put those two there we get the so first thing is to do for big head mode now easiest way to do this is to put a tag on all your heads so we’re gonna look for bit lower we’ll want head every single one not little knobs just these we’re gonna create a new tag called character name all these heads so when we actually create our character we do need to give him the tag of head so he’s heading creases – so we got type here get equals game I’m not fine fine game objects with high just like we used to on the streetlight it’s warm so get right yeah so game object off fine game objects with tags so every target or search every single time and whichever’s got a heads will return into this which will be an array so good time here a for each loop now on some languages it is actually for each or for

each but in this it’s just before it’s so simple so for our heads in get heads so basically for every head in get heads so we’re create variables so for every time everything you want it will run this code for well set this trance heads transform local scale directs my apologies my eggs we put transform that local scale plus equals here we’re gonna tie vector three surrender to mill three and we’ll just put plus on to it 1.0 so do it so I should make it like one bigger than itself so yes let’s try that one first so every time he finds a head it’ll run it and it’ll make them all bigger then stop because it’s a button so of course you could technically make come on keep increasing in size we’ll figure a way out of that in future that’s so nice going on for look so see a multi pin big and activate awesomeness boom oh my god everyone’s big head start so cool so as you see big head big head big head big head became so really really simple to do as well so simple so we’re gonna activate as well is just below here we’re gonna put and cheat activate it enabled so just at bottom of this key enabled false so when we click the button it like say any cheat vines then just turn the screen off so you can see it all anyway so copy this entire line here paste in here and we’ll do the same again but minus equals so either way it’s either gonna take that off or set it so and right we need to change that slightly we gonna put get head yeah let’s try it again so I’d simply just remove the ass that’s all I did that’s really ordered so we’ll try again we’ll type in get big well big head mode and small head mode I’ve never really seen small head mode and games rather why looks hilarious so we’re gonna go up and we’ll just look at these big oops so tight small hand mode oh my god into a head and we may know we need to take that down I believe the game crashed yes we never have enabled it again so we’ll set the time scale back to 1 so we’ll just yeah we’ll do that so you type it in it goes back it resets the time scale it comes on because I believe the 0.1 is a bit big to take off someone’s head because you can’t see it so let’s try again simpler type small head and she literally has no head so that’s a little bit bad so there’s a little bit here just just because so I’ve got a small head move got big head wound but above all this I’m gonna type well change that to my house we retired reset oh geez this will be a hard one to do for sometimes but just for this it’ll be simple so we’ll set them all to equal 1 1 1 1 so get heads reset so if we talk to reset all cheats it’s a reset all of the cheats and put all these back no matter how bad did they mess up so we’ve always got an option and then one time what either helps so let’s try it you go back so let’s see

small head we need to at the end the future hahaha so let’s cool down let’s reset all cheese perfect so we’ve done that now if we have an access to our health which I believe we do if I let’s do an increase speed one because that sounds awesome so here we’ll type and increase player speed so in here we’ll type game object dot foreign and what’s it on me scripts so what we’re gonna do is literally increase which increase their speed player running speed plus equals seems it off and then we can also do elsif decrease decrease by speed and minus equals yes because if you do it – then everything will work so now we’ve done that we do need to set the player speed back to where it was so the best way to do this would be to create a backup of it here so private bar and first player speed just be any need to be equal well Flo just to make sure equals zero so we need to set this as a backup house it won’t work so sir yeah we’ll leave that you’ll just be able to keep winning winning Gwyn yeah so let’s try that sort of increase and decrease player speed the only issue I could see as if play is actually a lower case so see let’s see well increase player speed where can I run faster but we also want decrease speed reset oh geez so just for now because eventually you will be able to increase you play a speed but just for now on here we’re going to set it to and equals 12 just so it sets us back to exactly what we were we will have to make a backup of our speed I just can’t think to where to do it for now so we possibly do it function star so we’ve got 5 cheats so far working really well but we need to see I want to do one more and that’s really simple to do so what we’re gonna type and just give this some room so you can see and above all this and below this we’re gonna type we need a label so do you I don’t label rekt will be zero at zero position that’ll be 30 $40 by tool to cost 200 down so you can see everything on yep and it’ll show the label so oh nothing so down here move type else if import equals equals help cuz we need to wait to tell the user where it is but we’ll also fema duplicate this women type does not equal help then it will do this below because if we type help and it shuts off and the players not gonna be able to see what they want but if it doesn’t equal help then we’re all good so Oh stay where it is so input our help so here we need to show a list of all our cheats for the character so we’re

gonna type output output equals and reset all chips so we need to literally just for it so we could eventually use a list but not for now we just can use a basic label so reset or cheese equals well resale cheese reset or activated cheats stop and then if you put a slash than n it’ll bring it on to the next line which I think we’ve discussed before so I’m next cheat is big head mode so I’m just gonna quickly write all these are then I’ll be back in a minute so I’m back I’m just doing the last ones of help shows the help screen you just perfect so hopefully if we try it each work you should show all that on separate means so we can see what we want to see so 71 just take out this slush slush hands for now might have theory that while that works it was in the label and it’s really needed for a text box so do that so we’ll try that like it is so I forgot the speech marking semicolon simple so see that works so we can play and if you press help it should show us a list of all the cheats we have and one day we’ll make it like on its own alliance of help it doesn’t equal to meet after reset old cheese we saw the cheese too big head mode so it’ll list them all really really simply so I’m just gonna increase the size of that sideways so 600 so you can fit everything on one line don’t list at this to a thousand simply because we don’t know how many teams from around so you’ve got so we’re gonna type help I’m gonna say it so long so as you see it shows it babies quite bad so we will have to change that one day but also one last thing what to do is set output to nothing yeah so so we’ve got a basic cheat screen going on my favorite has got to be the bighead mode that’s just classic gaming old-school so it’s a bit different if you want in the tutorial up down left right imma fry post in the comments and if enough people say I’ll get a go big head mode because it’s hilarious yeah so thank you for watching and see you next time also join my facebook group I always forget