Getting the components of a Blueprint


#1

Assume that I have a blueprint called SM_Door_Blueprint.
Assume that the door contains a component called OpenTheEffingDoorz like so…

Notice that the tag Lawl is contained inside the component in the door.

How would I get the component of the door with the tag Lawl?
How would I get the component by its class?

This does not work:
Actor.named("SM_Door_Blueprint").components_by_tag(Entity.static_class,Name!("Lawl"))

Also when trying to do it by class I get type errors and I do not really know how to coerce stuff yet.


Converting object class types
#2

What is the exact problem/error message that you get when you try to run the above command?


#3

I do not get any errors with that particular command I simply receive an empty list {}

I assume that it should produce that particular component… correct?


#4

Are you building the engine from C++ with Visual Studio, or are you using Epic Games Launcher? If you use Visual Studio, you could place a breakpoint in AActor::GetComponentsByTag() and see what it’s doing and why it’s failing. Could be a UE4 issue and not :sk: related.


#5

Also see the related post here should help you out with casting as well:

http://forum.skookumscript.com/t/declare-variable-type/692/2


#6

Hey @JacobGood1,

We just discovered a bug with constructing names using this syntax:

Name!("Lawl")

This incorrectly returns None. Try this instead:

"Lawl".Name

We’re working on a fix!


#7

This bug is now fixed and the fix is live on GitHub.