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. 

Is this a correct way of using a blueprint interface?

Hi! For my game I stumbled upon an issue when my player slashed at an enemy. I eventually did a really crappy workaround where I made a variable called "Attacking" and made it true for 1/10th of a second, and if the player overlapped the enemy while slashing and that variable was true then it ran the hurt/hit function.

So what I did recently was create an interface called "Attacking" and implemented it onto the player and all the enemies. Inside I placed a function called "Slashing". In the slash event for the player I made it so that it fired that function for every actor that has it implemented, and then inside of the enemy's bp it would check if the player is within range, and if it is then do the hurt/hit.

Would this be a correct way of using an interface? Is this any costly? The reason why I didn't have the player just cast to the enemy and fire the hit event manually is for a few reasons, but I think that's besides the point :)

Thank you!

Product Version: Not Selected
Tags:
more ▼

asked Apr 22 '15 at 03:17 AM in Blueprint Scripting

avatar image

jfaztk
331 46 63 73

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

0 answers: sort voted first
Be the first one to answer this question
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