Problems with Thing Hate

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
DMPhobos
Posts: 53
Joined: Sun Jan 06, 2008 4:12 pm

Problems with Thing Hate

Post 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?
User avatar
LilWhiteMouse
Posts: 2270
Joined: Tue Jul 15, 2003 7:00 pm
Location: Maine, US
Contact:

Re: Problems with Thing Hate

Post 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.
User avatar
DMPhobos
Posts: 53
Joined: Sun Jan 06, 2008 4:12 pm

Re: Problems with Thing Hate

Post by DMPhobos »

It worked!, Thank's a lot! :D
User avatar
Ravick
Posts: 2053
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil
Contact:

Re: Problems with Thing Hate

Post 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
Locked

Return to “Editing (Archive)”