ZDaemon Forum Index ZDaemon
Client/Server DOOM
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Team-specific damage

 
Post new topic   Reply to topic    ZDaemon Forum Index -> Pending Requests
View previous topic :: View next topic  
Author Message
Cybershark
Spamming!


Joined: 05 Jan 2005
Location: off the grid, but still fighting for the users!

PostPosted: Mon Mar 11, 2013 8:11 pm    Post subject: Team-specific damage Reply with quote

One problem with softcoded teammodes is that all teams can damage any shootable actor. Another old problem (which can be bundled in with this) is that all projectiles are indiscriminate in the damage they cause.

A great example of the drawbacks of both sets of behaviour can be found in Ronald's old "Kill The Cyberdemon" project. Red and blue can damage either Cyberdemon, and either Cyberdemon can kill a player on any team. Ideally, red Cyberdemon should be unable to injure red players and should only be vulnerable to blue fire.

Perhaps one of the undefined DEHACKED bits could be used as a "team damage" definer? Or using a parameter - in the same way that the A_SPAWN codepointer does? Here the parameter would presumably be added to the actor's death state instead.

(I would suggest using an ACS argument - the same way that the gravity fix for the KotH point was achieved - but that might clash with an ACS thing action performed on the thing's death.)

A range of values would make most sense for this, and could be interpreted differently depending on whether the actor was a projectile or not:

0 - actor can be damaged by all teams / projectile damages all teams
1 - actor can only be damaged by enemy teams / projectile damages enemy team only
2 - actor can only be damaged by home team / projectile damages home team only
3 - actor cannot be damaged by any team / projectile damages no team


Last edited by Cybershark on Thu Mar 14, 2013 9:59 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Ronald
Rontard


Joined: 17 Aug 2005
Location: Netherlands Clan: [QnB]

PostPosted: Mon Mar 11, 2013 8:43 pm    Post subject: Reply with quote

This would be very useful for "Kill The Cyberdemon" indeed.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Empyre
Unstoppable!


Joined: 13 Dec 2006
Location: Texas, USA

PostPosted: Tue Mar 12, 2013 12:07 am    Post subject: Reply with quote

Having 3 values would require 2 bits, not 1, so how about treating them like 2 flags?
They would be Cannot be damaged by home team, and Cannot be damaged by enemy teams (shorter names would be good, if you can think of some). They would both default to 0 for off, which is the current behavior.
Back to top
View user's profile Send private message Send e-mail
Ronald
Rontard


Joined: 17 Aug 2005
Location: Netherlands Clan: [QnB]

PostPosted: Tue Mar 12, 2013 7:25 am    Post subject: Reply with quote

@Empyre

That makes sense and is probably less work for the development team to implement. If they accept the request that is.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
BestOfTheWorst
Unstoppable!


Joined: 02 Jun 2006

PostPosted: Tue Mar 12, 2013 11:51 am    Post subject: Reply with quote

This suggestion is missing something kinda vital in order for the suggested properties to work at all.. Razz

A way to specify what team non-player actors belong to.
Back to top
View user's profile Send private message
Ronald
Rontard


Joined: 17 Aug 2005
Location: Netherlands Clan: [QnB]

PostPosted: Tue Mar 12, 2013 12:25 pm    Post subject: Reply with quote

Let me think... The Thing ID of the actor to which the script should apply to?
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Cybershark
Spamming!


Joined: 05 Jan 2005
Location: off the grid, but still fighting for the users!

PostPosted: Thu Mar 14, 2013 9:57 pm    Post subject: Re: Team-specific damage Reply with quote

Forgot the 3rd team-specific case:

3 - actor cannot be damaged by any team / projectile damages no team

BestOfTheWorst wrote:
This suggestion is missing...
A way to specify what team non-player actors belong to.

Got carried away. Substitute "red" and "blue" for "home" and "enemy" in the OP.
Back to top
View user's profile Send private message Visit poster's website
Empyre
Unstoppable!


Joined: 13 Dec 2006
Location: Texas, USA

PostPosted: Thu Mar 14, 2013 11:16 pm    Post subject: Re: Team-specific damage Reply with quote

Cybershark wrote:
Substitute "red" and "blue" for "home" and "enemy" in the OP.

But what if there are more than 2 teams? We would need 4 flags, one for each team. The default for each flag would be damaging (or recieving damage from) that team.
Another alternative would also use 4 bits. The first 2 bits would be as you describe in the OP, with home and enemy teams, and the other 2 bits would specify to which team the object belongs.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    ZDaemon Forum Index -> Pending Requests All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group