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"

Variable name of class

Hi.

I have a simple question.

Is it possible to have a variable in level blueprint with name of class? I need to get all actors from class which I am interacting with.

Thans in advance.

Product Version: Not Selected
Tags:
more ▼

asked Apr 02 '15 at 09:53 AM in Blueprint Scripting

avatar image

spyrka
3 2 5 6

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

1 answer: sort voted first

If you need "All Actor from Class" then there is a really nice function. It is called "Get All Actors from Class" and it returns an Array. You can then (if you haven't created a variable(array) already) pull out the return array and chose "Promote to variable". Then it will create a variable of the return type for you (:

more ▼

answered Apr 02 '15 at 09:58 AM

avatar image

eXi
6.9k 333 186 472

avatar image spyrka Apr 02 '15 at 10:08 AM

Thank you for the answer, eXi :)

  1. Click on object

  2. Get the class of clicked object

  3. Get all actor from that class

That is what I want to do in my level BP. I can't doing this individually for each BP class, because with 5 and more classes there won't be place for it ;)

Is it possible to get that? Or maybe there is some better solution?

avatar image Narghile Apr 02 '15 at 10:32 AM

What do you mean there will not be the room?

Sorry

Narg

avatar image spyrka Apr 02 '15 at 10:48 AM

I don't understand.

I just want to doing this more automatically. I don't want to have much work every time I add new blueprint class.

If I would do C++ scripting I suppose it would be possible to have a string variable (for the name of clicked class) which specifying class for further operations.

avatar image eXi Apr 02 '15 at 12:19 PM

I don't remember a way to just click a class and get its name.

The only way you could make this more efficiently is by making an array of classes and using a for each loop combined with the Get All Actors node and an Array of Arrays of Actors.

But i don't see the needs.

Do you use blueprint classes of different baseclasses or are these "new" blueprint classes a child class of something? Because if you get the base/parent class with the "Get All Actors", then you would also get the child classes if i'm not mistaken.

This way you could have x amount of different child classes, but still only use one Get All Actors Node for the base class.

avatar image spyrka Apr 03 '15 at 02:52 PM

You can see the details of what I want to do here, there are some screens also :) https://answers.unrealengine.com/questions/204556/objects-identification.html

avatar image CrashAngel Aug 17 '15 at 01:58 PM

Hi, I wonder if it has as I can see the content of this page?

I need to make a code where I find all the variables of a class BluePrint ...

if not, could you tell me a little more where research to develop this ??

avatar image CrashAngel Aug 15 '15 at 05:15 AM

Hi, I wonder if it has as I can see the content of this page?

I need to make a code where I find all the variables of a class BluePrint ...

if not, could you tell me a little more where research to develop this ??

avatar image spyrka Aug 17 '15 at 02:13 PM
(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