Re: The 'Show Off' thread - Part 2
Quote:
Originally Posted by
SecretsOThePast
The five second delay in picking up the flag is intentional. It's so a malicious user cannot exploit the system as easily. It also makes for cleaner world item handling. In the future maybe i'll make a clientsided timer but for now the serversided one appears to work better. It even adds strategy in picking up your own flag, you may want to clear out a friendly base in Mansion, for example, so they cannot prevent you from capturing the flag.
In other news, RaGEZONE's Wucas gave me some things to play with, you can see one of them here. The logic is also fixed and points are awarded to the proper team. Wucas added a very familiar announcer to the mix:
secretsothep - Gunz: CTF Test #2 -- Now with more logic.
That awkward moment when 'Capture the flag' already 70% coded even more, it's the same as 'Assassinate' but you need to add Flag and so other shit.
Re: The 'Show Off' thread - Part 2
Quote:
Originally Posted by
qet123
That awkward moment when 'Capture the flag' already 70% coded even more, it's the same as 'Assassinate' but you need to add Flag and so other shit.
I'm not sure if you know this but my capture the flag is very far from assassinate. I didn't use a bit of the assassinate code, you should probably get your facts straight before railing my project that I am still planning on releasing to even ungrateful people like yourself.
Most of it is new code or existing handlers to handle new code. A lot of instances are considered, checked, and checked again when it comes to handling the flag.
Here's a snippet from the main logic for grabbing a flag, this handler is also casted from the CTF captures upon capturing a flag:
Code:
void MMatchRuleTeamCTF::OnObtainWorldItem(MMatchObject* pObj, int nItemID, int* pnExtraValues)
{
if( 0 == pObj )
return;
if (m_pStage == NULL)
{
SetBlueFlagObtained(false);
SetRedFlagObtained(false);
SetBlueCarrier(MUID(0,0));
SetRedCarrier(MUID(0,0));
return;
}
MMatchObject* pObtainer = pObj;
MMatchTeam nTeam = pObj->GetTeam();
if(MMT_BLUE == nTeam)
{
if(IsRedFlagTaken() == false && nItemID == RED_ITEM_ID)
{
MUID obtainerUID = pObtainer->GetUID();
// this is a grab
SetRedFlagObtained(true);
m_pStage->m_WorldItemManager.ChangeFlagState(false, MMT_RED);
SetBlueCarrier(obtainerUID);
RouteAssignFlag(obtainerUID, nTeam);
}
else if(IsBlueFlagTaken() == false && nItemID == BLUE_ITEM_ID && IsRedFlagTaken() == true)
{
SetBlueFlagObtained(false);
SetRedFlagObtained(false);
SetBlueCarrier(MUID(0,0));
SetRedCarrier(MUID(0,0));
m_pStage->AddTeamKills(nTeam);
m_pStage->m_WorldItemManager.ChangeFlagState(true, MMT_RED);
RouteAssignCap(nTeam);
//this is a cap
}
else
{
return;
}
}
else if(MMT_RED == nTeam) //reverse logic
{
if(IsBlueFlagTaken() == false && nItemID == BLUE_ITEM_ID)
{
MUID obtainerUID = pObtainer->GetUID();
// this is a grab
SetBlueFlagObtained(true);
m_pStage->m_WorldItemManager.ChangeFlagState(false, MMT_BLUE);
SetRedCarrier(obtainerUID);
RouteAssignFlag(obtainerUID, nTeam);
}
else if(IsBlueFlagTaken() == true && nItemID == RED_ITEM_ID && IsRedFlagTaken() == false)
{
SetBlueFlagObtained(false);
SetRedFlagObtained(false);
SetBlueCarrier(MUID(0,0));
SetRedCarrier(MUID(0,0));
m_pStage->AddTeamKills(nTeam);
m_pStage->m_WorldItemManager.ChangeFlagState(true, MMT_BLUE);
RouteAssignCap(nTeam);
//this is a cap
}
else
{
return;
}
}
else
{
return; //haxxors!
}
}
Re: The 'Show Off' thread - Part 2
Quote:
Originally Posted by
SecretsOThePast
I'm not sure if you know this but my capture the flag is very far from assassinate. I didn't use a bit of the assassinate code, you should probably get your facts straight before railing my project that I am still planning on releasing to even ungrateful people like yourself.
Most of it is new code or existing handlers to handle new code. A lot of instances are considered, checked, and checked again when it comes to handling the flag.
Here's a snippet from the main logic for grabbing a flag, this handler is also casted from the CTF captures upon capturing a flag:
Code:
void MMatchRuleTeamCTF::OnObtainWorldItem(MMatchObject* pObj, int nItemID, int* pnExtraValues)
{
if( 0 == pObj )
return;
if (m_pStage == NULL)
{
SetBlueFlagObtained(false);
SetRedFlagObtained(false);
SetBlueCarrier(MUID(0,0));
SetRedCarrier(MUID(0,0));
return;
}
MMatchObject* pObtainer = pObj;
MMatchTeam nTeam = pObj->GetTeam();
if(MMT_BLUE == nTeam)
{
if(IsRedFlagTaken() == false && nItemID == RED_ITEM_ID)
{
MUID obtainerUID = pObtainer->GetUID();
// this is a grab
SetRedFlagObtained(true);
m_pStage->m_WorldItemManager.ChangeFlagState(false, MMT_RED);
SetBlueCarrier(obtainerUID);
RouteAssignFlag(obtainerUID, nTeam);
}
else if(IsBlueFlagTaken() == false && nItemID == BLUE_ITEM_ID && IsRedFlagTaken() == true)
{
SetBlueFlagObtained(false);
SetRedFlagObtained(false);
SetBlueCarrier(MUID(0,0));
SetRedCarrier(MUID(0,0));
m_pStage->AddTeamKills(nTeam);
m_pStage->m_WorldItemManager.ChangeFlagState(true, MMT_RED);
RouteAssignCap(nTeam);
//this is a cap
}
else
{
return;
}
}
else if(MMT_RED == nTeam) //reverse logic
{
if(IsBlueFlagTaken() == false && nItemID == BLUE_ITEM_ID)
{
MUID obtainerUID = pObtainer->GetUID();
// this is a grab
SetBlueFlagObtained(true);
m_pStage->m_WorldItemManager.ChangeFlagState(false, MMT_BLUE);
SetRedCarrier(obtainerUID);
RouteAssignFlag(obtainerUID, nTeam);
}
else if(IsBlueFlagTaken() == true && nItemID == RED_ITEM_ID && IsRedFlagTaken() == false)
{
SetBlueFlagObtained(false);
SetRedFlagObtained(false);
SetBlueCarrier(MUID(0,0));
SetRedCarrier(MUID(0,0));
m_pStage->AddTeamKills(nTeam);
m_pStage->m_WorldItemManager.ChangeFlagState(true, MMT_BLUE);
RouteAssignCap(nTeam);
//this is a cap
}
else
{
return;
}
}
else
{
return; //haxxors!
}
}
Very Nice. Just wanted to ask SecretOThePast, any way you can get a message pop up in the chat when you have caught the flag, so if i grab the enemy flag on our teams chat it shows "You have captured the enemy flag" and in the enemies chat it shoes "Your flag has been captured".
Anychance thats possible?
Re: The 'Show Off' thread - Part 2
Quote:
Originally Posted by
Duluxe
Very Nice. Just wanted to ask SecretOThePast, any way you can get a message pop up in the chat when you have caught the flag, so if i grab the enemy flag on our teams chat it shows "You have captured the enemy flag" and in the enemies chat it shoes "Your flag has been captured".
Anychance thats possible?
The current netcode setup allows for this.
If your flag is taken, it will send a notification to all clients saying 'blue team has the flag!' or 'red team has the flag!' as a voice message, which is called in ApplyWorldItem.
I also added some clientside sanity checks in addition to the serverside ones; the client will no longer send a "I got the flag!" packet to the server if they are incapable of taking the flag. Likewise the item will not disappear or go into a picked up state if a flag is taken.
This eliminates the disappearing flag issue, (it actually wasn't as fun as I thought), as well as an issue where the flag would appear when it wasn't supposed to (ie; after being taken.). The server now disables the flag from respawning the moment it is taken. When the flag is captured, the person holding the flag leaves the room, or the person holding the flag is killed, the flag will reset to the default position and start spawning again normally.
You can check the team against your player and update with a message, tab list highlight, or whatever you want then. Currently, I only have the sound for it but in the release there will be text similar to "Let's Rock!" that appears on the screen every time a flag is taken/dropped/captured in addition to the normal voiceovers.
Re: The 'Show Off' thread - Part 2
Quote:
Originally Posted by
SecretsOThePast
The current netcode setup allows for this.
If your flag is taken, it will send a notification to all clients saying 'blue team has the flag!' or 'red team has the flag!' as a voice message, which is called in ApplyWorldItem.
I also added some clientside sanity checks in addition to the serverside ones; the client will no longer send a "I got the flag!" packet to the server if they are incapable of taking the flag. Likewise the item will not disappear or go into a picked up state if a flag is taken.
This eliminates the disappearing flag issue, (it actually wasn't as fun as I thought), as well as an issue where the flag would appear when it wasn't supposed to (ie; after being taken.). The server now disables the flag from respawning the moment it is taken. When the flag is captured, the person holding the flag leaves the room, or the person holding the flag is killed, the flag will reset to the default position and start spawning again normally.
You can check the team against your player and update with a message, tab list highlight, or whatever you want then. Currently, I only have the sound for it but in the release there will be text similar to "Let's Rock!" that appears on the screen every time a flag is taken/dropped/captured in addition to the normal voiceovers.
So basically it does come up with the message just not a text, but as a voice message?
Re: The 'Show Off' thread - Part 2
Quote:
Originally Posted by
Duluxe
So basically it does come up with the message just not a text, but as a voice message?
In the official release, it will be a voice message, and a message similar to the text that says Let's Rock! that appears when a round starts.
No chat message will be in the official release. If you absolutely need to add it in, it wouldn't be hard. Simply add a chat message to your chat box in code.
Re: The 'Show Off' thread - Part 2
Quote:
Originally Posted by
SecretsOThePast
In the official release, it will be a voice message, and a message similar to the text that says Let's Rock! that appears when a round starts.
Ahh thats great, i just didnt want it to do nothing if u captured the flag.
Thanks ever soo much
Re: The 'Show Off' thread - Part 2
Quote:
Originally Posted by
SecretsOThePast
In the official release, it will be a voice message, and a message similar to the text that says Let's Rock! that appears when a round starts.
No chat message will be in the official release. If you absolutely need to add it in, it wouldn't be hard. Simply add a chat message to your chat box in code.
Is there going to be texts and voices when someone will lose the flag too?
Re: The 'Show Off' thread - Part 2
Quote:
Originally Posted by
Z1ls
Is there going to be texts and voices when someone will lose the flag too?
I hope so.
Re: The 'Show Off' thread - Part 2
This is what I gave SecretsOfThePast.
tfx_ctf.rar (Being complete)
Quote:
"tfx_ctf.psd" contains all of the images including their alphas.
They were all created in the 220x800 format, then scaled down on export.
MAX files will also be included with all movement/ meshes added since placement on the screen also since they are directly attributed to the location in which the 2D effect is placed on the screen.
ctf_00.elu: Mesh: "Capture the Flag"
ctf_01.elu: Mesh: "Red Flag Dropped"
ctf_02.elu: Mesh: "Red Flag Returned"
ctf_03.elu: Mesh: "Red SCORE!"
ctf_04.elu: Mesh: "Blue Flag Dropped"
ctf_05.elu: Mesh: "Blue Flag Returned"
ctf_06.elu: Mesh: "Blue SCORE!"
ctf_00.elu.ani: Movement: "Capture the Flag"
ctf_01.elu.ani: Movement: "Red Flag Dropped"
ctf_02.elu.ani: Movement: "Red Flag Returned"
ctf_03.elu.ani: Movement: "Red SCORE!"
ctf_04.elu.ani: Movement: "Blue Flag Dropped"
ctf_05.elu.ani: Movement: "Blue Flag Returned"
ctf_06.elu.ani: Movement: "Blue SCORE!"
ctf_00.dds: Texture: "Capture the Flag"
ctf_01.dds: Texture: "Red Flag Dropped"
ctf_02.dds: Texture: "Red Flag Returned"
ctf_03.dds: Texture: "Red SCORE!"
ctf_04.dds: Texture: "Blue Flag Dropped"
ctf_05.dds: Texture: "Blue Flag Returned"
ctf_06.dds: Texture: "Blue SCORE!"
sfx_ctf.rar
Quote:
Place files in "/sound/effect/nar.mrs"
NAR30 "Capture the Flag."
NAR31 "Blue team has the Flag."
NAR32 "Red team has the Flag."
NAR33 "Blue team Flag returned."
NAR34 "Red team Flag returned."
NAR35 "Blue team score!"
NAR36 "Red team score!"
Edited: Changed due to Wucas being awesome.
Re: The 'Show Off' thread - Part 2
Quote:
Originally Posted by
Z1ls
Is there going to be texts and voices when someone will lose the flag too?
See Wucas' post. Short answer, yes.
Re: The 'Show Off' thread - Part 2
Re: The 'Show Off' thread - Part 2
Kinda showing off, since I finally figured out how to fade textures in Gunz. Took 3 hours of reading through source material and trial and error in max but the outcome is so worth it. (To bad the gif kinda failed a bit lol)
http://i.imgur.com/46ehT.gif
Re: The 'Show Off' thread - Part 2
Quote:
Originally Posted by
Wucas
Kinda showing off, since I finally figured out how to fade textures in Gunz. Took 3 hours of reading through source material and trial and error in max but the outcome is so worth it. (To bad the gif kinda failed a bit lol)
http://i.imgur.com/46ehT.gif
Very Nice..
Re: The 'Show Off' thread - Part 2
Quote:
Originally Posted by
Duluxe
Very Nice..
Here's a GIF guide! (5 Second Delay So You Dont Have To Rush)
http://i.imgur.com/dL7G2.gif