Page 1 of 1

key bind

Posted: July 17th, 2009, 12:55 pm
by MARCochern
Hello,

I'm new to Sandbox and I need help in key binding.

In my game, my RC character is able to punch (credits to GoBologna120 for the animation file), but I'd like to know how to bind that attack action to a key on the keyboard or mouse, like how the player was able to throw fruits when pressing the left mouse button in "the Exciting Adventures of Master Chef Ogro".

I read the wiki and by refering to a few script examples, I tried the commands bind and onrelease. But I think I need to understand more on how it works, because ,my attempts failed (no surprises here)

Can anyone please help? Thanks!

Re: key bind

Posted: July 19th, 2009, 6:06 am
by Mike
I've hopefully adequately answered this in e-mail. Essentially he would need to replace the ogre model with the rc model in rpg.cpp. If that alone doesn't work we'll have to dig deeper into it. Take care.
-mike