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. 

Boolean not being read by character blueprint from widget

I have a spell button implemented inside a widget. When the spell button is clicked, it sets "fire" to true and if clicked again, it sets the "fire" to false. Inside the character blueprint, I have a branch to check if "fire" is true; if it is, it fires a custom projectile. The problem is that the character blueprint always reads the boolean as false and does not fire. Just to make sure the projectile and everything else wasn't the problem, I set the default value of "fire" to true and it fires; so, the widget and the blueprint must not be communicating. Any help would be greatly appreciated. Thank you!

Attached are screenshots of the widget and the character blueprint.

alt text

Product Version: UE 4.13
Tags:
more ▼

asked Feb 03 '17 at 08:46 PM in Using UE4

avatar image

Royal_LostHaven
16 3

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

4 answers: sort voted first

Have you remembered to set the reference to your Cleric Player to a value? You will get accessed none errors if youre attempting to assign a variable through none so thats something to check for just incase, cool.

more ▼

answered Feb 04 '17 at 01:44 PM

avatar image

MonsOlympus
973 37 11 37

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

Are you able to provide an image depiction of your stated answer? I made the cleric bp reference inside the widget in order to set the boolean "fire" to true when clicked. Are you talking about something else? Thank you for responding!

more ▼

answered Feb 05 '17 at 12:58 AM

avatar image

Royal_LostHaven
16 3

avatar image MonsOlympus Feb 06 '17 at 04:27 PM

alt text alt text

Now this might seem basic and straight forward but its possible that you havent assigned a value to the reference to actually be accessing. Its hard to know whats going on with only small cuts of what youre doing.

Typically for a widget in UMG you assign the Character reference to the Owner when you Construct it, obviously you need to check that it actually has a valid reference too.

I highly recommend checking your log and using PrintString to try and find out if your chain of events is actually firing correctly.

newcharacter1.jpg (25.0 kB)
character2.jpg (34.5 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I added a print string to my widget after "fire" is supposed to be set by clicking the button and it doesn't print the string. I double checked the character reference and I'm generating no errors. It has a valid reference to my character blueprint.

more ▼

answered Feb 09 '17 at 02:52 AM

avatar image

Royal_LostHaven
16 3

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

Ok, I'm losing my mind. I set up a test project. With the initial first person character, it correctly referenced the blueprint and everything worked. I duplicated the blueprint and named it cleric. Set the reference inside the widget to cleric and it doesn't work.

more ▼

answered Feb 09 '17 at 02:54 AM

avatar image

Royal_LostHaven
16 3

(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