Hello!
I am currently trying to create a variation of the Demon that teleports towards the player when it's far away but I constantly get them stuck into walls. I think it should be fixable if I could stop my TeleDemonMissile from spawning TeleDemonSpot when there isn't enough room for it. I can't figure out how to do that though. I'd really appreciate some help.
Here's my code:
ACTOR TeleDemon
{
Game Doom
Health 100
PainChance 180
Speed 8
Radius 30
Height 56
Species demon
Mass 400
MeleeThreshold 200
Monster
+ALWAYSFAST
+FLOORCLIP
SeeSound "demon/sight"
AttackSound "demon/melee"
PainSound "demon/pain"
DeathSound "demon/death"
ActiveSound "demon/active"
Obituary "%o was bit by a teleporting demon."
States
{
Spawn:
TDEM AB 10 A_Look
Loop
See:
TDEM AABBCCDD 4 Fast A_Chase
Loop
Melee:
TDEM EF 8 Fast A_FaceTarget
TDEM G 8 Fast A_SargAttack
Goto See
Missile:
TDEM H 0 A_CustomMissile("TeleDemonMissile",56,0)
TDEM H 0 A_Teleport("See", "TeleDemonSpot")
Goto See
Pain:
TDEM H 2 Fast
TDEM H 2 Fast A_Pain
Goto See
Death:
TDEM I 8
TDEM J 8 A_Scream
TDEM K 4
TDEM L 4 A_NoBlocking
TDEM M 4
TDEM N -1
Stop
Raise:
TDEM N 5
TDEM MLKJI 5
Goto See
}
}
ACTOR TeleDemonMissile
{
Radius 30
Height 56
Speed 25
Damage 0
Projectile
+NOCLIP
States
{
Spawn:
APLS AB 5 Bright
Goto Death
Death:
APBX A 1 A_SpawnItemEx ("TeleDemonSpot")
Stop
}
}
ACTOR TeleDemonSpot : SpecialSpot
{
Radius 30
Height 56
States
{
Spawn:
APLS AB 5 Bright
Goto Death
Death:
APBX A 1 Bright
Stop
}
}(The projectiles will be invisible once it's working properly, it's only visible right now for debugging reasons)