Hate multiple TIDs?

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.
User avatar
Tormentor667
Posts: 13554
Joined: Wed Jul 16, 2003 3:52 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia (Modern GZDoom)
Location: Germany
Contact:

Hate multiple TIDs?

Post by Tormentor667 »

Is there a way to make a monster hate multiple actors with different TIDs by using the "Thing_Hate" command in acs? I mean, does it work if I simply write...

Code: Select all

Thing_Hate(tid, target1);
Thing_Hate(tid, target2);
Thing_Hate(tid, target3);
...and the "tid" monster will hate "target1", "target2" and "target3"?
Gez
 
 
Posts: 17939
Joined: Fri Jul 06, 2007 3:22 pm

Re: Hate multiple TIDs?

Post by Gez »

I think it's overridden. Each time you call [wiki]Thing_Hate[/wiki] the monster will change target to choose a new one. (Even if you make it hate the same TID as before, it'll change target anyway; see this discussion.)
User avatar
Tormentor667
Posts: 13554
Joined: Wed Jul 16, 2003 3:52 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia (Modern GZDoom)
Location: Germany
Contact:

Re: Hate multiple TIDs?

Post by Tormentor667 »

So, there is nothing I can do?
User avatar
Slasher
Posts: 1160
Joined: Sun Mar 16, 2008 11:17 pm
Location: California

Re: Hate multiple TIDs?

Post by Slasher »

Tormentor667 wrote:So, there is nothing I can do?
Maybe a feature suggestion, and then hope it gets accepted...

Because I, as well as yourself and others I'm sure, would find this quite useful.
User avatar
Tormentor667
Posts: 13554
Joined: Wed Jul 16, 2003 3:52 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia (Modern GZDoom)
Location: Germany
Contact:

Re: Hate multiple TIDs?

Post by Tormentor667 »

Just done
User avatar
Ichor
Posts: 1783
Joined: Wed Jul 23, 2003 9:22 pm

Re: Hate multiple TIDs?

Post by Ichor »

Maybe you could make it hate one of the tids randomly. Then, when that target dies, it would hate one of the remaining tids randomly, and so on until all of the targets are dead.
User avatar
Tormentor667
Posts: 13554
Joined: Wed Jul 16, 2003 3:52 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia (Modern GZDoom)
Location: Germany
Contact:

Re: Hate multiple TIDs?

Post by Tormentor667 »

Unfortunately not a solution in my case.
User avatar
Cutmanmike
Posts: 11351
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Re: Hate multiple TIDs?

Post by Cutmanmike »

Could you explain why you need to have hatee's with different tids so we can think up a work around?
User avatar
Tormentor667
Posts: 13554
Joined: Wed Jul 16, 2003 3:52 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia (Modern GZDoom)
Location: Germany
Contact:

Re: Hate multiple TIDs?

Post by Tormentor667 »

I think you have already played Stronghold, haven't you? I am actually working on a new game mode for Stronghold and the problem is, I need to make sure that the spawned monsters are embedded in a loop that always makes them hate the players. Players in this case have all a different TID and that's exactly the problem. And no, it doesn't work with the "hate also players", no idea why though.
User avatar
Cutmanmike
Posts: 11351
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Re: Hate multiple TIDs?

Post by Cutmanmike »

One VERY hacky way off the top of my head would be to spawn a hate target constantly ontop of the player and make the monsters hate that instead. I have no idea if it would work though.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Re: Hate multiple TIDs?

Post by HotWax »

You shouldn't need to use Thing_Hate at all to make monsters hate players... they do that naturally. :?
User avatar
Tormentor667
Posts: 13554
Joined: Wed Jul 16, 2003 3:52 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia (Modern GZDoom)
Location: Germany
Contact:

Re: Hate multiple TIDs?

Post by Tormentor667 »

HotWax wrote:You shouldn't need to use Thing_Hate at all to make monsters hate players... they do that naturally. :?
But not automatically if they haven't heard or seen the player, thats the problem
User avatar
Demolisher
Posts: 1749
Joined: Mon Aug 11, 2008 12:59 pm
Graphics Processor: nVidia with Vulkan support
Location: Winchester, VA
Contact:

Re: Hate multiple TIDs?

Post by Demolisher »

You could use

Code: Select all

NoiseAlert (playertid,playertid);
EDIT:

Code: Select all

NoiseAlert (0,0);
would also work
User avatar
Tormentor667
Posts: 13554
Joined: Wed Jul 16, 2003 3:52 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia (Modern GZDoom)
Location: Germany
Contact:

Re: Hate multiple TIDs?

Post by Tormentor667 »

Err.. and where to put this?! O_o
User avatar
Demolisher
Posts: 1749
Joined: Mon Aug 11, 2008 12:59 pm
Graphics Processor: nVidia with Vulkan support
Location: Winchester, VA
Contact:

Re: Hate multiple TIDs?

Post by Demolisher »

When the monsters spawn.
Wouldn't the second that monsters see a player, or a player fires a weapon, the monsters would be alerted?
That's how it works with one player, why can't that work with 3 or 4?
Locked

Return to “Editing (Archive)”