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"

Toggle Visibility of a Component in another blueprint?

Hey, i wanted to make it so when you walk over the bow on the ground it picks it up, but toggling the visibility does not seem to work to the FirstPersonCharacter blueprint. However it makes the bow on the ground vanish which is correct.

The selected nodes are from when i tried getting the tag name.


So then i am using the child index which i am assuming is this (i can't find anything online):

Tags and index

I was going to set the visibility to nothing on level start, however i cannot seem to find any event to do so. (Event Level Reset does not seem to trigger)

Visibility off on level start

So, i guess there is two questions. Why won't the component with the tag "Bow1" and index "0" not toggle or be found? And how can i specify that a component is not visible by default when the level starts?

EDIT: Seems like blueprint access is null, even though i can get variables from it.

I tried: Get Bow Blueprint > isValid and it says it is false. Any idea's?

Product Version: UE 4.9
more ▼

asked Apr 27 '16 at 06:16 PM in Blueprint Scripting

avatar image

5 2 6 8

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

2 answers: sort voted first

Since you are using the FirstPersonCharacter blueprint, you could use Overlap instead of event hit, then use the below BP to set the visibility of the component on your character. You will need to set the bow on grounds collision to overlap all instead of block all though.

Full Res: http://i.imgur.com/J6a1E4x.jpg alt text

Then turn off the BowOnGround actors visibility the same way.

Full Res: http://i.imgur.com/CM2Z4lJ.jpg

alt text

To answer your other questions, you can set component tags seperately from your actor tags, click on a component in your BP, scroll down to tags on that and you will see a Component Tags array under Tags.

To specify a component isn't visible on start can be done a couple ways. Turn the uncheck the visibility toggle on that component in the blueprint or use an Begin Play event to turn it off in the same manner we turn it on in the above scripts.

Does that help?

more ▼

answered Apr 27 '16 at 08:02 PM

avatar image

713 23 15 45

avatar image HaxO Apr 27 '16 at 10:35 PM

Accessed none typically means that the actor you are trying to reference doesn't exist. Either it hasn't been created yet, has already been destroyed, or isn't being accessed correctly.

Is your HUD a User Widget?

If it is, try using a GameMode blueprint as a middle man between actors and the widget. Game mode tends to be much easier to directly communicate with, and the widget can access it easily as well.

First create a GameMode BP and create the variables you want to keep score with.

Then in your player cast to your game mode and set up the score logic. Here every time I press T it should increase the Bomb Kills score by 10.

Full Res: http://i.imgur.com/0RwboOV.jpg

alt text

Next, on the text comonent you want to update in your widget click the button that says 'Bind' next to the display text box and click Create Binding. This will make a funstion in the graph tab. Inside the function cast to your game mode again, get the variable you want to display, convert it and plug it in.

Full Res: http://i.imgur.com/1mNLaTZ.jpg

alt text

avatar image ABkayCkay Apr 28 '16 at 12:37 AM

That worked, i used FirstPersonGameMode which was already made. However i didn't do the second part, i don't quite understand it to be fair (what it is doing).

However i managed to go my own way around it by just setting the string in the HUD blueprint after i had set the integer in the BowBlueprint

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

Hey, i got past that issue. Playing around got me around it. However, i am now facing the issue of Accessed None.

alt text

Its on the set Int DrawText, i am getting FirstPersonHUD by direct access and then setting the integer however it does not seem to find set it. Even though it is clearly finding the var.

alt text

Any idea why its failing to set the integer ? Errors:

alt text


more ▼

answered Apr 27 '16 at 09:40 PM

avatar image

5 2 6 8

(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