- Home /
Input.GetButtonDown not working at ALL
well I tried to make a script that when you hit the number 1 button it spawns a bomb. I know how to spawn and stuff, and i know how to use Input.GetButtonDown (usually). I first created a new Input button called Number1 and made the positive button the number 1 button. but when i hit 1 nothing happend, so i tried to see if even this script worked:
function update() { if (Input.GetButtonDown ("Fire1")) { print("Hit"); } }well little to say it didnt work, i also tried Input.GetKeyDown and it didnt work either, what am i doing wrong?
Answer by Eric5h5 · Mar 12, 2010 at 06:43 PM
Your function is called "update" instead of "Update", so it will never run unless you specifically call it. If you're polling "Fire1", then your entry in the input manager should also be called "Fire1".
Nah, we've all done it... In particular, I've tried every combination of onGui, OnGui, OnGUI... At least, I think we've all done it - O$$anonymous$$G, what if I'm the only one? :(
Your answer
Follow this Question
Related Questions
Quirk in Input.GetAxis 0 Answers
Multiple Players on one Computer/Console 5 Answers