x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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... alt text

Please help me find a easy way to do this.... I need to be able to use this method throughout the entire world

Product Version: UE Github Master branch
Tags:
garden.png (410.9 kB)
more ▼

asked Aug 21 '16 at 06:52 PM in Blueprint Scripting

avatar image

angelicpyro143
1 3 4 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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.

more ▼

answered Aug 22 '16 at 04:23 AM

avatar image

VictorBurgos
2.4k 60 27 112

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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) CrappyDiagram

diagram_01.png (40.2 kB)
more ▼

answered Aug 21 '16 at 07:09 PM

avatar image

RhodeKyll
28 3 2 6

avatar image angelicpyro143 Aug 21 '16 at 10:26 PM

Well inside of my "interact" type section... I delete actor on Pickup.... So i think that, would get rid of the blueprint.... But I will try to find a work around

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question