The Evil "Lost Soul" SOS

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
User avatar
ibm5155
Posts: 1268
Joined: Wed Jul 20, 2011 4:24 pm

The Evil "Lost Soul" SOS

Post by ibm5155 »

I'm making a projectile like monster where it can cross walls, it should track the player and when near enought, it should do melee attack and then die.
The problem is, sometimes, it just doesn't track the player, it faces the player but continues to run endlessly outside the map.
So how can I fix this weird behavior?
Also is there a way to set a fixed tid when this monster is spawned? the way I'm summoning it is by A_PainAttack("Specimen10_Tracer")

Code: Select all

actor Specimen10_Tracer
{  
  Monster
  Damage 0
  -NOGRAVITY +LOOKALLAROUND -SOLID +DROPOFF
  +NOCLIP
  Speed 24
  Scale 0.2
  States
  {
  Spawn:
    SP10 M 1 Bright A_Look
    Loop
  See:
    SP10 M 0 A_FaceTarget
    SP10 MN 2 A_Chase
    SP10 M 0 A_FaceTarget
    SP10 OP 2 A_Chase
    SP10 M 0 A_FaceTarget
    SP10 QRS 2 A_Chase
    Loop
  Missile:
	SP10 M 1
	Goto See
  Melee:
    SP10 M 0 A_FaceTarget
    SP10 M 2 A_CustomMeleeAttack(12,"SNDHIT","","Melee",false)
   Goto Death
  Death:
    TNT1 A 1
    Stop
  }
}
User avatar
ibm5155
Posts: 1268
Joined: Wed Jul 20, 2011 4:24 pm

Re: The Evil "Lost Soul" SOS

Post by ibm5155 »

Fixed: Added the "PAF_NOSKULLATTACK" flag on the pain attack and everything went normal

Return to “Scripting”