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. 

Blueprint Communication not possible with same class?

I can't seem to access variables from another instance spawned from the same blueprint class, the "All Actions" menu only allows me to get the variable from the local instance.

I have a blueprint class, let's call it "Basic Unit" ( a unit which is a parent class for other units, friendly and enemy). When these run into other things, I get the hit result and cast it to "Basic Unit". I want to get a simple value from the hit object to determine friend or foe - but the hit object is another instance spawned of the same blueprint class, obviously. The context menu doesn't allow me to select the variable, only the local "get XXXX" which doesn't allow me to pass in a parent object / target reference.

I imagine this is because the editor is trying to "help" me because seeing it in there twice could be confusing. In C++ this would be no problem, but this project is in blueprint.

Product Version: UE 4.7
Tags:
more ▼

asked Jul 23 '15 at 03:08 AM in Blueprint Scripting

avatar image

Ccoffee
1

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

1 answer: sort voted first

Personally, I would use an interface and a variable for this. Create a boolean variable 'Friend'. Set it true for friends, false for foes (obviously). The interface would then take your instance as a target, and call the function that would return the variable. No casting should be required.

more ▼

answered Jul 23 '15 at 04:09 AM

avatar image

RAVaught
699 44 28 68

(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