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 make disappear a box when a projectile hit this box?

Hi! I'm Marta and I'm totally newbie in this software. Actually, I'm studying Audiovisual design in Barcelona but I have a subject which I'm learning a bit of ue4.

The thing is... I want a box (or something) that disappears when a projectile hits the box.

I know how to make disappear a box with a trigger when the character is near, but I don't know how to attach the concept of make something disappear to the projectile.

Any advise of how I can approach this would be helpful, thx

And sorry for my english I'm Spanish

Product Version: UE 4.10
Tags:
more ▼

asked Mar 29 '16 at 07:11 PM in Blueprint Scripting

avatar image

martanm17
1 1 2 1

(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

Hi!

You can applay DestroyActror to your objects.

I use First Person Template for example.

1 Create FP project.

2 Select all cube objects in scene and add Tag "Destroy"

alt text

3 Open FirstPersonProjectile blueprint

alt text

4 Add these nodes

alt text

dest01.png (321.7 kB)
dest02.png (438.3 kB)
dest03.png (399.9 kB)
more ▼

answered Mar 30 '16 at 08:07 AM

avatar image

svv3dUDN
8.4k 254 37 396

avatar image martanm17 Mar 30 '16 at 10:15 AM

1 question more! If u let me.. hehe Do you Know how to spawn an infinite number of boxes on a random area ??

avatar image NC3D Jan 11 '19 at 03:05 AM

This was great and worked great for objects created in UE4 but I cannot seem to get it to work with object I have imported with Datasmith. Any help is greatly appreciated!

(comments are locked)
10|2000 characters needed characters left

THANKS!! You saved my life haha. I know that these questions are ridiculous but I'm learning...

Thanks a lot!!!

more ▼

answered Mar 30 '16 at 10:12 AM

avatar image

martanm17
1 1 2 1

(comments are locked)
10|2000 characters needed characters left

For a quick example, begin with first person shooter template. The projectile blueprint has a spherical collision component, so you can use the On it event. In this template the effect of hitting something is adding a force

alt text

if you want to destroy the actor instead, you can call the Destroy Actor function applied to the 'Other' pin on the Hit Event. This would destroy ANY actor it touches, and as this is not what we want to do I would suggest that you make a new blueprint with 'Destructible Actor' as parent, and name it something unoriginal like 'DestructibleBox'. Then add a static mesh component and set it to 1M_Cube (or anything that makes you happy). Tick 'simulate physics' for the static mesh so it can fall to the ground if you spawn it in mid air, and drag some of them on the level map.

If we play the game, they should react just like the normal ones, because no logic has been implemented yet. To destroy only the destructable actors with our projectiles we must do something like this:

alt text

(notice that now the pin used from Event Hit is 'Other' and not 'Other Comp.') With this, if our projectile hits an actor, it will first check if it is destructible, and if so destroy it, and after any result self-destruct.

Here, some before-after pics

alt text

alt text

Hope to be useful

sin título.png (361.7 kB)
sin título 2.png (292.4 kB)
sin título 3.png (847.2 kB)
sin título 4.png (841.7 kB)
more ▼

answered Mar 31 '16 at 01:44 AM

avatar image

Fry'd_chipz
31 1 3

(comments are locked)
10|2000 characters needed characters left
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