actor CreateBotBuddy0 : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
+AUTOACTIVATE
States
{
Spawn:
TNT1 A 1
loop
Pickup:
TNT1 A 0 A_SpawnItemEx("BotBuddy",32,0,32,0,0,0)
TNT1 A 0 A_SpawnItemEx("BotBuddy",32,0,64,0,0,0)
TNT1 A 0 A_JumpIfTargetInLOS("See")
stop
See:
TNT1 A 0 A_JumpIfInventory("BotDifficulty", 1, "Hard")
stop
Hard:
TNT1 A 0 A_JumpIfInventory("NoBotFix", 1, "Death")
TNT1 A 0 A_Jump(183, "HopCheck")
stop
HopCheck:
TNT1 A 0 A_JumpIf(floorz==z, "Hop")
stop
Hop:
TNT1 A 0 A_GiveInventory("BotJump",1)
stop
Death:
TNT1 A 0
stop
}
}

actor BotSightCounter : Inventory
{
inventory.maxamount 9999
}

actor BotDifficulty : Inventory
{
inventory.maxamount 10
}

actor BotBuddy
{
-SOLID
+NOINTERACTION
+NOGRAVITY
+MISSILE
-FLOORCLIP
height 1
radius 1
damagetype "BotSight"
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_JumpIf(z-floorz<=0 && z-floorz >= -16,"GiveJump")
stop
GiveJump:
TNT1 A 0 A_GiveToTarget("BotJump",1)
stop
Death:
TNT1 A 0
stop
}
}
actor BotJump : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
+AUTOACTIVATE
States
{
Spawn:
TNT1 A 1
loop
Pickup:
TNT1 A 0 ThrustThingZ(0,42,0,0)
stop
}
}

actor NoBotFix : Inventory
{
inventory.amount 1
inventory.maxamount 1
}

actor NoPickups : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
states
{
Spawn:
TNT1 A 1
stop
Pickup:
TNT1 A 0 A_ChangeFlag("PICKUP",0)
stop
}
}

actor YesPickups : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
states
{
Spawn:
TNT1 A 1
stop
Pickup:
TNT1 A 0 A_ChangeFlag("PICKUP",1)
stop
}
}


#include "actors/misc/BotFixC.txt"



