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. 

A Blueprint which adds a blueprint, then gets its variables?

Hey guys.

I'm investigating how to get some simple procedural buildingblock levels going on. i've made a Room blueprint with a few meshes in it, and added a visible vector var to act as an attatchment point

then i made another blueprint, with an AddChildActorComponent node which adds a Room blueprint.

what i would like to do, is get at the vector var inside this blueprint i've added dynamically, so i can use it as a location to add the next Room blueprint, and so on and so forth.

however i can't seem to get at the vector var in the dynamically added blueprint. i have looked at GetChildActor but it doesnt seem to do what i need. can anyone think of a way to get at the vector vars inside this dynamically spawned blueprint? or maybe there is another kind of component i should use?

Product Version: Not Selected
Tags:
more ▼

asked Jun 26 '14 at 01:40 PM in Blueprint Scripting

avatar image

stranj
36 2 5 6

avatar image NukedCranium Jun 26 '14 at 03:15 PM

Has the reference you hold to the dynamically added blueprint been cast to the appropriate type of blueprint or is it just a generic actor?

avatar image stranj Jun 26 '14 at 03:32 PM

i went and read about casting... still not sure how to use it. this is what i did to start with... alt text i understand that casting would allow me to "expect" a variable to be available based on a template... but i have no idea how that would work in this case.

here i've shown the component setup of the Room1 blueprint on the left, and on the right - is this how i would cast to the appropriate blueprint type?

alt text

trub1.jpg (208.3 kB)
trub2.jpg (244.6 kB)
avatar image stranj Jun 26 '14 at 03:33 PM

even if that casting stuff is correct - still no idea how i can get at those vectors within the room1 blueprint

avatar image NukedCranium Jun 26 '14 at 03:49 PM

I see what you mean. Are there no components for retrieving public properties from a variable if you drag off from the "As room1 C" pin?

avatar image stranj Jun 26 '14 at 03:54 PM

ok, fiddled some more, and found out how to get to the stuff i need using casting, but this setup is still not working as desired.

the debug print node outputs 3 different locations as expected, but the newly added room1 blueprints are not being moved to those positions (changed Room1's "attatch point" object to a scene object instead of a vector var, in order to get a transform)

the print node outputs: LogBlueprintUserMessages: X=792.000 Y=-632.000 Z=128.000 LogBlueprintUserMessages: X=944.000 Y=-1392.000 Z=256.000 LogBlueprintUserMessages: X=968.000 Y=-1512.000 Z=384.000

alt text

trub3.jpg (306.6 kB)
avatar image stranj Jun 26 '14 at 04:13 PM

after some more fiddling, if i tick manual attatchment on the add node, the meshes are moved into position...

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

1 answer: sort voted first

success! this setup creates a simple procedural level, choosing between two attachment points on each added room

alt text

of course it can overlap itself etc, plenty of logic needed before its any good.

alt text

succ1.jpg (387.5 kB)
succ2.jpg (157.1 kB)
more ▼

answered Jun 26 '14 at 04:48 PM

avatar image

stranj
36 2 5 6

(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