Getting hatee TID
Moderator: GZDoom Developers
-
- Posts: 188
- Joined: Mon Oct 18, 2004 3:58 pm
- Location: Russia, Moscow
Getting hatee TID
Ability to get hatee TID. Using this it'll be possible to control monsters behavior and write custom AI.
-
- Posts: 188
- Joined: Mon Oct 18, 2004 3:58 pm
- Location: Russia, Moscow
-
- Posts: 2697
- Joined: Thu Aug 26, 2004 1:23 pm
-
- Posts: 188
- Joined: Mon Oct 18, 2004 3:58 pm
- Location: Russia, Moscow
-
- Posts: 11349
- Joined: Mon Oct 06, 2003 3:41 pm
- Operating System Version (Optional): Windows 10
- Location: United Kingdom
-
- Posts: 188
- Joined: Mon Oct 18, 2004 3:58 pm
- Location: Russia, Moscow
-
- Posts: 84
- Joined: Fri Feb 13, 2004 7:59 am
- Location: the road to enlightment
-
- Posts: 188
- Joined: Mon Oct 18, 2004 3:58 pm
- Location: Russia, Moscow
-
- Posts: 2053
- Joined: Mon Aug 11, 2003 1:50 pm
- Preferred Pronouns: He/Him
- Location: East Suffolk (UK)
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).
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;
}
-
- Posts: 3302
- Joined: Wed Mar 23, 2005 5:31 pm
- Location: New Jersey
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?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.