Spawning decals with triggerbox
I'm kind of new to ue4 and im trying to create a p.t inspired game. I explored the option of teleporting the player back to a duplicated version of the same level. One problem. All matinees, trigger boxes, etc become useless and wont work. Now a solution to this would be to just re blueprint and animate, but that would be a huge blow to work flow. Instead the option im trying to accomplish is just when the player teleports it will also add whatever i need it to add. I also need to know how i would do this say if the player has went in the trigger box 5 times i want it to be a different thing the 5th time.
E.X Player walks through the trigger box for the 1st time. Blood spawns on wall. Player walks through the same trigger box for the 5th time a jump scare occurs. If that makes sense or is even possible.
P.s Thank you for all of your answers or critiques on my horribly written and thought out game.
asked Jun 07 '16 at 10:18 PM in Blueprint Scripting
add a trigger volume, then in the level blueprint add a integer variable called Counter or something like that. Every time the player enters the trigger box, (using the on collision enter or oncollisionexit event) use a switch on int node to check the value of that counter variable, then spawn decals, jumpscares, etc.
if your specific question is how to spawn decals, i think a much easier route would be to have the decals already in the level, uncheck the box in the details panel that says visible, then in the level blueprint you can use a set visibility node to set it to true. The reason id do it like this instead of spawning is because you can scale and rotate the decals first, so you know they look exactly how you want them to before making them visible, and you can turn them on and off whenever you want. hope that helps
answered Jun 08 '16 at 01:14 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here