Game Development Reference
In-Depth Information
Open up our
Gun
actor. We are going to create a new
Rule
; it will have three
conditions to the rule (for
Shoot Left
) and they are as follows:
•
Attribute
|
game.GunCollected
|
is true
•
Actor receives event
|
key
| (whatever shoot button you want) |
is down
•
Attribute
|
self.graphic.Flip.Horizontally
|
is true
Now drag in a Spawn Actor behavior into this rule, select the
GravRound
actor,
Direction
:
180
,
Position
:
-25
. Copy and paste this rule and change it so flip is
false
,
and the
Direction
of the Spawn Actor is
0.0
, and
Position
is
25
:
Test it out to make sure he's shooting in the right directions. When developing for
a while, it's easy to get tired and miss things.