Download

Can Variable's editability (in a construction script) be togglable?

Ideally, here’s what I’d like to do with a construction script -
I’d like to have a enum that has it’s different values driving what variables it exposes to the editor.

As an example -
I want to make interactable objects there own class. Some objects burn you, some heal you, and some initate cutscences with your camera. All of them could share some qualities (glow on approach … etc… but some qualities need to be tuned.

Simply put that “Editable” checkbox in details, I’d like to Toggle it with BluePrints. Does any one know a way to do this?
So like I set my enum to car in the editor, the Car speed variable pops up. or if I set it to truck, the car speed goes away, and truck bed size variable shows up etc.

Currently with editably not togglable via The Editor, I need to show car speed truck bed size and any other thing (this can get slow and sloppy if there’s like 10 values for 10 enumerators)

I’m an artist by trade so C++ Solutions aren’t going to be too useful to me, sadly.

Does anyone have any ideas at all on how to do this?

You will need to have shared properties (Say glow) in the parent class. If each of these child blueprint are different enough, then I will made different blueprint.

However if you wanted to some properties to be toggleable, sure, you can use Enum to set the different properties of an instance. An editable Enum will have a drop down menu under details, you can then pick any one of its input for each instance

For example Enum have 2 inputs,
Burn on contact,
Heal on contact.

Then its a matter of calling the correct function/event to do the appropriate action. If Enum is ‘Burn on contract’, runs burn on contact function, if Enum is ‘Heal on contact’, runs ‘heal on contact’ function.