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. 

Simple Question

Hello, i want to connect these two connections. If you know, please show me how to. I tried to create a boolean but in the widget they don't recognise it. Create an event seems complicated

alt text

Product Version: UE 4.11
Tags:
more ▼

asked Mar 12 '18 at 06:54 PM in Blueprint Scripting

avatar image

f-WARL0CK-m
1 1

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

2 answers: sort voted first

Creating event / blueprint interface isn't complicated. it's the simplest way to do ut.

more ▼

answered Mar 12 '18 at 07:09 PM

avatar image

Dark Energy
22 3 4 10

avatar image f-WARL0CK-m Mar 12 '18 at 07:28 PM

can u show me with blueprint please

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

There's definitely a few ways you could handle this. Since you are trying to have the score become visible from the Character, let's stick with that for now, to be simple.

  1. In EvilCharacter, it needs a reference to that overall widget that you show on the right side of your picture. (Score).

  2. Once you have that reference to Score inside Evil Character, call a function or event inside Score that is passing in the Score_Number object as the target of the SetVisibility function.

That way, EvilCharacter doesn't need to worry about the Score_Number variable, only Score does.

There's definitely a few ways to handle it, depending on the scope of the game, but if you're just looking for simple functionality, that should do the trick.

more ▼

answered Mar 12 '18 at 07:38 PM

avatar image

Shane Gaffney
6 1 1

avatar image f-WARL0CK-m Mar 12 '18 at 08:00 PM

thanks for responding me but an image would be appreciable please

avatar image Shane Gaffney Mar 12 '18 at 08:35 PM

Step 1: Inside of the character, salt texttore reference to the widget

avatar image Shane Gaffney Mar 12 '18 at 08:36 PM

Step 2: Inside of the character, call a function inside the widget (using the widget reference we just stored) alt text

avatar image Shane Gaffney Mar 12 '18 at 08:36 PM

Step 3: Inside widget, put whatever logic (e.g. set visibility) you want to happen to the widget componentalt text

widgetfunction.png (220.8 kB)
avatar image Shane Gaffney Mar 12 '18 at 08:38 PM

There's definitely many ways to do this, but you asked for the simplest way to go about it. If you were looking to challenge yourself, one direction you could take with this is to set up an event dispatcher has a bunch of events tied to it, and call it whenever the relevant logic happens.

For example, an event dispatcher that is tied to when a score should increment would call the score increment, a sound effect, and a visual effect. Event dispatchers/delegates make your life a lot easier.

avatar image f-WARL0CK-m Mar 14 '18 at 01:25 PM

Thanks for your support, what is suposed to be "Player Hud Widget Ref" ?

avatar image Shane Gaffney Mar 14 '18 at 02:53 PM

That's the equivalent of the widget that you have called "Score".

avatar image f-WARL0CK-m Mar 14 '18 at 08:01 PM

i can't call him. alt text

scorehud-ref.png (304.8 kB)
avatar image Shane Gaffney Mar 14 '18 at 08:37 PM

So, inside your Evil Character blueprint, you need to create a NEW variable, that is a reference to the score widget. My initial picture was a little unclear what to do with the return value after creating the widget, so that's my mistake. This next picture shows that you are very clearly setting a new variable reference.alt text

avatar image Shane Gaffney Mar 14 '18 at 08:38 PM

When you create the Score variable inside the Evil Character blueprint, it will need to a variable of type "Score". You can then name the variable whatever you want as long as it is of type Score.

(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