# "special objects SOC"
# "added comments to help with object usage and SOC beginners by zehrooh!" 

Freeslot
MT_BALDI_HANGING_LIGHT
MT_BALDI_LIGHTROPE
MT_BALDI_LIGHTROPE_PLACABLE
S_BALDI_HANGING_LIGHT
S_BALDI_LIGHTROPE
S_BALDI_LIGHTROPE_PLACABLE
SPR_CLGH
MT_BALDI_FIELDTRIP_TRAP
S_BALDI_FIELDTRIP_TRAP
S_BALDI_FIELDTRIP_TRAP_CLOSED
SPR_FTRP
MT_BALDI_PLUS_FIRE
S_BALDI_PLUS_FIRE
SPR_BFLM
MT_JOHNNYSIGN
S_JOHNNYSIGN
SPR_JNSI

# "special objects (classic remastered)"

# "object MUST BE FLIPPED if you, want to make it look like, yknow, a lamp"
Object MT_BALDI_HANGING_LIGHT
#$Category Baldi objects
#$Name Hanging light
#$Sprite CLGHA0
MapThingNum = 3106
SpawnState = S_BALDI_HANGING_LIGHT
Radius = 50*FRACUNIT
Height = 81*FRACUNIT
Flags = MF_SCENERY|MF_NOGRAVITY|MF_RUNSPAWNFUNC # "MUST be given the MF_RUNSPAWNFUNC flag"

State S_BALDI_HANGING_LIGHT
SpriteName = CLGH
SpriteFrame = A
Duration = -1 # "MUST be the value -1 or objects will repeatedly spawn in 1 place, lagging the game"
Action = A_ConnectToGround
Var1 = MT_BALDI_LIGHTROPE # "Var1 sets the object to repeat until it reaches the floor/ceiling. using the objects mapthingnum or spr will not work"
Var2 = 0 # "Var2 sets the LAST object that will be spawned, works the same way as Var1. setting it to 0 will make it the same object as Var1"
Next = S_BALDI_HANGING_LIGHT

# "the object that connects the floating lamp to the floor/ceiling"
Object MT_BALDI_LIGHTROPE
SpawnState = S_BALDI_LIGHTROPE
Radius = 8*FRACUNIT
Height = 8*FRACUNIT
Flags = MF_SCENERY|MF_NOGRAVITY

State S_BALDI_LIGHTROPE
SpriteName = CLGH
SpriteFrame = B
Duration = 1
Next = S_BALDI_LIGHTROPE

# "object MUST BE FLIPPED if you, want to make it look like, yknow, a lamp"
Object MT_BALDI_LIGHTROPE_PLACABLE
#$Category Baldi objects
#$Name Hanging light rope
#$Sprite CLGHB0
MapThingNum = 3179
SpawnState = S_BALDI_LIGHTROPE_PLACABLE
Radius = 8*FRACUNIT
Height = 8*FRACUNIT
Flags = MF_SCENERY|MF_NOGRAVITY|MF_RUNSPAWNFUNC # "MUST be given the MF_RUNSPAWNFUNC flag"

State S_BALDI_LIGHTROPE_PLACABLE
SpriteName = CLGH
SpriteFrame = B
Duration = -1 # "MUST be the value -1 or objects will repeatedly spawn in 1 place, lagging the game"
Action = A_ConnectToGround
Var1 = MT_BALDI_LIGHTROPE # "Var1 sets the object to repeat until it reaches the floor/ceiling. using the objects mapthingnum or spr will not work"
Var2 = 0 # "Var2 sets the LAST object that will be spawned, works the same way as Var1. setting it to 0 will make it the same object as Var1"
Next = S_BALDI_LIGHTROPE_PLACABLE

# "special objects (field trip demo)"

# "SET THIS OBJECTS SCALE TO 0.5"
# "USE MOBJSCALE IN THE CUSTOM TAB OF THE EDIT THING WINDOW (UZB ONLY)"
Object MT_BALDI_FIELDTRIP_TRAP
#$Category Baldi objects
#$Name Bear trap
#$Sprite FTRPA0
MapThingNum = 3165
SpawnState = S_BALDI_FIELDTRIP_TRAP
SeeState =  S_BALDI_FIELDTRIP_TRAP_CLOSED
SeeSound = SFX_BEARTR
Radius = 40*FRACUNIT
Height = 90*FRACUNIT
Flags = MF_SCENERY|MF_NOGRAVITY

State S_BALDI_FIELDTRIP_TRAP
SpriteName = FTRP
SpriteFrame = A
Duration = 1
Action = A_Look
Var1 = 75<<16 # "the first set of numbers changes the radius of the objects vision, <<16 only shifts the number left and shouldnt be changed for this object"
Var2 = 0
Next = S_BALDI_FIELDTRIP_TRAP

State S_BALDI_FIELDTRIP_TRAP_CLOSED
SpriteName = FTRP
SpriteFrame = B
Duration = 5*TICRATE
Action = A_RingDrain
Var1 = 10 # "changes the amount of rings you lose when touching the object"
Var2 = 0
Next = S_BALDI_FIELDTRIP_TRAP

# "special objects (plus)"

Object MT_BALDI_PLUS_FIRE
#$Category Baldi objects
#$Name Campfire
#$Sprite BFLMA0
MapThingNum = 3147
SpawnState = S_BALDI_PLUS_FIRE
Radius = 25*FRACUNIT
Height = 50*FRACUNIT
Flags = MF_PAIN|MF_FIRE|MF_SCENERY|MF_NOGRAVITY

State S_BALDI_PLUS_FIRE
SpriteName = BFLM
SpriteFrame = A|FF_ANIMATE
Duration = 9
Var1 = 3 # "Var1 sets the amount of frames to cycle trough, example; 7 will cycle trough frames A trough G, 26 will cycle trough A trough Z
Var2 = 3 # "Var2 sets how fast it will cycle trough the frames in TICRATES, setting the value to 35 is one second"
Next = S_BALDI_PLUS_FIRE

Object MT_JOHNNYSIGN
#$Category Baldi objects
#$Name Johnny sign
#$Sprite JNSIA0
MapThingNum = 3153
SpawnState = S_JOHNNYSIGN
Radius = 30*FRACUNIT
Height = 124*FRACUNIT
Flags = MF_SPAWNCEILING|MF_PAPERCOLLISION|MF_SOLID|MF_SCENERY|MF_NOGRAVITY

State S_JOHNNYSIGN
SpriteName = JNSI
SpriteFrame = A|FF_PAPERSPRITE
Duration = 1
Action = A_ChangeAngleRelative
# "both of the Var valuves change the speed of the rotation, make sure they are the same value (very simplified)"
Var1 = 1
Var2 = 1 
Next = S_JOHNNYSIGN
