Link Monsters

Moderator: GZDoom Developers

User avatar
Renegade
Posts: 83
Joined: Mon Dec 31, 2007 6:39 pm
Location: Alberta, Canada
Contact:

Link Monsters

Post by Renegade »

I was thinking earlier that it would be nice if you could Link monsters together so that, if one of them knows where you are, they all know where you are. An example would be if there was a pillar in a room, and you hide behind it, you could forseeably kill all the monsters on one side of a room without the others ever noticing you (this only applies if the Ambush flag is set).
User avatar
Project Shadowcat
Posts: 9369
Joined: Thu Jul 14, 2005 8:33 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: Blacksburg, SC USA
Contact:

Re: Link Monsters

Post by Project Shadowcat »

A squad feature, you're suggesting?
User avatar
Renegade
Posts: 83
Joined: Mon Dec 31, 2007 6:39 pm
Location: Alberta, Canada
Contact:

Re: Link Monsters

Post by Renegade »

Sure, that's also a name it could have.
User avatar
Project Shadowcat
Posts: 9369
Joined: Thu Jul 14, 2005 8:33 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: Blacksburg, SC USA
Contact:

Re: Link Monsters

Post by Project Shadowcat »

Renegade wrote:Sure, that's also a name it could have.
I'd certainly use it, but is there an easy way of going about this? :?
User avatar
Zhs2
Posts: 1303
Joined: Fri Nov 07, 2008 3:29 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Maryland, USA, but probably also in someone's mod somewhere
Contact:

Re: Link Monsters

Post by Zhs2 »

A quick workaround to something like this would be to have a monster have [wiki]A_AlertMonsters[/wiki] in his Chase state, but it'd most likely alert monsters you DON'T want alerted. This could be averted with careful map planning, though.
MDenham
Posts: 161
Joined: Sun Oct 14, 2007 2:23 am

Re: Link Monsters

Post by MDenham »

Zhs2 wrote:A quick workaround to something like this would be to have a monster have [wiki]A_AlertMonsters[/wiki] in his Chase state, but it'd most likely alert monsters you DON'T want alerted. This could be averted with careful map planning, though.
This could also be done with Thing_Hate - you'd need to use a common TID for all monsters of a specific group, and then just do Thing_Hate(tid, tidtohate, X) as one of the first actions upon getting a target. (At least, presumably this should work, assuming Thing_Hate will in fact hit all monsters with the same tid and give them the proper target. It runs into issues when you have a crossfire between two groups, but this can probably be avoided by checking to ensure that tidtohate is a player's TID.)
User avatar
Tormentor667
Posts: 13556
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: Link Monsters

Post by Tormentor667 »

But then they wouldn't move synchronically
User avatar
Project Shadowcat
Posts: 9369
Joined: Thu Jul 14, 2005 8:33 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: Blacksburg, SC USA
Contact:

Re: Link Monsters

Post by Project Shadowcat »

Tormentor667 wrote:But then they wouldn't move synchronically
They don't necessarily have to. I just think the original suggestion is to get a specific group of monsters to attack the player in case one of their kind is under fire, or spots the player. They're working together to help each other and make the player a serious problem.
User avatar
Renegade
Posts: 83
Joined: Mon Dec 31, 2007 6:39 pm
Location: Alberta, Canada
Contact:

Re: Link Monsters

Post by Renegade »

Right now I'm using a Thing_Hate in the Thing Special of the monsters, so if one of them dies the rest attack. But this isn't the best solution because one of the monsters has to die before the others will attack. AND, if there is an infight happening and you kill one of them, they all forget about the infight and go after the player again. This solution also wouldn't really work for Multiplayer Coop maps.
User avatar
Spleen
Posts: 497
Joined: Fri Nov 28, 2008 7:07 pm

Re: Link Monsters

Post by Spleen »

Renegade wrote:Right now I'm using a Thing_Hate in the Thing Special of the monsters, so if one of them dies the rest attack. But this isn't the best solution because one of the monsters has to die before the others will attack. AND, if there is an infight happening and you kill one of them, they all forget about the infight and go after the player again. This solution also wouldn't really work for Multiplayer Coop maps.
If you assign them all the same TID, you call a script that uses a combination of ActivatorTID and Thing_Hate.
User avatar
Renegade
Posts: 83
Joined: Mon Dec 31, 2007 6:39 pm
Location: Alberta, Canada
Contact:

Re: Link Monsters

Post by Renegade »

I'm sorry, but how does this help?
User avatar
Spleen
Posts: 497
Joined: Fri Nov 28, 2008 7:07 pm

Re: Link Monsters

Post by Spleen »

When the monster with some id activates the script because it is in pain, the script will make it so every other monster with the same id (using activatorid) will hate (using thing_hate) the player.
User avatar
Renegade
Posts: 83
Joined: Mon Dec 31, 2007 6:39 pm
Location: Alberta, Canada
Contact:

Re: Link Monsters

Post by Renegade »

Yes, except Thing Specials only execute when a monster dies. And even if I did use decorate to execute a script in the pain state, monsters don't always enter the pain state. AND, this still wouldn't eliminate the problem with infighting and Coop.
User avatar
Spleen
Posts: 497
Joined: Fri Nov 28, 2008 7:07 pm

Re: Link Monsters

Post by Spleen »

Renegade wrote:Yes, except Thing Specials only execute when a monster dies. And even if I did use decorate to execute a script in the pain state, monsters don't always enter the pain state. AND, this still wouldn't eliminate the problem with infighting and Coop.
what if you put it in the see state instead of the pain state?
User avatar
Renegade
Posts: 83
Joined: Mon Dec 31, 2007 6:39 pm
Location: Alberta, Canada
Contact:

Re: Link Monsters

Post by Renegade »

That's a thought, however the persistant problems here are the infighting and the coop.
Although I suppose there could just be a variable indicating if that particular thing id has already been alerted to your presence, so that it could only happen once for each 'squad', which would eliminate the infighting problem.
I guess the only problem that remains here is coop play. Because using Thing_Hate would force all the monsters to attack one player, even if all the players were shooting at them.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”