Page 1 of 1

Problems with Thing Hate

Posted: Thu Jul 12, 2012 8:18 pm
by DMPhobos
Im Having some troubles with thing hate, i created a decorate army in one of my proyects, they are supposed to fight each other using thing hate, however the problem is that they never target each other unless one of the soldiers gets hurt and enters the pain state, when that happens the soldiers from the "other suddendly" wake up and start working like they are supposed, but for some reason the other soldiers never react unless they are attacked...

At first i tought it was an error on my code, but then i made a "dummy" actor from scratch and the same thing still happens

Here's the "dummy soldiers" code, just summon brownsoldier1 and greensoldier2

Code: Select all

ACTOR MGSoldier 1001
{
  Health 200
  Radius 16
  Height 56
  Speed 20
  PainChance 170
  MONSTER
  -COUNTKILL
  states
  {
    Spawn:
    Wander:
      PLAY A 2 A_Look
      loop
    See:
      PLAY ABCD 2 A_Chase
      Loop
    Melee:
      PLAY E 2
      PLAY F 2
      Goto See
    Missile:
      PLAY E 5 A_FaceTarget
      PLAY F 2 
      PLAY E 5
      Goto see
    Pain:
      PLAY G 8
      Goto See
    Death:
      PLAY H 10
      PLAY I 10 A_Scream
      PLAY J 10 A_NoBlocking
      PLAY KLM 10
      PLAY N -1
      Stop
    XDeath:
      PLAY O 5
      PLAY P 5 A_XScream
      PLAY Q 5 A_NoBlocking
      PLAY RSTUV 5
      PLAY W -1
      Stop
    }
}

//Green Army//

actor GreenSoldier1 : Mgsoldier
{
  -COUNTKILL
  -ISMONSTER
  -FRIENDLY
  states
  {
  Spawn:
    PLAY A 1 Thing_ChangeTID(0,160)
    PLAY A 0 Thing_Hate(0,1,5)
    PLAY A 1
    Goto Wander
    }
}

//Brown Army//

actor BrownSoldier1 : Mgsoldier
{
  -COUNTKILL
  -ISMONSTER
  -FRIENDLY
  Translation 1
  states
  {
  Spawn:
    PLAY A 1 Thing_ChangeTID(0,1)
    PLAY A 1 Thing_Hate(0,160,5)
    PLAY A 1
    Goto Wander
    }
}
Any ideas about why this happens?

Re: Problems with Thing Hate

Posted: Thu Jul 12, 2012 11:02 pm
by LilWhiteMouse
ZDoom doesn't execute the special on the first line when an actor spawns. Try adding a "PLAY A 0" as the first line in your actors' Spawn states, so it changes their TID on the second line.

Re: Problems with Thing Hate

Posted: Fri Jul 13, 2012 10:03 am
by DMPhobos
It worked!, Thank's a lot! :D

Re: Problems with Thing Hate

Posted: Fri Jul 13, 2012 11:19 am
by Ravick
It sounds like that infight groups in Doom3. I had to shoot one to make it enter in its attack sequence and just then the other group atttack him. And his gropu would only retaliate when the first monster of the other group was in its attack sequence. :S