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"

Destroy an actor from Widget clicked button

I'm trying to destroy an actor after clicking on a widget button option but I don't know what should be connected to "object" in the cast of the blueprint.alt text

Product Version: UE 4.15
errorcast.png (337.7 kB)
more ▼

asked Feb 03 '19 at 01:23 AM in Using UE4

avatar image


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

1 answer: sort voted first

the actor your looking to destroy should be in the object pin. basically you need to have a reference to the instance of the actor in the level. so for example lets say you have 3 trees in your level (tree1, tree2, tree3), you would need to tell the destroy actor node which tree you want to destroy.

im guessing that you dont really understand casting. think of casts like a way to identify an actors class, the object in is the actor to be identified.

oh also your calling your destroy actor on tick so as soon as your widget is created the actor will be destroyed. its not going to work as expected i imagine.

more ▼

answered Feb 03 '19 at 01:32 AM

avatar image

10.1k 33 10 25

avatar image XxsundaexX10 Mar 22 '19 at 02:14 PM

So how would you make a reference to the actual tree you want to destroy from within the widget blueprint?

avatar image Nebula Games Inc Mar 22 '19 at 02:51 PM

You need a reference to the specific instance of BP_Eggs you want to destroy. Check out video #1 on casting if you need to brush up on that and video #25 for creating references. One of those methods should work for you.


Also, as ThompsonN13 said, you need to fix that tick issue....otherwise this will be instantly destroyed.

avatar image XxsundaexX10 Mar 22 '19 at 05:58 PM

Thank you buddy :) Awesome guides for a newbie like myself. Exactly what i needed.

avatar image Nebula Games Inc Mar 22 '19 at 06:01 PM

No problem, happy to help.

(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