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 to make objects respawn over a period of time?

alt text

Im trying to make this object respawn once destroyed with destructible mesh, any advice

Product Version: UE 4.19
Tags:
screenshot-41.png (650.4 kB)
more ▼

asked Jun 13 '19 at 01:52 PM in Using UE4

avatar image

BluAstronaut
6 2 5

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

1 answer: sort voted first

Create an actor with destructible mesh and use an event timer to count down. When the timer is up, set the destructible mesh again - this will reset it.

more ▼

answered Jun 13 '19 at 09:08 PM

avatar image

Everynone
15.2k 77 25 62

avatar image BluAstronaut Jun 14 '19 at 06:43 AM

thanks, could you elaborate im having some trouble

avatar image SupDeity Jun 14 '19 at 06:50 AM

do you want the actor to spawn at the same location?.

i think this is what everynone is saying:

1-) create a actor with destructible mesh. (i guess you know how to do this part) 2-) Use Something like on Event BeginPlay -> Set Timer By Function Name (i think that is the name of the function. you will find it once you search it.) 3-) Create a function which spawns the actor back again using spawn actor. 4-) copy the name of this function and put it in the Set Timer By function name's Function name field.

edit: btw the actor is probably going to be destroyed so do this somewhere else like in playercharacter bp(do not recommend. you can do that but i dont do these things in the player character. i would personally do it in the level bp.)

avatar image Everynone Jun 14 '19 at 09:26 AM

There's no need to destroy the entire actor even though it would, of course, work. It's enough to reset the destructible mesh component.

alt text

Just ensure the Add Destructible Component has the same settings as your original mesh.

Image from Gyazo

capture.png (219.0 kB)
avatar image BluAstronaut Jun 14 '19 at 12:46 PM

wait do I do these blueprints in the world blueprint?, and yes I do want it to respawn in the same location, thank you for your help

avatar image Everynone Jun 14 '19 at 01:33 PM

No, as I said in my original answer, create an actor and give it a Destructible Mesh Component. This way each actor can have its own timer, and its own additional functionality if so desired.

You can then drag these actors from the Content Browser into the world.

avatar image BluAstronaut Jun 14 '19 at 11:16 PM

only one more thing, how do I create a destructible mesh component?, I can do everything else so that's all. Thanks for your help

avatar image Everynone Jun 15 '19 at 08:49 AM
  • create a static mesh in a modelling application of your choice

  • import it into your project

  • right click in the content browser and Create Destructible Mesh

alt text

  • if you do not see the above option, check this out

  • open the created destructible mesh and fracture it, apply any settings that you may need, save

  • create an actor and add Destructible (second from the bottom):

alt text

  • assign it the destructible mesh created above

untitled.png (44.5 kB)
destr.png (25.0 kB)
avatar image BluAstronaut Jun 15 '19 at 09:44 AM

thank you

avatar image BluAstronaut Jun 15 '19 at 10:40 AM

my real question is how to you get the 'on component fracture' node, I just cant seem to find it, thanks and sorry for not understanding im a noob

avatar image Everynone Jun 15 '19 at 10:54 AM

alt text

Btw, if you do not need the extra functionality the Timer provides, you can just use a Delay node for this.

untitled.png (120.6 kB)
avatar image BluAstronaut Jun 15 '19 at 10:42 PM

holy crap thank you I would never of figured this out myself

avatar image BluAstronaut Jun 17 '19 at 07:39 AM

This isnt workingalt text

screenshot-55.png (238.5 kB)
screenshot-56.png (804.8 kB)
avatar image BluAstronaut Jun 17 '19 at 08:05 AM

nvm figure it our sorry, thanks for the help kind stranger!

avatar image BluAstronaut Jun 14 '19 at 10:55 PM

ok, thanks

(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