Help with a key sequence
Hi everybody, I'am actually working on a little game with two friends, the thing is that we need to make a sequence of keys like a, s, d, f and after pressing those keys in the correct order the game should make a sprite appear in the background, but we're pretty noobs with c# (what we want to use) and I'd love if someone could help us bringing up a code in c# as example. Thank you.
Answer by KuR5 · Jun 30, 2016 at 10:36 AM
Hey buddy,
Here i have attached the code . Make a script of that and assign to the gameobject.
Then in the inspector, under the KeySequence list; set the sequence of key you wanted(like a,s,d,f that you have mentioned in your question).
For your example of a,s,d,f sequence : Set the size of KeySequence variable in inspector to 4 and then select the A for first index, S for second index and so on...
That's it. Run the game and have fun with your friends !!
Hope this will help and ask for further help you needed.
Your answer
Follow this Question
Related Questions
Mouse-Keyboard Not Working - New User 1 Answer
Assertion failed: Assertion failed on expression: '!GetMainEditorWindow()' 3 Answers
InputField keyboard hide suggestion 0 Answers
how can I make a dialogue system in unity 5? 0 Answers
Textmesh.text: How to change it on playmode with the keyboard like in hierarchy? 1 Answer