- Home /
Question by
Kiwi2703 · Feb 07, 2014 at 05:11 PM ·
javascriptjumpingenabled
Need to forbid jumping from another script
Hi there :) I need to restrict the player from jumping when a certain function is called. I'm using the original FPC Character motor script, but I don't know how to acces the "enabled" boolean under the jumping category. Can someone help me with this please? Thank you!
Comment
Thanks for the link, robertbu, but I've read those already and I know how to use GetComponent and GameObject.Find. However, I can't seem to access the jumping value from the original Character motor script. Even when I rewrite the "true" to "false" at the jumping enabling variable in the script, I can still jump. Only way to disable it is via clicking the "enable" checkbox in inspector with the script selected.