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"

How to set the value of an Enumerator?

Possibly a stupid question but I'm hoping to create a public Enumerator for "Object Size" for my game where the size of the object correlates to a specific Float Value. So my Enumerator is "Tiny, Small, Medium, Large and Huge" and when placing the object in the level, you can choose from a drop down list to specify the size and get a different result based on this.

The problem I'm having is that I don't know how to set the value of these Enums. If I want Tiny to equal 0.5 and Small to equal 1.0 and Medium to equal 10 etc. how do you do set this in the blueprint? I figured you'd be able to set the value of the Enums inside the enumerator itself but you can't.

alt text

Maybe using Enums isn't the best way to achieve what I want?

Product Version: UE 4.10
Tags:
more ▼

asked Apr 26 '16 at 12:47 AM in Using UE4

avatar image

TorQueMoD
1.2k 88 116 146

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

1 answer: sort voted first

Switch on %Name Of Enumerator would do the trick alt text

you can switch on string or integer. alt text

Also there are Select node, which work with a lot of stuff alt text

As wildcard, you can use integer, enumeration or bool, as for selectable variable might be everything, from actor and actor arrays to structures, enumerations and arrays their arrays.

To change selectable type or what type you base of your selection, you need to drag wire from variable to the node. For Array select is tricky, little bit, you need to connect your variable type to option before return.

alt text alt text

more ▼

answered Apr 26 '16 at 02:29 AM

avatar image

CriErr
1.2k 57 21 58

avatar image TorQueMoD Apr 27 '16 at 07:54 AM

Thanks for the info CriErr. I haven't had a chance to try it out yet as I've moved on to working on models for the time being but I'll definitely give it a try in the next few days. So if I understand you correctly, what I would do is Set the Enumerator, then drag from the wire out and type switch on int and then enter a value for every option inside my enumerator? I'd imagine that I would do this from Event Begin Play? Seems strange to me that you can't specify a specific data type inside the Enumerator itself and set the values there. That way they'd be a more reusable piece of data on their own.

avatar image preston_sony Oct 11 '18 at 09:52 PM

Your images are broken.

avatar image CriErr Oct 15 '18 at 06:49 PM

https://youtu.be/cdVjewFl7tQ?t=146

There same for int, string, and other stuff.

(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