Jump to content

Replace player input with AI


aprime

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!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...