[Game Logic] Basic Character Movement, Object Click Action, and Fall Death Sequence

I spent some time learning some pretty basic stuff and I figured I would share what I learned for anyone that wants to quickly implement basic game logic into their character. I saw that most people end up recommending doing at least one of the following things in Python. I wanted to avoid having to go relearn Python again, so I just used the sensors and actuators.

Movement stuff:

  • Keys WS move forward/backwards
  • Keys AD turn the player object
  • Keys QE move the character left and right
  • The spacebar jumps

** motion sensors were rigged to allow simultaneous key presses

Special features:

  • If you click the player object it will turn into Suzanna
  • Falling off the ledge will result in reset/death (some magical use of a timer and ray casting)
  • Camera has logic to overlay GUI and follow player object
  • Can turn cellshader on/off with camera boolean property
  • Mouse wheel to zoom in/out

Newbie friendly explaination for testing (I wish I had this):

  • To test the game logic, open the blend file attached below. Click to play the game in the standalone player from the “Render Panel”.
  • In the “Game Logic” panel for the “Cube” object, you will find all of the logic.
  • These were both left open to be obvious when I last saved the file. This should make life easier.

Anyways, I hope that the file is useful in helping someone get started after learning to do basic modeling.

This was made in Blender 2.72b
Here is the file: [ATTACH]345535[/ATTACH]


Changelog 11-21-2014

  • Added cellshader to camera with a boolean property to turn it off/on
  • Added notes directly into blend file
  • Fixed infinite jump bug
  • Made camera child of ActivePlayer object for auto follow
  • Added Mousewheel zoom in/out

Attachments

testing.blend (709 KB)