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"

[BUG]Get length not working propably in constrcution script

I created a blueprint script to count the number of actors of a certain type in the scene, however it's not working in construction graph.

but if I created the same blueprint inside the event graph onEventBeginPLay , it works

through debugging, I realized that get Length not give the right value.

Engine version 4.7.5

alt text

Product Version: Not Selected
capture.png (271.5 kB)
more ▼

asked Apr 17 '15 at 08:58 PM in Bug Reports

avatar image

Omar Vector
445 16 16 29

avatar image Omar Vector Apr 17 '15 at 11:42 PM

any help?!!

avatar image Omar Vector Apr 19 '15 at 04:21 AM

Did I do something wrong in the blueprint to not make it set the right value?

avatar image Ben Halliday STAFF Apr 20 '15 at 06:35 PM

Hi Omar,

I tested this in 4.7.5, but was not able to reproduce this behavior. When I set the variable in the construction script, it gets the correct number of Blueprint Actors of the Class specified. Are you spawning these actors into the level during runtime, or are they already placed in the level? Are you able to reproduce this in a new project with new Blueprints? If so, can you upload a test project somewhere and get us the download link so we can check it out? Thanks!

avatar image Omar Vector Apr 21 '15 at 12:47 AM

thanks for reply,

1-I already placed the Actors in the level, 2-I'm able to set the right value in event graph not the Construction graph "that's why I can't understand ". 3-I can't upload the lvl since I've very low speed internet connection ."I'm really sorry for that"

however, thanks for respond, I'm really appreciate Epic's Staff and how they suffer to make everything up to date.

thanks again.

avatar image Ben Halliday STAFF Apr 21 '15 at 03:38 PM

After compiling, if you hover over the Set Total Blue Pick Ups input, what integer does it display? What's the name of the Actor Class you're searching for in Get All Actors of Class for the Blue Pick Ups? How many are in your level?

avatar image Omar Vector Apr 22 '15 at 02:27 AM

first, I've a base blueprint, then I created 2 other blueprint based on the Base blueprint.

I used enum to set the type of each child blueprint "Blue and Pink".

-the out put always Zero.

-Name of Actor classes are "are the both , Two child classes name".

I set 4-5 in the lvl of each.

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

1 answer: sort voted first

Hi Omar,

I apologize, I didn't notice at first that this is happening in a GameMode Blueprint. There is a known issue with Construction Scripts in GameModes (UE-5465) that I've added your notes to, and I'm discussing the issue with the developers to see if there's a workaround. I'll let you know when I see any update.

In the meantime, using this in another Blueprint's Construction Script should work as you'd expect.

more ▼

answered Apr 23 '15 at 05:08 PM

avatar image Omar Vector Apr 24 '15 at 03:51 AM

well, now I can RIP xD

thanks a lot

avatar image VictorBurgos Jul 23 '15 at 05:00 PM

What's the ETA of this fix by any chance? It's so weird that it is only happening in GameMode BP.

avatar image Ben Halliday STAFF Jul 23 '15 at 05:11 PM

We don't have an ETA at this time. I'll post here when I see any update.

(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