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"

Widget switch won't change index.

Trying to make the hud appear different depending on what/where you click. For some reason my widget will not switch. The index is set in player controller and then the controller calls the event which takes that number and sets it to the new index.

It's saying "accessed none"

Code

Any help appreciated, thanc.

Figured it out; instead of using the hud as the reference, I had to use the widget switcher as a ref. Then change it all in the player controller. Instead of changing the variable in player controller then calling for it in the hud.

Product Version: UE 4.21
Tags:
more ▼

asked Apr 06 '19 at 05:24 AM in Blueprint Scripting

avatar image

PerCat
39 1 3 7

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

1 answer: sort voted first

You should use GetOwningPlayer instead of setting a new controller variable. Ensure that "Owning Player" is set when you call "CreateWidget".

more ▼

answered Apr 06 '19 at 09:17 AM

avatar image

GarnerP57
936 3 4 8

avatar image PerCat Apr 06 '19 at 04:09 PM

That wouldn't work cause I need to pull the new index from the player controller

avatar image Everynone Apr 06 '19 at 06:15 PM

What Garner said should work. If you don't want to do that, why not Get Player Controller and cast? Do you need to set a controller reference? It's what causing you problems here, the ref is not set properly, or at all.

avatar image PerCat Apr 06 '19 at 07:49 PM

Figured it out; instead of using the hud as the reference, I had to use the widget switcher as a ref. Then change it all in the player controller. Instead of changing the variable in player controller then calling for it in the hud.

(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