Jump to content

Enum property equivalent


Recommended Posts

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...