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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Blueprinting: How do i spawn a BP by key Press?

Kind of a noob question, but i am setting up an Ai, i made a health system that allows a collision sphere (damage sphere) that is attached to the playable characters blade, and it decreases health/kills Ai player, but the problem is i have the collision sphere attached to the blade weapon on the playable character, and i just want it to be activated when you press a key (Left Mouse) and deactivated on key release. for some reason i cannot figure this one out. thanks in advance!

Product Version: UE 4.22
Tags:
more ▼

asked May 13 '19 at 03:11 PM in Using UE4

avatar image

Connormcfarland
29 4 10 14

avatar image Nebula Games Inc May 13 '19 at 03:25 PM

I am a bit confused, are you spawning an actual "visible" sphere on the end of the blade weapon that is a separate BP from the blade weapon? Because a "collision sphere" usually isn't a blueprint all by itself....I mean it can be but that would seem kind of pointless for this scenario. If you just want the blade weapon to become "active" and able to deal damage during a key press than you should simply toggle the collision settings of the sphere on key press. Collision will be off until you press a key then it will be active, on release it goes back to the off position.

avatar image Connormcfarland May 13 '19 at 03:38 PM

Honestly im a bit confused my self ahaha. but that actually sounds more of what i am looking for. i just want the blade to become active to deal damage then not active when your not swinging. any tutorials on this or anything like that? thanks so much for the response by the way, seems i rarely get responded to on here!

avatar image Connormcfarland May 13 '19 at 03:44 PM

I dont see anything that will turn collision on/off? is it a node or how would i set that up? again, im a bit noobish to this so i REALLY appreciate your help and time!

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

1 answer: sort voted first

Well in that case might I simply suggest an alternate approach? You don't really need to turn collision on and off to have your blade deal damage to the enemy. All you need to do is create BP that has the blade with a collision sphere or box might be better, use an overlap event, cast to the AI and deal the damage. If you are truly new to all of this, a few basic tutorials on overlap events and casting may be of use before trying to implement this further so you have an idea of what I am talking about. You can check out this video I created on overlap events

https://youtu.be/oAEs-BTliT4

and this series I made for those with little to no programming background who want to learn blueprints (I started without knowing anything myself so the pace and style is different than most tutorials. I think you will find it helpful)

https://www.youtube.com/playlist?list=PLyu-W38DvZhqByAoeva1jewB5s78zQHIy

more ▼

answered May 13 '19 at 05:02 PM

avatar image

Nebula Games Inc
5.3k 27 9 14

avatar image Connormcfarland May 13 '19 at 05:20 PM

Thank you VERY much. Ill check all of this out. I have been using UE4 since the day it was released for free. I picked it up as a hobbie. I understand a lot about UE4 but i just never had any schooling so it seems i just understand light basics so far. But again, thank you. Very helpful.

(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