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"

How to create a variable to be called in other blueprints from the BP interface

I want a global value for score that can be increased by several different triggers. All of these triggers would need BPs to call and update the Score variable that would have to be the same across all of them. As I understand it you have to use the BP interface to create global variables but I can't seem to find anything that actually explains how to do it.

Product Version: UE 4.8
more ▼

asked Jul 30 '15 at 07:06 PM in Blueprint Scripting

avatar image

11 3 4 6

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

1 answer: sort voted first

There no global varables in blueprints, you need to use class that is more global, so either GameMode (if oyu do singlep player only) or PlayerController, then you can access it via normal get functions for used game mode or player controller and cast it to your class. To access variables from other object, you pull link from object pin and drop it to empty space of blueprint, in context menu you will have Varables category and there where all "set" and Get" nodes to all variables of the class of object.

Blueprint interfaces are for relate unrelated classes (make type from common functions of the 2 or more classes), lot of people in UE4 community misunderstood them for means of communication between blueprints

more ▼

answered Jul 30 '15 at 08:06 PM

avatar image

37.3k 936 172 1116

avatar image NJHourigan Jul 31 '15 at 07:51 AM

Okay I think I've opened the gamemode blueprint but I don't know how to create the class to store the score in alt text

screenshot (1).png (151.6 kB)
avatar image Shadowriver Jul 31 '15 at 02:55 PM

Click "Open Full Blueprint Editor", also remeber to set your GameState class in GameMode, so GameMode will use it, if you don't have your own GameMode you can set that in Project Configuration

(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