Should A_FaceTarget affect A_Chase with flags?

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.

Should A_FaceTarget affect A_Chase with flags?

Postby ibm5155 » Sat Dec 30, 2017 11:50 am

By that I mean something like this

TNT1 A 0 A_FaceTarget
MONS A 1 A_Chase("Melee","",CHF_NORANDOMTURN)

the monster should Always walk into the target direction right? but I tested it and the monster just walks in a straight line (with angle = 0 I belive)
Last edited by ibm5155 on Sat Dec 30, 2017 12:05 pm, edited 1 time in total.
User avatar
ibm5155
Just Spooky
 
Joined: 20 Jul 2011

Re: Should A_FaceTarget affect A_Chase with flags?

Postby AFADoomer » Sat Dec 30, 2017 11:56 am

I assume that you meant "A_FaceTarget", not "FaceTarget"?
User avatar
AFADoomer
 
Joined: 15 Jul 2003

Re: Should A_FaceTarget affect A_Chase with flags?

Postby ibm5155 » Sat Dec 30, 2017 12:05 pm

AFADoomer wrote:I assume that you meant "A_FaceTarget", not "FaceTarget"?

Correct
User avatar
ibm5155
Just Spooky
 
Joined: 20 Jul 2011

Re: Should A_FaceTarget affect A_Chase with flags?

Postby Arctangent » Sat Dec 30, 2017 5:45 pm

A_Chase does not move the actor forward, but instead uses its own method of determining what direction the actor will move in.
User avatar
Arctangent
squawky
 
Joined: 06 Nov 2014
Discord: SquawkyAtan#2371

Re: Should A_FaceTarget affect A_Chase with flags?

Postby AFADoomer » Sun Dec 31, 2017 10:53 am

Can you post your actor's entire code? There's not enough here to tell what's going on.
User avatar
AFADoomer
 
Joined: 15 Jul 2003

Re: Should A_FaceTarget affect A_Chase with flags?

Postby ibm5155 » Tue Jan 02, 2018 7:26 pm

Here's an example code:
Code: Select allExpand view
actor Specimen10_Tracer

  Monster
  Damage 0
  +LOOKALLAROUND
  -SOLID
  +DROPOFF
  +FLOORHUGGER
  +NOCLIP
  Speed 57
  Scale 0.2
  States
  {
  Spawn:
   TNT1 A 0 NoDelay Thing_ChangeTID(0,3341)
        SP10 M 1 Bright A_Look   
    Loop
    See:
   TNT1 A 0 A_FaceTarget
   SP10 M 1 A_Chase("Melee","",CHF_NORANDOMTURN)
   TNT1 A 0 A_FaceTarget
   SP10 M 1 A_Chase("Melee","",CHF_NORANDOMTURN)
   TNT1 A 0 A_FaceTarget
   SP10 N 1 A_Chase("Melee","",CHF_NORANDOMTURN)
   TNT1 A 0 A_FaceTarget
   SP10 N 1 A_Chase("Melee","",CHF_NORANDOMTURN)
   TNT1 A 0 A_FaceTarget
   SP10 O 1 A_Chase("Melee","",CHF_NORANDOMTURN)
   TNT1 A 0 A_FaceTarget
   SP10 O 1 A_Chase("Melee","",CHF_NORANDOMTURN)
   TNT1 A 0 A_FaceTarget
   SP10 P 1 A_Chase("Melee","",CHF_NORANDOMTURN)
   TNT1 A 0 A_FaceTarget
   SP10 P 1 A_Chase("Melee","",CHF_NORANDOMTURN)
   TNT1 A 0 A_FaceTarget
   SP10 Q 1 A_Chase("Melee","",CHF_NORANDOMTURN)
   TNT1 A 0 A_FaceTarget
   SP10 Q 1 A_Chase("Melee","",CHF_NORANDOMTURN)
   TNT1 A 0 A_FaceTarget
   SP10 R 1 A_Chase("Melee","",CHF_NORANDOMTURN)
   TNT1 A 0 A_FaceTarget
   SP10 R 1 A_A_Chase("Melee","",CHF_NORANDOMTURN)
   TNT1 A 0 A_FaceTarget
   SP10 S 1 A_Chase("Melee","",CHF_NORANDOMTURN)
   TNT1 A 0 A_FaceTarget
   SP10 S 1 A_Chase("Melee","",CHF_NORANDOMTURN)
    Loop
  Melee:
    SP10 M 0 A_FaceTarget
    SP10 M 2 A_CustomMeleeAttack(14,"SNDHIT","","Melee",false)
   Goto Death
  Death:
    TNT1 A 1
    Stop
  }
}



...
I fixed that by replacing
Code: Select allExpand view
SP10 R A_Chase("Melee","",CHF_NORANDOMTURN)

by
Code: Select allExpand view
   SP10 R 1 A_SkullAttack
   TNT1 A 0 A_Stop
   TNT1 A 0 A_JumpIfTracerCloser(64.0,"Melee")



But still I feel like A_FaceTarge should actually affect the direction that the monster is going to walk in case the "CHF_NORANDOMTURN" flag is used
User avatar
ibm5155
Just Spooky
 
Joined: 20 Jul 2011


Return to Scripting

Who is online

Users browsing this forum: No registered users and 2 guests