# ORBI_PT_naut Launcher by Chaobrother. Feel free to use this SOC as a template for
# launching ORBI_PT_nauts with your own custom objects.
# This is Trapgoyle like hazard which fires ORBI_PT_nauts every 2 seconds.
# The actual showcase is how to fire and color ORBI_PT_nauts with SOC.
# Jawz cannot be properly fired with only SOC; they will be too slow.
# It is HIGHLY RECOMMENDED to use Lua and Kart related functions rather than SOC
# to fire Kart projectiles, if you are able to use Lua in your mod.
# Make sure to use unique state and object names if you want to create a custom
# ORBI_PT_naut launcher.      AH! Good old find and replace

Freeslot
MT_ORBI_PT_LAUNCHER
S_ORBI_PT_LAUNCHER1
S_ORBI_PT_LAUNCHER2
S_ORBI_PT_LAUNCHER3
#Remote ORBI_PT_naut Modification
S_LAUNCHEDORBI_PT_COLORDIGGLE
S_LAUNCHEDORBI_PT_SPEED1
S_LAUNCHEDORBI_PT_SPEED2
#Launcher ORBI_PT_naut Modification
S_LAUNCHERORBI_PT_MOD1
S_LAUNCHERORBI_PT_MOD2
S_LAUNCHERORBI_PT_MOD3

#Remote ORBI_PT_naut Modification
State S_LAUNCHEDORBI_PT_COLORDIGGLE
SpriteName = NULL
SpriteFrame = A
Var1 = 0
Var2 = SKINCOLOR_BLACK
Duration = 0
Next = S_NULL
Action = A_ChangeColorAbsolute

#Makes the ORBI_PT_naut inert so its speed can be modified with A_Thrust rather than
#Setting its movecount.
State S_LAUNCHEDORBI_PT_SPEED1
SpriteName = NULL
SpriteFrame = A
Var1 = MF2_AMBUSH
Var2 = 2
Duration = 0
Next = S_NULL
Action = A_SetObjectFlags2

State S_LAUNCHEDORBI_PT_SPEED2
SpriteName = NULL
SpriteFrame = A
Var1 = 30
Var2 = 1
Duration = 0
Next = S_NULL
Action = A_Thrust
#End Remote ORBI_PT_naut modification

#Launcher ORBI_PT_naut modification
State S_LAUNCHERORBI_PT_MOD1
SpriteName = DECO
SpriteFrame = A
Var1 = MT_ORBINAUT
Var2 = S_LAUNCHEDORBI_PT_COLORDIGGLE
Duration = 0
Next = S_LAUNCHERORBI_PT_MOD2
Action = A_RemoteAction

State S_LAUNCHERORBI_PT_MOD2
SpriteName = DECO
SpriteFrame = A
Var1 = MT_ORBINAUT
Var2 = S_LAUNCHEDORBI_PT_SPEED1
Duration = 1
Next =  S_LAUNCHERORBI_PT_MOD3
Action = A_RemoteAction

State S_LAUNCHERORBI_PT_MOD3
SpriteName = DECO
SpriteFrame = A
Var1 = MT_ORBINAUT
Var2 = S_LAUNCHEDORBI_PT_SPEED2
Duration = 0
Next =  S_ORBI_PT_LAUNCHER1
Action = A_RemoteAction
#End Launcher ORBI_PT_naut modification


State S_ORBI_PT_LAUNCHER1
SpriteName = NULL
SpriteFrame = A
Var1 = 1
Var2 = 0
Duration = 200
Next =  S_ORBI_PT_LAUNCHER2
Action = none

State S_ORBI_PT_LAUNCHER2
SpriteName = NULL
SpriteFrame = A
Var1 = MT_ORBINAUT + (16<<16)
Var2 = 0
Duration = 1
Next =  S_ORBI_PT_LAUNCHER3
Action = A_TrapShot

State S_ORBI_PT_LAUNCHER3
SpriteName = NULL
SpriteFrame = A
Var1 = FRACUNIT*200/100
Var2 = 0
Duration = 1
Next =  S_LAUNCHERORBI_PT_MOD1
Action = A_SetScale

Object MT_ORBI_PT_LAUNCHER
#$Name ORBI_PT_naut Launcher
#$Sprite DECOA1
#$Category Community Resources
MapThingNum = 1514
SpawnState = S_ORBI_PT_LAUNCHER1
SpawnHealth = 1000
SeeState = S_ORBI_PT_LAUNCHER2
SeeSound = sfx_None
ReactionTime = 0
AttackSound = sfx_trfire
PainState = S_NULL
PainChance = S_NULL
PainSound = sfx_None
MeleeState = S_NULL
MissileState = S_NULL
DeathState = S_NULL
XDeathState = S_NULL
DeathSound = sfx_None
Speed = 21*FRACUNIT
Radius = 21*FRACUNIT
Height = 40*FRACUNIT
DispOffset = 0
Mass = 1000
Damage = 0
ActiveSound = sfx_None
Flags = MF_NOGRAVITY
RaiseState = S_NULL