Game Development Reference
In-Depth Information
ation or in air idle animation. Using the Set Flipbook node, we can easily control
which animation is displayed for which Target flipbook animated component.
• To be able to detect overlap events with the other components of other actors (the
collectables and laser are components of the levelLayout actor blueprint), you
will use the OnComponentBeginOverlap node, which is meant to detect the
overlap of other actors or components with the current component, that is, the
CapsuleComponent in this case.
• I used two Branch nodes (if statements) to detect whether the overlap was with
Component Has Tag of collectable or Component Has Tag of laser . And based
on the result, I execute several steps. If Component Has Tag of laser , I will use
an Open Level node to reopen the level again, or in other words, restart the level
(you can also show a lose screen as we did in Chapter 4 , Advanced Game Content
Generation with a Fruit Chopper Game ).
However, if OnComponentBeginOverlap has overlapped with Component Has
Tag of collectable , then I'll set the visibility of the other component (the collect-
able) to False (to hide it. I don't like the idea of destroying an instantiating object
as it is never a good idea for game performance; we call it Pooling.)
Search WWH ::




Custom Search