Game Development Reference
In-Depth Information
Figure 5-18. Actor Attribute creation
NOTE: When you create actor attributes, each implementation of the
actor will have their own values in the actor attribute. Thus, if you plan
to have carrots, you don't have to create 10 game attributes. Or if you
have a dynamic number of actors (if they are spawned, for example)
you can store values specific to each actor implementation on the
scene.
Create a new group and name it ''Movements.''You will use this group as a
container for all the behaviors that define the movement.
Drag and drop a Change Attribute behavior into the group and change
Carrots.InitXtoCarrots.Position.X. Drag and drop a second Change Attribute
behavior into the group and change Carrots.InitY to Carrots.Position.Y. The
initial position is now stored in two attributes.
NOTE: The Change Attribute behavior only happens once. In contrast,
theConstrain Attribute updates the attribute value on a real-time basis.
 
Search WWH ::




Custom Search