I realise that enums are c#-based and fore a while thought they can’t be created in FC, and was wondering if pseudo-enums that work exactly like enums be created in FC and used as blackboard variables. But then I noticed that Playmaker has an Enum Creator wizard: https://hutonggames.com/playmakerforum/index.php?topic=14158.0
This could be a stepping-stone way of creating and modifying enums without having to type a line of code. If this method doesn’t fit in with FC’s style, could there be a way of creating fake enums in FC that can be used like enums, but aren’t depended on c#?
As you can tell from the image your posted, the Playmaker Enum Created, is simple just creating a c# enum. It just wraps it around a UI wizard to do that, but in the end it just creates a c# enum.
As you can see, a c# enum declaration is so really simple that I think creating a whole wizard around it is kind of an overkill (in my opinion), since its declaration is simply something like:
So it is very simple to create really 🙂
Once you create an enum, you can of course then add in the FC Preferred Types Editor, to be able to use it as any other type (eg, for creating a variable of that enum, or using the Switch Enum node).
Sure thing, I understand, hehe! As for creating and removing enums, would it be possible to create them like fake types, kinda like how blackboard variables have lists and floats that can be created, modified, reordered and deleted entirely within the blackboard component? I’m not sure of the downside of creating them this way would be, but aren’t enums essentially just ordered lists that can be easily referenced on which “thing” is currently chosen? This way the type wouldn’t need to be added and, for example, you could just create your enum in the blackboard like you currently do a list, and then instead of getting/setting a weapon integer, you could get/set a human-friendly enum “thing”. I’d be interested to learn more about why this wouldn’t work as I must admit I still haven’t fully understood enums as much as I could!