Getting hatee TID

Moderator: GZDoom Developers

Post Reply
Costja
Posts: 188
Joined: Mon Oct 18, 2004 3:58 pm
Location: Russia, Moscow
Contact:

Getting hatee TID

Post by Costja »

Ability to get hatee TID. Using this it'll be possible to control monsters behavior and write custom AI.
User avatar
Wills
Posts: 1446
Joined: Mon Jan 10, 2005 7:01 pm
Location: The Well of Wishes

Post by Wills »

Ok.
Costja
Posts: 188
Joined: Mon Oct 18, 2004 3:58 pm
Location: Russia, Moscow
Contact:

Post by Costja »

What does this "Ok" mean?
User avatar
Kirby
Posts: 2697
Joined: Thu Aug 26, 2004 1:23 pm

Post by Kirby »

I don't think people quite understand whay you mean by "hatee" TID's. Could you explain?
Costja
Posts: 188
Joined: Mon Oct 18, 2004 3:58 pm
Location: Russia, Moscow
Contact:

Post by Costja »

TID of the thing that is hated by given thing. I suggest an ACS analog of Legacy's objtarget functionality.
User avatar
Cutmanmike
Posts: 11335
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Post by Cutmanmike »

I know what he means, and I don't think it's possible as of yet.
Costja
Posts: 188
Joined: Mon Oct 18, 2004 3:58 pm
Location: Russia, Moscow
Contact:

Post by Costja »

I think this is possible because there is tid public member of AActor class.
Dron
Posts: 84
Joined: Fri Feb 13, 2004 7:59 am
Location: the road to enlightment

Post by Dron »

speak english plz
Costja
Posts: 188
Joined: Mon Oct 18, 2004 3:58 pm
Location: Russia, Moscow
Contact:

Post by Costja »

It's hard to me to explain this with normal english. I can only say "I think everything required is present"
User avatar
MartinHowe
Posts: 2022
Joined: Mon Aug 11, 2003 1:50 pm
Location: Waveney, United Kingdom
Contact:

Post by MartinHowe »

The request seems to be for a function to be added that takes any monster by its own TID and returns 0 if it is not hating something with Thing_Hate and otherwise returns the TID of the thing that is being hated.

For the custom AI of the Duke-style scurrying rats in my WIP "The Butchery", I used an array to store the hatee TIDs of each rat when set with Thing_Hate and I suspect that an array is the only way to do it right now (a grossly over-simplified example follows).

Code: Select all

int hatees[4]={0,0,0,0};

void Hate_It (int hater, int hatee, int htype)
{
    Thing_Hate(hater,hatee,htype)
    hatees[hater]=hatee;
}
User avatar
Zippy
Posts: 3302
Joined: Wed Mar 23, 2005 5:31 pm
Location: New Jersey

Post by Zippy »

MartinHowe wrote:The request seems to be for a function to be added that takes any monster by its own TID and returns 0 if it is not hating something with Thing_Hate and otherwise returns the TID of the thing that is being hated.
Couldn't it just return the TID of the thing it's trying to attack, regardless of whether it was it Thing_Hate'd to do so?
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”