Search In
• More options...
Find results that contain...
Find results in...
• 0

# Enum Definition ?

## Question

So , I have an Actor which takes his Arg0 as an identifier and I was thinking about using an enum to establish a limit of the values that can be accepted and at the same time be more "editing-friendly" while making maps using this actors. This is the code:

```Actor SurvivorPoint01 15001
{
Height 1
Scale 0.25
//\$Category "Decorate/Survivors"
//\$Arg0 "SurvivorID"
enum SurvivorID {Soldier =1,  Baby =2,  PoolDude =3,  Teacher =4,  Dog =5,  Cheerleader =6,  Tourists =7,  Explorer =8,  Chef =9,  JumpingKid =10,  TongueSon =11}
//\$Arg0Enum "SurvivorID"
//\$Arg0Type 11

-SOLID
+NOCLIP
+NOGRAVITY
States
{
Spawn:
SPON AAAAAAAAAAAAA 0
TNT1 A 1
TNT1 A 0 A_JumpIf(CallACS("GetSurvivorsNumber")>=1, "DoTheThing")
TNT1 A 1
Stop
DoTheThing:
TNT1 AAAAAAAAAAAAA 0
TNT1 A 1
TNT1 A 0 A_JumpIf(Args[0] == 1, "Soldier")
TNT1 A 0 A_JumpIf(Args[0] == 2, "Baby")
TNT1 A 0 A_JumpIf(Args[0] == 3, "PoolDude")
TNT1 A 0 A_JumpIf(Args[0] == 4, "Teacher")
TNT1 A 0 A_JumpIf(Args[0] == 5, "Dog")
TNT1 A 0 A_JumpIf(Args[0] == 6, "Cheerleader")
TNT1 A 0 A_JumpIf(Args[0] == 7, "Tourists")
TNT1 A 0 A_JumpIf(Args[0] == 8, "Explorer")
TNT1 A 0 A_JumpIf(Args[0] == 9, "Chef")
TNT1 A 0 A_JumpIf(Args[0] == 10, "JumpingKid")
TNT1 A 0 A_JumpIf(Args[0] == 11, "TongueSon")
TNT1 A 1
Stop
//The rest of the code...
}
}```

And it seems that the editor parses correctly the enum , but I expected it to display a list, and neither is letting me use the defined values for this argument.
It just appears like "SurvivorID:" 0 , and lets me use any number anyway. If I use something like Soldier it changes it back to 0.

What I'm doing wrong??

Edited by Dude27th

## Recommended Posts

There have been no answers to this question yet