Thing_Hate questions

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
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Thing_Hate questions

Post by DBThanatos »

In order to have two "factions" hating each other, i must call two times Thing_hate right? just like the example of the wiki, in this case with tids

Code: Select all

thing_hate(1,2,6)
thing_hate(2,1,6)
And, when is done, this means that anything with those Tids will hate the other, no matter when they appear? or the "hate" is only applied to the matching tids present in the moment the Thing_hate is called?

Thanks in advance
User avatar
Isle
Posts: 687
Joined: Fri Nov 21, 2003 1:30 am
Location: Arizona, USA

Re: Thing_Hate questions

Post by Isle »

sorry, it only works on monsters that are currently in the map. if you want spawned monsters to hate put it in a loop.
User avatar
Cutmanmike
Posts: 11351
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Re: Thing_Hate questions

Post by Cutmanmike »

It only effects actors when the script is called, so if you called the script and then your actors spawned they would NOT hate whoever you set them to hate.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Re: Thing_Hate questions

Post by HotWax »

Isle wrote:sorry, it only works on monsters that are currently in the map. if you want spawned monsters to hate put it in a loop.
The disadvantage with doing this is that each time the special is called monsters will be forced to find a new target, so this may have the undesired side-effect that enemies will switch targets each time the loop hits rather than finishing one off and then moving on to the next.
User avatar
Isle
Posts: 687
Joined: Fri Nov 21, 2003 1:30 am
Location: Arizona, USA

Re: Thing_Hate questions

Post by Isle »

ok, spawn each with a 4/3 tid then make them hate the others and then change the tid IE:

Code: Select all

script 5 (void)
{
	spawnspot("Cacodemon", 10, 3);
	thing_hate(3, 2, 6);
	thing_changetid(3, 1);
}

script 6 (void)
{
	spawnspot("BaronOfHell", 11, 4);
	thing_hate(4, 1, 6);
	thing_changetid(4, 2);
}
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: Thing_Hate questions

Post by DBThanatos »

Well, the loops i made are not extremely continous (only for when more monsters respawn, that being around every 15 seconds), and the target change is not a problem at all (in fact, it helps :P ).

Thanks for the info guys :D
Locked

Return to “Editing (Archive)”