How can I spawn items on a timer?
I have a garden I am testing this on, there are 3 different types of plants... They should act how lets say Skyrim plants would where I pick up the plant... I come back later and it has regrown...
I can have the object be there from the start, and can pick it up... But cannot find a way to respawn it after a certain amount of time...
Please help me find a easy way to do this.... I need to be able to use this method throughout the entire world
asked Aug 21 '16 at 06:52 PM in Blueprint Scripting
There are a lot of ways to go about this but:
The easiest/most performant way I would think is: - OnOverlap, disable collision, set visibility to false - Delay time - Reset Collision and visibility
You can also just destroy the actor of course and have a world manager to respawn it. You can teleport it to a "holding" area and put it back after a certain time. And countless other ways.
answered Aug 22 '16 at 04:23 AM
I'm not sure if this is the best way of doing it, but it's how i'd achieve this and pretty simple.
Create a "spawner" blueprint with an array containing the plants you want it to spawn. Have it create the object on begin play. When interacted with (the plant has been picked) it will run back to the spawn node, but through a Delay node and destroy the plant the same way you would've picking it normally (Sorry for the crappy drawing, but basically this)
Follow this question
Once you sign in you will be able to subscribe for any updates here