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 Hud button do attack. or solve delays funcitionn

Hello, Please someone help me I'm new on Unreal engine. and im trying to create a rpg for mobile. so so far i have already created a character with walkrun/jump/attack animations. it also have particles. i have tried a variations of approach but not every thing works. the only thing works was to made a function and use it on the onclick of the buttons. but the problem is it doesnt have a delay funtion unlike the main blueprints. alt text

alt text

alt text

if i put the attac inside a function there will be no delay so the particle and the animation will not blend smoothly. any one can know how to solve this?

Product Version: UE 4.20
more ▼

asked Nov 27 '18 at 03:35 PM in Blueprint Scripting

avatar image

3 2 1 4

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

1 answer: sort voted first

if you want the widget to call the attack script that you have in the character bp then create a custom event (attack), connect the custom event to the branch node you have, then in the widget call the custom event when the attack button is pressed.

more ▼

answered Nov 27 '18 at 04:31 PM

avatar image

10.1k 33 10 25

avatar image LucentStar Nov 29 '18 at 08:21 AM

im new at unreal engine so.. it would hepl if you can elaborate it..? Where do i do the custom event and how to i branch it on a node on bp.. all answer i find was same as yours.. but i hardly understand it.. because im new. but thanks for the answer..i really appreciate.

avatar image ThompsonN13 Nov 29 '18 at 06:05 PM

speaking of hard to understand, it hard to decipher what your attempting to say.

as stated above you create a custom event in the character where you attack script is. to create a custom event you need to right click the graph and search for custom event. the you need to connect the custom event you created to the rest of your script. you can attach it to the same place as your current event in the character bp, meaning connect the custom event to the branch node you have.


then in the widget you need to call the custom event in your character when the button is clicked. select the button component, then in the details panel scroll to the bottom and press the green button which says on clicked to create a on clicked event. no drag off the on click event and search for cast to thirdperson character (or whatever your class name is), then drag off the object in pin and search for get player character. this gives you a reference to the character currently possessed by the player. now you can drag off the "as thirdpersoncharacter" pin on the cast and search for the custom event you made earlier, then connect the execution pin (the white one). this will result in when the button widget is pressed the custom event in the character will be fired.

its pretty simple and youve done most of it before with the jump script you have shown. if you need more help though let us know and try to be a bit more clear about what your saying so we can understand.

avatar image LucentStar Dec 04 '18 at 07:43 AM

Thanks I have done it not on events but on funtions.. i cant work on event u dont understand how it works when connecting umg to blueprint event. but funtion works fine for now.. thanks for your 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