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"

Using select node to chose a class in blueprint

So I am still pretty new to Blueprints and been working on a small project with them. What I would like to do is spawn a actor depending on a integer value. So if x=1 then spawn actor 1, if x=2 then spawn actor 2. I have everything working to spawn an actor when I have it set on the spawn node alt text

But if I set up a select node nothing will spawn alt text

I'm guessing there is something I'm missing with how the node itself works. If anyone can help me with this, or have another way of doing the same thing that would be awesome.

Product Version: UE 4.14
Tags:
blueprint1.png (147.5 kB)
blueprint2.png (163.8 kB)
more ▼

asked Feb 21 '19 at 12:32 AM in Blueprint Scripting

avatar image

jiokl
1 1

avatar image ThompsonN13 Feb 21 '19 at 01:03 AM

you sure your values are set correctly? i just tested a similar script and it works without issue in 4.17.

ensure that your location is correct (its in world space) and ensure that your variable is within range (0-1).

avatar image jiokl Feb 21 '19 at 02:13 AM

Where/how should I check the world space location is correct? Sorry I am pretty new to this, mostly self taught with just using programing logic, the right arm index is set to 0

avatar image Nebula Games Inc Feb 21 '19 at 01:53 AM

Where are you setting "Left Arm Index" and what is its value? Is it 0 or 1?

avatar image jiokl Feb 21 '19 at 02:14 AM

Left Arm Index is not set by anything, I have it set to 0 when I created the variable.

avatar image jiokl Feb 21 '19 at 02:20 AM

And having something set it made it work, I haven't had issues with booleans needing to be defined so I figured it just handled everything the same way

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

1 answer: sort voted first

Of what type is your "Right Arm" variable? If it's type is one of your two classes you're trying to spawn then it's not compatible with the other classes return value. That means you would try to store your "Shield Test" blueprint in a variable of type "Right Arm Base", leading to an error. Using "Actor" as variable type instead should be working fine.

more ▼

answered Feb 21 '19 at 10:06 AM

avatar image

palinoiadev
29 4 5

(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