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:
ActorSurvivorPoint0115001{Height1Radius10Scale0.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.
Question
Dude27th
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:
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.
Edited by Dude27thIt 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??
Share this post
Link to post
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.