Bea_q151
(Bea_q15)
December 26, 2024, 4:50pm
1
Hi! I am currently working on an AI behavior and i want to assign a c++ enum value to my blackboard.
UENUM(BlueprintType)
enum class EState : uint8
{
ES_Passive,
ES_Attacking,
ES_Frozen,
ES_Investigating,
ES_Dead
};
The enum is created in the headerfile of the ai controller, before defining the controller. I also generate project files which didnt work. I am out of ideas and i cant continue with my project.
3dRaven
(3dRaven)
December 26, 2024, 5:20pm
2
UENUM(BlueprintType)
enum class EState : uint8
{
ES_Passive,
ES_Attacking,
ES_Frozen,
ES_Investigating,
ES_Dead
};
Set the value via the enum name field.
Then this setup will show up as Frozen.
You could also pass in an enum (literal or variable) in place of the integer value and it will be converted correctly.
You can also use it in conditionals for decorators