Here's one more finishing touch: Put this in to your code to make it so that when you say 'hide', the glovepie window disappears, and when you say 'show', the glovepie windows appears. If your code looks like this, then well done!! Don't forget to save your file. If you have no 'end if', all the code underneath would be triggered whenever you say 'Medic' Any questions so far? Comment below ' End if This tells GlovePIE that once it has pressed and released 'E', it has finished. It works for the mouse too, to left click you could type: mouse.LeftButton 5. However, for the number keys (above the letters) you have to say: 'press key.1' or 'press key.5'.
![glovepie gh3 script glovepie gh3 script](https://www.mundayweb.com/html/_images/glovepie02.png)
to press 'Alt' you would say: press keyboard.Alt. This works for most buttons on the keyboard, e.g.
![glovepie gh3 script glovepie gh3 script](https://www.mundayweb.com/html/_images/glovepie01.png)
Keyboard.E This just tells GlovePIE that you want to simulate a keyboard press. In this case, the key for a Medic in TF2 is 'E', so it presses E, waits 10 milliseconds then releases E. Press This just simulates a button press. Note that the word "hello" or "medic" needs to be in speech marks. If the number was 1, anything that sounds remotely like the word 'hello' would trigger the statement. The number (5) that comes after the word just means the level of confidence needed to fulfil the statement. This would fulfil the IF statement if you say the word 'hello'. Here's another example: if said("hello", 5) then. In other words, this is how GlovePIE hears you. It will compare your voice to the word 'medic', and if your voice matches the word 'medic', then the IF statement is fulfilled. 'said' In GlovePIE, 'said' just means what you say. It means that IF it hears you say the word 'medic', it will THEN press 'E'.
![glovepie gh3 script glovepie gh3 script](https://i.imgur.com/CwQSHsW.png)
Look at the first picture this is a typical IF statement. Don't worry if this doesn't make much sense to you right now, it will all become clear eventually. It means that IF the conditions specified are fulfilled, THEN it will carry out some actions. IF statement The 'if' statement is arguably the most important.
Glovepie gh3 script how to#
Ok now you just need to code! I'll teach you how to code for Team Fortress 2, then you can apply the same technique to any other game.