Page 1 of 1

Getting hatee TID

Posted: Tue Jun 14, 2005 5:00 pm
by Costja
Ability to get hatee TID. Using this it'll be possible to control monsters behavior and write custom AI.

Posted: Tue Jun 14, 2005 5:01 pm
by Wills
Ok.

Posted: Tue Jun 14, 2005 5:03 pm
by Costja
What does this "Ok" mean?

Posted: Wed Jun 15, 2005 3:18 pm
by Kirby
I don't think people quite understand whay you mean by "hatee" TID's. Could you explain?

Posted: Wed Jun 15, 2005 3:29 pm
by Costja
TID of the thing that is hated by given thing. I suggest an ACS analog of Legacy's objtarget functionality.

Posted: Wed Jun 15, 2005 5:02 pm
by Cutmanmike
I know what he means, and I don't think it's possible as of yet.

Posted: Wed Jun 15, 2005 5:09 pm
by Costja
I think this is possible because there is tid public member of AActor class.

Posted: Wed Jun 15, 2005 5:21 pm
by Dron
speak english plz

Posted: Wed Jun 15, 2005 5:24 pm
by Costja
It's hard to me to explain this with normal english. I can only say "I think everything required is present"

Posted: Thu Jun 16, 2005 3:01 am
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;
}

Posted: Thu Jun 16, 2005 8:58 pm
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?