Game Development Reference
In-Depth Information
Select the barlife_blue rectangle in the 3D view. Add the next logic bricks as
Message ( Sensors ), And ( Controllers ), and Acion ( Actuators ). Connect them ater
wriing some input values in the blanks in Actuators :
The value of Subject in Message is -25 for the Sensors bricks. Only the
messages with this value have efects in the connecions. Choose Play in the
Actuator panel, and select which moion was created in the Dope sheet to
decrease the life bar in the drop-down list.
What just happened?
We have inserted certain properies in the game in which we can play with variables,
that is, send messages, to numerically change the properies of the objects. In our game,
we changed to a lower value of our character's life when a collision occurred. If you crash,
you lose some life, is it true? Here are some guidelines to do it:
Create a simple life bar model
Scale it in one axis with moion, insering the change in keyframes 1 and 100
Create a Property game called LifeP
Search Nedrilad ::

Custom Search