looking for simple examples of messages, states

I was looking for some very basic examples of messages or states scripts. Prefereably both. Something as simple as:

keyboard press -> move cube forward, or print “hi”, or anything showing how to use it at its most basic form

Any help is appreciated

Well this is a really basic script that sends messges from cube01 and the received messages affect cube02 and 03.

Cube01 has a script that prints when the up arrow is pressed with 2 different ways to access the subject in a message logic brick.

Cube02 receives the message via logic brick and moves the object.

Cube03 has logic rotating the cube positive z axis and executes a script when a message is recieved rotating the cube -10 on the z axis.

exactly what i needed. One question about this part…Is there a way to send either of the messages to everything ( all objects). And whatever is listening for the message will do whatever when it sees it.

Yes a message actuator will broadcast to everything if you do not set a target object. Then just use a message sensor and listen for the subject.

ill try it :smiley:

I have two video tutorial series that cover the development of relatively simple games:

Turret Defense and Tunnel Runner

So, if you’re a beginner, and you’re looking for a fairly detailed introduction to the BGE, I think you’ll find it helpful.