Jump to content
  • 0

Enum Definition ?


Dude27th

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
Radius 10
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

Share this post


Link to post

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...