Code: Select all
actor IMSCARED2BETA 31199
{
//$Category Ibm Stuff
MONSTER
//Radius 20
Health 0x7fffffff
Speed 3
scale 0.08
+GHOST +NOCLIP +NOGRAVITY +FLOAT +LOOKALLAROUND -SOLID +NOBLOCKMONST +DROPOFF +DONTSPLASH +BRIGHT
ActiveSound""
meleedamage 9999
meleerange 64
Obituary "%o was dead by \cjwhite face"
var int user_WFHunterTimer;//
var int user_WFStatusRandomizer;
States
{
Spawn:
SCAR A 1 A_Look
SCAR A 0 A_SetUserVar("user_WFHunterTimer",0)
SCAR A 0 A_SetUserVar("user_WFStatusRandomizer",-1)
SCAR A 0 A_SetTranslucent(0,0)
SCAR A 1 A_SetTranslucent (0.0,0)
Loop
See:
//RETURN TO THE PREVIOUS SEE STATE (IN CASE SOMETHING LIKE MELEE INTERRUPT IT)
SCAR A 0 A_JumpIf(user_WFHunterTimer>0,"SeeHaunt")
//SEE STATE TO BE SELECTED
SCAR A 0 A_SetUserVar("user_WFStatusRandomizer",random(0,100))
SCAR A 0 A_JumpIf(user_WFStatusRandomizer<=15,"SeeLaught") //OK
TNT1 A 0 A_JumpIf(user_WFStatusRandomizer<=25,"WanderState") //OK
SCAR A 0 A_JumpIf(user_WFStatusRandomizer<=89,"SeeNormal") //OK
SCAR A 0 A_Jump(256,"SeeHaunt")//last case | OK
Loop
SeeNormal:
SCAR A 0 A_SetUserVar("user_WFStatusRandomizer",random(0,100))
SCAR A 0 A_JumpIf(user_WFStatusRandomizer>=70,"SeeBlink") //OK
SCAR A 0 A_SetTranslucent(0.0,0)
SCAR AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 2 Bright A_Chase
Goto See
SeeHaunt:
SCAR A 0 A_JumpIf(user_WFHunterTimer>0,3)
//START SETUP
SCAR A 0 A_SetUserVar("user_WFHunterTimer",random(10,20))//Set the timer
SCAR A 0 ACS_Execute(46,0,1) //1
//END START SETUP
SCAR A 0 A_Playsound("KIDSND")//2 <-
SCAR AA 1 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.1,0)
SCAR AA 1 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.2,0)
SCAR AA 1 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.3,0)
SCAR AAA 1 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.4,0)
SCAR AA 1 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.5,0)
SCAR AAA 1 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.6,0)
SCAR AA 1 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.7,0)
SCAR AAA 1 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.8,0)
SCAR AA 1 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.9,0)
SCAR AAA 1 Bright A_Chase
SCAR A 0 A_SetTranslucent(1.0,0)
SCAR AA 1 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.9,0)
SCAR AAA 1 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.8,0)
SCAR AA 1 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.7,0)
SCAR AAA 1 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.6,0)
SCAR AA 1 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.5,0)
SCAR AAA 1 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.4,0)
SCAR AA 1 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.3,0)
SCAR AA 1 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.2,0)
SCAR AA 1 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.1,0)
SCAR AA 1 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.0,0)
SCAR AA 1 Bright A_Chase
SCAR A 0 A_SetUserVar("user_WFHunterTimer",user_WFHunterTimer-1)//in case it goes below zero
SCAR A 0 A_JumpIf(user_WFHunterTimer>0,5)
//RESET WHITE FACE TO NORMAL STATUS
SCAR A 0 A_SetTranslucent (0.0,0) //1
SCAR A 0 ACS_Execute(46,0,0) //2
SCAR A 0 A_SetUserVar("user_WFHunterTimer",0)//in case it goes below zero
SCAR A 0 A_Jump(256,"See") //4
SCAR A 0 //5 <--
Loop
SeeBlink: //OK
SCAR A 0 A_SetTranslucent (0.3,0)
SCAR A 0 A_Jump(127,2)//50% of chance to have heart sound
SCAR A 0 A_Playsound("GDSEE")// visible active sound
SCAR AAAAAAAAAAAA 2 A_Chase
SCAR A 0 A_SetTranslucent (0.0,0)
SCAR AAAAAAAAAAAA 2 A_Chase
Goto See
SeeLaught:
SCAR A 0 A_Playsound("ELAUGHT")// Laught
SCAR A 2 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.1,0)
SCAR A 2 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.2,0)
SCAR A 2 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.3,0)
SCAR A 2 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.4,0)
SCAR A 2 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.5,0)
SCAR A 2 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.6,0)
SCAR A 2 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.7,0)
SCAR A 2 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.8,0)
SCAR A 2 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.9,0)
SCAR A 2 Bright A_Chase
SCAR A 0 A_SetTranslucent(1.0,0)
SCAR A 2 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.9,0)
SCAR A 2 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.8,0)
SCAR A 2 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.7,0)
SCAR A 2 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.6,0)
SCAR A 2 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.5,0)
SCAR A 2 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.4,0)
SCAR A 2 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.3,0)
SCAR A 2 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.2,0)
SCAR A 2 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.1,0)
SCAR A 2 Bright A_Chase
SCAR A 0 A_SetTranslucent(0.0,0)
SCAR A 2 Bright A_Chase
Goto See
WanderState:
SCAR A 0 ACS_Execute(46,0,1) //1
SCAR A 1
SCAR AAAAAAAAAAAAAAAAAA 0 A_Wander
TNT1 A 0 A_Jump(10,2)
SCAR AAAAAAAAAAAAAAAAAA 0 A_Wander
TNT1 A 0 A_Jump(10,2)
SCAR AAAAAAAAAAAAAAAAAA 0 A_Wander
SCAR A 0 ACS_Execute(46,0,0) //1
SCAR A 1 A_Chase
Goto See
Melee:
SCAR A 0 A_GiveToTarget("IMSCAREDACTIVE", 1)
SCAR A 0 A_FaceTarget
SCAR A 2 A_MeleeAttack
SCAR A 1
Goto See
Death:
IBMA A 4
IBMA A 0 A_Scream
IBMA A 4
IBMA A 4
IBMA A 4 A_SetTranslucent(1.0,0)
IBMA A 4 A_Fall
IBMA A -1 A_SetFloorClip
Stop
Raise:
IBMA A 8 A_UnSetFloorClip
IBMA A 8
Goto See
}
}
Basically, the see stat is just an infinite loop to decide what state should the ghoul be, if normal, do a normal walking, if it's running to go run state, ...