View previous topic :: View next topic |
Author |
Message |
Cybershark Spamming!
Joined: 05 Jan 2005 Location: off the grid, but still fighting for the users!
|
Posted: Mon Mar 11, 2013 8:11 pm Post subject: Team-specific damage |
|
|
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 |
|
|
Ronald Rontard
Joined: 17 Aug 2005 Location: Netherlands Clan: [QnB]
|
Posted: Mon Mar 11, 2013 8:43 pm Post subject: |
|
|
This would be very useful for "Kill The Cyberdemon" indeed. |
|
Back to top |
|
|
Empyre Unstoppable!
Joined: 13 Dec 2006 Location: Texas, USA
|
Posted: Tue Mar 12, 2013 12:07 am Post subject: |
|
|
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 |
|
|
Ronald Rontard
Joined: 17 Aug 2005 Location: Netherlands Clan: [QnB]
|
Posted: Tue Mar 12, 2013 7:25 am Post subject: |
|
|
@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 |
|
|
BestOfTheWorst Unstoppable!
Joined: 02 Jun 2006
|
Posted: Tue Mar 12, 2013 11:51 am Post subject: |
|
|
This suggestion is missing something kinda vital in order for the suggested properties to work at all..
A way to specify what team non-player actors belong to. |
|
Back to top |
|
|
Ronald Rontard
Joined: 17 Aug 2005 Location: Netherlands Clan: [QnB]
|
Posted: Tue Mar 12, 2013 12:25 pm Post subject: |
|
|
Let me think... The Thing ID of the actor to which the script should apply to? |
|
Back to top |
|
|
Cybershark Spamming!
Joined: 05 Jan 2005 Location: off the grid, but still fighting for the users!
|
Posted: Thu Mar 14, 2013 9:57 pm Post subject: Re: Team-specific damage |
|
|
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 |
|
|
Empyre Unstoppable!
Joined: 13 Dec 2006 Location: Texas, USA
|
Posted: Thu Mar 14, 2013 11:16 pm Post subject: Re: Team-specific damage |
|
|
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 |
|
|
|