How to cast actor blueprint in level blueprint ?
i want to make that, if all bottles are destroy then level will complete in given time with bottle count variable. so how to cast actor blueprint in level blueprint
Bottle actor blueprint -> level blueprint ->
asked Mar 24 '19 at 08:21 AM in Blueprint Scripting
Casting is not a method of communication - it's testing whether an object is of specific type and then treating it like so.
If you placed the bottles in the level, there's no need to cast at all. Just drag & drop bottle actors' references into the Level Blueprint from the World Outliner. Have the LB count and destroy the bottles.
answered Mar 24 '19 at 09:52 AM
for the purpose you are trying to achieve casting the actor blueprint in level is not optimal, instead you could use a game instance to set the number of bottles you have destroyed and check in the level blueprint if the number is equal to the number of bottles in level.
you can learn to use game instances from here:UE4 - Tutorial - Game Instances
answered Mar 25 '19 at 09:42 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here