Game Development Reference
In-Depth Information
Figure 7-36. Reset the number of attempts left after a level up
Also, you need to replace the interpolate behaviors in the Back to position rule
because they could trigger an unwanted collision with blocks when going back
to slingshot position. You will use Change Attribute behaviors instead.
Remove the two Interpolate behaviors from the Back to Position rule. Drag and
drop two Change Attribute behaviors and change the settings to the following
(shown in Figure 7-37):
Projectile.Position.X to game.InitialProjectileX
Projectile.Position.Y to game.InitialProjectileY
Last, you need to modify the dummy projectile. It will re-appear when the
number of attempts is reset.
Open each of the dummy projectile instances and expand the Otherwise section
of the existing rule. Drag and drop a Change Attribute behavior in the Otherwise
section and change Dummy Projectile.Color.Alpha to 1. This will make the trick
work.
Hit the Preview button to play with the projectile.
Search WWH ::




Custom Search