Jump to content

Recommended Posts

I would like to replace the player mouse/keyboard input with an AI to drive playing the game.  A few things I have tried are to calling various TheInput methods (OnControl,OnMouseButton,OnRawKey) but calling these methods don't seem to do anything.  For example I was expecting the call below to cause the character to move up but this doesn't seem to do anything.

 

TheInput:OnControl(CONTROL_MOVE_UP, true, 1)

 

I can place print statements inside of these input.lua methods and see that they are being called and that I am passing in the same values that get sent in when signals are sent from the mouse/keyboard.  Am I on the right path or should I be following a different approach?  Help would be much appreciated!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...