cypher2012 Posted August 26, 2017 Share Posted August 26, 2017 Hey guys, what is the best equivalent to an Enum property in creation kit? I'm creating a new sub menu for by arena mod that allows the player to choose what type of enemy they would like to play against. Here is an idea of what I'm after. enum EEnemyTypeSelection = EEnemyTypeGhoul, EEnemyTypeRaider, EEnemyTypeMutant ;in the code EEnemyTypeSelection PlayerSelectedEnemy ;This will be set by the menu shown at start of game if(PlayerSelectedEnemy == EEnemyTypeGhoul) spawned_actor = spawn_points[random_spawn].PlaceActorAtMe(LvlFeralGhoul,1) elseif(PlayerSelectedEnemy == EEnemyTypeRaider) spawned_actor = spawn_points[random_spawn].PlaceActorAtMe(LvlRaider,1) Link to comment Share on other sites More sharing options...
deadbeeftffn Posted August 26, 2017 Share Posted August 26, 2017 Int EEnemyTypeGhoul = 0 Const Int EEnemyTypeRaider = 1 Const Int EEnemyTypeMutant = 2 Const Really dull, though this will avoid persistance, since the variables do not really exists. Link to comment Share on other sites More sharing options...
cypher2012 Posted August 26, 2017 Author Share Posted August 26, 2017 Int EEnemyTypeGhoul = 0 Const Int EEnemyTypeRaider = 1 Const Int EEnemyTypeMutant = 2 Const Really dull, though this will avoid persistance, since the variables do not really exists. Think that's what I'm gunna have to do. A little bit hacky, but I suppose that is what an Enum really is anyway. Link to comment Share on other sites More sharing options...
scrivener07 Posted August 27, 2017 Share Posted August 27, 2017 A const or readonly variable is a good way to fake an enum, just like deadbeeftffn said. Its not at all hacky. Link to comment Share on other sites More sharing options...
Recommended Posts