[BUG]Get length not working propably in constrcution script

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

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

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

Engine version 4.7.5

any help?!!

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

Hi Omar,

I tested this in 4.7.5, but was not able to reproduce this behavior. When I set variable in construction script, it gets correct number of Blueprint Actors of Class specified. Are you spawning these actors into level during runtime, or are they already placed in 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 download link so we can check it out? Thanks!

thanks for reply,

1-I already placed Actors in level,
2-I’m able to set right value in event graph not Construction graph "that’s why I can’t understand ".
3-I can’t upload 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.

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

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

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

  • out put always Zero.

-Name of Actor classes are “are both , Two child classes name”.

I set 4-5 in lvl of each.

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 issue with developers to see if there’s a workaround. I’ll let you know when I see any update.

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

well, now I can RIP xD

thanks a lot

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

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