MantisBT - Zandronum
View Issue Details
0000981Zandronum[All Projects] Suggestionpublic2012-08-19 01:042014-05-12 00:18
Watermelon 
 
normalfeatureN/A
closedduplicate 
1.0-beta 
 
0000981: Have BLUERETURN and REDRETURN ACS script types PlayerNumber() results in the 'returnee' of the flag
BLUERETURN / REDRETURN / WHITERETURN script types are activated by the world. It would be nice to be able to grab the player number of the player who returned it instead of getting -1 back from the function.

Would it be possible to convert it from World activated to Player activated? Or maybe have it contain a parameter that would have the player number (like DISCONNECT (int playerNum) has) and still run it for the world?



REASON FOR REQUEST:
Allows ACS access to players who return the flag.
One example is that I can record the amount of times someone has returned it and print out who returned the flag the most. The International Doom League uses stuff like this in Odamex for their game stats.
This is the code inside of the attached wad.


#include "zcommon.acs"
#library "PICKTEST"

script 100 BLUERETURN
{
    PrintBold(s: "Returned by: ", d: PlayerNumber());
}
No tags attached.
related to 0001794closed Torr Samaho New script type EVENT 
? PickupTest.wad (330) 2012-08-19 01:04
/tracker/file_download.php?file_id=676&type=bug
Issue History
2012-08-19 01:04WatermelonNew Issue
2012-08-19 01:04WatermelonFile Added: PickupTest.wad
2012-08-19 12:48Torr SamahoNote Added: 0004400
2012-08-19 14:39WatermelonNote Added: 0004403
2012-08-19 14:42WatermelonNote Edited: 0004403bug_revision_view_page.php?bugnote_id=4403#r2410
2012-08-19 14:44DuskNote Added: 0004404
2012-08-19 16:04Torr SamahoNote Added: 0004405
2012-09-01 15:36ZzZomboNote Added: 0004552
2012-09-01 15:37ZzZomboNote Edited: 0004552bug_revision_view_page.php?bugnote_id=4552#r2469
2012-09-01 15:38ZzZomboNote Edited: 0004552bug_revision_view_page.php?bugnote_id=4552#r2470
2012-09-20 19:33WatermelonNote Added: 0004725
2012-10-02 18:53WatermelonNote Added: 0004918
2012-10-03 12:12DuskNote Added: 0004925
2012-10-05 14:58WatermelonNote Added: 0004964
2012-10-05 18:12Blzut3Note Added: 0004965
2014-05-12 00:18WatermelonRelationship addedrelated to 0001794
2014-05-12 00:18WatermelonStatusnew => closed
2014-05-12 00:18WatermelonResolutionopen => duplicate

Notes
(0004400)
Torr Samaho   
2012-08-19 12:48   
I think I could change the activator of these scripts quite easily, but would this break any existing mods?
(0004403)
Watermelon   
2012-08-19 14:39   
(edited on: 2012-08-19 14:42)
I've honestly never come across any wad so far that even uses this. I actually discovered it yesterday by fluke because someone added it on the ZDoomWiki.

I just went through every CTF wad I had and there is none that I've ever played that use any of the PICKUP/COLORFLAGRETURN ACS.

(0004404)
Dusk   
2012-08-19 14:44   
> I actually discovered it yesterday by fluke because someone added it on the ZDoomWiki.
I added them to ZDoom Wiki after stumbling upon them while going through the source code..

I personally think the existing types should get deprecated and superceded by more generalized types, say script X FLAGRETURN (int returner, int team)
(0004405)
Torr Samaho   
2012-08-19 16:04   
Quote from Dusk
I personally think the existing types should get deprecated and superceded by more generalized types, say script X FLAGRETURN (int returner, int team)

Good idea. We should look into this after 1.0 is out.
(0004552)
ZzZombo   
2012-09-01 15:36   
(edited on: 2012-09-01 15:38)
Quote
I think I could change the activator of these scripts quite easily, but would this break any existing mods?

I don't think that currently there is any mods that relies on activator of return scripts because it's pointless.

(0004725)
Watermelon   
2012-09-20 19:33   
> I don't think that currently there is any mods that relies on activator of return scripts because it's pointless.

No it's not pointless (or I wouldn't have opened a ticket with an example that you can see). Play some CTF more with us and you'll see some really interesting applications that would benefit CTF ACS-wise.
(0004918)
Watermelon   
2012-10-02 18:53   
Would it be worth opening a new ticket for the suggestion of stuff like "script X FLAGRETURN (int returner, int team)" ?
(0004925)
Dusk   
2012-10-03 12:12   
I see no reason why we can't handle it here.. since this FLAGRETURN type would address exactly this ticket.
(0004964)
Watermelon   
2012-10-05 14:58   
Would it be difficult to create these new ACS flags?
Also would 'int returner' return the player TID or player number?
(0004965)
Blzut3   
2012-10-05 18:12   
One thing to consider before adding this as a third xRETURN script type, perhaps the behavior module could be scanned for a REDRETURN script and if present use the current behavior. Otherwise replace BLUERETURN with FLAGRETURN and pass those arguments?

There's nothing in particular wrong with just adding a new type, but it does seem wasteful since I think most of the maps that used these scripts are probably already broken by the changes that were made to skulltag.wad over the years. (And ever since the automatic "simple" CTF method was introduce the two script types have been mostly forgotten.)