Clamps down and returns one of the two numbers entered, and nothing else. To get more results, pick inside of pick can happen:
Code: Select all
randompick(1,2,9,12)
Here's the pull request.
Moderator: GZDoom Developers
Code: Select all
randompick(1,2,9,12)
Spoiler:
Code: Select all
Actor MM
{
var int user_t;
+NOINTERACTION
States
{
Spawn:
TNT1 A 0 NoDelay A_SetUserVar("user_t",pick(1,4,12,16))
TNT1 A 0 A_JumpIf(user_t == 1,"s1")
TNT1 A 0 A_JumpIf(user_t == 4,"s2")
TNT1 A 0 A_JumpIf(user_t == 12,"s3")
TNT1 A 0 A_JumpIf(user_t == 16,"s4")
Err:
TNT1 A 35 A_PrintBold("Apparently it didnt work.")
Goto Spawn
s1:
TNT1 A 35 A_PrintBold("One")
Goto Spawn
s2:
TNT1 A 35 A_PrintBold("Four")
Goto Spawn
s3:
TNT1 A 35 A_PrintBold("Twelve")
Goto Spawn
s4:
TNT1 A 35 A_PrintBold("Sixteen")
Goto Spawn
}
}