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"

Why I can't click any buttons in my widget?

I've created a "Death Screen" widget, where people can press a "respawn" button. The problem is that i can't click this button.

The cursor is showing but i can't click this respawn button.

This is inside the widget blueprint. alt text

Product Version: UE 4.20
Tags:
untitled.jpg (170.1 kB)
more ▼

asked Aug 26 '18 at 03:44 PM in Blueprint Scripting

avatar image

G1K777
36 3 4 13

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

3 answers: sort voted first
  • make sure you're using something different than Input Mode Game Only

  • check widget hierarchy and see if the root of the widget is set to something other than Hit Test Invisible and the chain of elements that lead to your button allows for the click to tunnel through

more ▼

answered Aug 26 '18 at 04:26 PM

avatar image

Everynone
15.2k 77 25 62

avatar image Everynone Aug 26 '18 at 06:18 PM

Death function connected to "tick"

@G1K777: If your Death function fires on Tick, you're creating a new widget every frame. Do Once does nothing there, when the function goes out of scope, the node resets.

Why do you fire it on Tick, wouldn't it be more efficient and logical to fire it every time the player loses energy? Asking, as you may have other reasons, of course.

avatar image G1K777 Aug 26 '18 at 06:48 PM

Never thought about that, good idea!

avatar image G1K777 Aug 26 '18 at 06:50 PM

It worked! That was the issue, i should have put the death function behind the takedamage function. It works now fine. Could you please tell me how i can stop my plane from moving and disable the input till the player respawns ?

avatar image Everynone Aug 26 '18 at 07:12 PM

Could you please tell me how i can stop my plane from moving

That would depend on what your plane is and how you're moving it. There's like 50 ways of moving things around in UE4.

You can disable input by using Player Controller's Disable Input node and targeting the actor that is handling the input.

avatar image Aidan Puche Aug 26 '18 at 07:28 PM

Why you should use Death function on Tick? You should use a Custom event or function that fires when the player dies, on Player recibe damage, if life is lees or equal to 0, fires the event DEATH. Check in every tick if the player die is heavy cost.

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

Hello G1K777!

Did you check your button's Zorder? Maybe it's the main problem.

more ▼

answered Aug 26 '18 at 04:25 PM

avatar image

Phyrexian_TR
75 1 5 6

avatar image G1K777 Aug 26 '18 at 04:50 PM

I set it to 100.

avatar image Phyrexian_TR Aug 26 '18 at 05:21 PM

Can you try with Print String node in order to debug after pressed node?

avatar image G1K777 Aug 26 '18 at 05:42 PM

I created a simple "ESC Menu", i made a "Quit game" button and it works for some reason. I did the same on my "Death screen widget" and it doesn't work... yay.

FlyingPawn (character) alt text Death function connected to "tick" alt text

d1d12.jpg (124.9 kB)
d1d123.jpg (145.3 kB)
avatar image Phyrexian_TR Aug 26 '18 at 05:54 PM

As I said, you should try it via Print String node for debugging. Maybe cast fails when you are trying to cast to the player. Just unlink all the cables from respawn button and connect to the print string and check it. Maybe button is working but your code is not working.

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

You triying on Pressed? i have this problem and solved with pressed.

more ▼

answered Aug 26 '18 at 05:01 PM

avatar image

Aidan Puche
46 1 2 9

(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