AAO25.com

Community => Games & Programming => Topic started by: LEEFFM on Wednesday, February 10, 2016, 12:55:47 PM

Title: Respawn For AA2.5
Post by: LEEFFM on Wednesday, February 10, 2016, 12:55:47 PM
i have made a Respawn gamemode mod for AA2.5!

Tested on LAN seems to work great.

- Unlimited Respawn
- 1v1 Respawn
- Auto Respawn 5 seconds after death.
- SpawnProtection for 10 seconds after respawn. (cant be killed)

If Assist added this mod all you would need to do is edit the server.ini (aa25srv.ini) and add:
Code: [Select]
[Engine.Engine]
DefaultServerGame=Assist_GamePlay.AGP_GameTeamObjectiveRespawn

Code: [Select]
[Engine.GameEngine]
ServerActors=Assist_GamePlay.Respawn_Main

AGP_GameTeamObjectiveRespawn.uc:
Code: [Select]
class AGP_GameTeamObjectiveRespawn extends AGP_GameTeamObjective;

state MatchInProgress
{
    function CheckScore(PlayerReplicationInfo Scorer)
    {
        super(AGP_GameDeathMatch).CheckScore(Scorer); // allows respawn
    }
}

Respawn_HumanController.uc:
Code: [Select]
class Respawn_HumanController extends HumanController;

var Respawn_main RM;

event PreBeginPlay ()
{
    super.PreBeginPlay();
    RM=Spawn(Class'Respawn_Main');
    Level.bAllowRespawn = true;
}

state Dead
{
    function BeginState()
    {
        super.BeginState();
        Level.bAllowRespawn = false;
        RM.settimer(5,false);
    }

}

Respawn_main.uc:
Code: [Select]
class Respawn_Main extends Mutator;

var array<AGP_PlayerStart> Spots;

event PreBeginPlay()
{
Level.Game.BaseMutator.AddMutator(self);
    Level.Game.PlayerControllerClassName="Assist_GamePlay.Respawn_HumanController";
    Log("Original Mod by -{DG}-Crusade Modified by BnA.^ LEEFFM",'RespawnMod');
Log("Respawn_Main Loaded",'RespawnMod');
    Level.bAllowRespawn = true;
}

function respawn(PlayerController Sender)
{
local AGP_PlayerStart StartSpot;
local byte i;

i = 0;

foreach Level.AllActors(Class'AGP_PlayerStart',StartSpot)
{
if (StartSpot.TeamNumber == Sender.PlayerReplicationInfo.Team.TeamIndex)
{
Spots[i] = StartSpot;
i++;
}
}

StartSpot = Spots[ Rand(Spots.Length) ];

        if ( (Sender.PlayerReplicationInfo.bDead && Level.bAllowRespawn) || (Sender.PlayerReplicationInfo.bOnlySpectator) && Level.bAllowRespawn )
        {
            Sender.Pawn.Destroy();
            Sender.Pawn = Spawn(Sender.PawnClass,,,StartSpot.Location,StartSpot.Rotation);
            Sender.PlayerReplicationInfo.bOnlySpectator = false;
            Sender.Possess(Sender.Pawn);
            Sender.PawnClass = Sender.Pawn.Class;
            Sender.ClientSetRotation(Sender.Pawn.Rotation);
            if(Sender.Pawn.Class != None)
            {
                Sender.PlayerReplicationInfo.bDead = false;
                Sender.PlayerReplicationInfo.bOutOfLives = false;
                Sender.PlayerReplicationInfo.bIsSpectator = false;
                HumanController(Sender).SetStartupStage(1);
                Sender.bGodMode = True;
                settimer(10,false);
                enable('Tick');
            }
        }
}

function Timer()
{
    local PlayerController PC;

    foreach Level.AllActors(Class'PlayerController',PC)
    {
        if (PC.PlayerReplicationInfo.bDead)
        {
            Level.bAllowRespawn = true;
            respawn(PC);
        }else if (PC.bGodMode)
        {
            PC.bGodMode = false;
        }
    }
}
Title: Re: Respawn For AA2.5
Post by: Vanoke on Wednesday, February 10, 2016, 14:03:11 PM
Leeffm when can i juse it ! and how to puth it in !
Super that you do this :)
Title: Re: Respawn For AA2.5
Post by: LEEFFM on Wednesday, February 10, 2016, 14:13:40 PM
It would have to be added to Assist by the Admins to be used with Assist.

i like the idea of Respawn untracked would be fun.
Title: Re: Respawn For AA2.5
Post by: Vanoke on Wednesday, February 10, 2016, 14:30:39 PM
It would have to be added to Assist by the Admins to be used with Assist.

i like the idea of Respawn untracked would be fun.
i can puth it on a cheat no honor but more good action !
Title: Re: Respawn For AA2.5
Post by: LEEFFM on Wednesday, February 10, 2016, 15:12:40 PM
It can not be added as a ServerMod for a cheat/mod server by a Server Admin, If you want Respawn in Assist then the Assist Admins have to add it meaning you have to ask Assist to add it and there would probably have to be be a vote.
Title: Re: Respawn For AA2.5
Post by: Vanoke on Wednesday, February 10, 2016, 15:28:48 PM
ask it first its simple and faster!
Title: Re: Respawn For AA2.5
Post by: -Vegeta- on Wednesday, February 10, 2016, 16:33:57 PM
Its good for rushers like me. Some of the best fun I had was at the end of AA when respawn was every where.
Title: Re: Respawn For AA2.5
Post by: ~=W!CK!D=~ on Wednesday, February 10, 2016, 19:56:57 PM
Ahahhhahahah trying to make it like bf3 or bf4

No thank you
Title: Re: Respawn For AA2.5
Post by: ~=W!CK!D=~ on Wednesday, February 10, 2016, 19:58:47 PM
It would have to be added to Assist by the Admins to be used with Assist.

i like the idea of Respawn untracked would be fun.

Make ALL servers not to be tracked and I'll be happy lol
Title: Re: Respawn For AA2.5
Post by: Spanky on Thursday, February 11, 2016, 02:31:11 AM
Under certain circumstances and, if a map was built for this purpose, this would be a really neat thing to have officially added.
Title: Re: Respawn For AA2.5
Post by: LEEFFM on Thursday, February 11, 2016, 12:31:56 PM
A Respawn mode could be good for keeping new players, They would be able to play Respawn games until they got the hang of it and played tracked games.

Plus sometimes people just want to play the game and don't wanna wait lol.
Title: Re: Respawn For AA2.5
Post by: SupR3me- on Thursday, February 11, 2016, 13:30:51 PM
A Respawn mode could be good for keeping new players, They would be able to play Respawn games until they got the hang of it and played tracked games.

Plus sometimes people just want to play the game and don't wanna wait lol.

Totally Agree whit u dude gj on this 1 ;)

like to see this in assist.
Title: Re: Respawn For AA2.5
Post by: Alex on Thursday, February 11, 2016, 20:15:50 PM
Due to AA's static spawns, respawn mod would simply boil down to spawn rape, especially since you have to ready your gun when you spawn in AA. You'd have the other team just sitting there killing people before they can even shoot back.
Title: Re: Respawn For AA2.5
Post by: Ganja on Thursday, February 11, 2016, 20:22:12 PM
Due to AA's static spawns, respawn mod would simply boil down to spawn rape, especially since you have to ready your gun when you spawn in AA. You'd have the other team just sitting there killing people before they can even shoot back.

You can be invinsible when you spawn. I think that's how it was back then
Title: Re: Respawn For AA2.5
Post by: Spanky on Thursday, February 11, 2016, 21:28:32 PM
Due to AA's static spawns, respawn mod would simply boil down to spawn rape, especially since you have to ready your gun when you spawn in AA. You'd have the other team just sitting there killing people before they can even shoot back.

I'm pretty sure there's a way to enable staticmeshes viewable by one team only. Simply, this would mean that a teams spawn might possibly be a room that the other team cannot enter.
Title: Re: Respawn For AA2.5
Post by: Vanoke on Friday, February 12, 2016, 04:21:42 AM
This gameplay is already prooft in the past for Border .the 3 difrend spawns will help you to get away from spawn place and  jou have and so far i know the first 5 ore 10 sec you can't be hit in the old mod. Border will de full for sure .players will be happy action till you get tyred from gamin
Title: Re: Respawn For AA2.5
Post by: Possessed on Friday, February 12, 2016, 12:18:53 PM
Code: [Select]

{
    local Vector NewLocation = Pawn(?).StartSpot.Location;

                NewLocation.X += 50;
                NewLocation.Y += 50;  //No need to mess with all 3 axis.
                NewLocation.Z += 120;

                Pawn = Spawn(PawnClass,,,NewLocation,StartSpot.Rotation);
}
Can use this to change the location in real time with config file, console command (Mutate) or even a random vector (who knows where the player will spawn).

http://romerounrealscript.blogspot.com.br/2011/10/using-vectors-in-unrealscript.html (http://romerounrealscript.blogspot.com.br/2011/10/using-vectors-in-unrealscript.html)
https://wiki.beyondunreal.com/Legacy:UnrealScript_Vector_Maths (https://wiki.beyondunreal.com/Legacy:UnrealScript_Vector_Maths)
Title: Re: Respawn For AA2.5
Post by: Vanoke on Friday, February 12, 2016, 19:25:07 PM
I feel the right spirit is comming hooah !
Title: Re: Respawn For AA2.5
Post by: LEEFFM on Friday, February 12, 2016, 20:34:14 PM
The way crusade did it was he set God Mode true in the Respawn command and then set a timer, when the timer runs out God Mode turns to false.

Ive edited the original post to include it.

Tested on LAN, No known issues.

Additions to SOCOMPlayerController.uc:
Code: [Select]
class SOCOMPlayerController extends HumanController;

var SOCOMGameM SGM; //added

replication
{
  reliable if ( Role < 4 )
    respawn;
}

event PreBeginPlay () //added
{
    super.PreBeginPlay();
    SGM=Spawn(Class'SOCOMGameM');
}

exec function respawn ()
{
    if (PlayerReplicationInfo.bDead)
    {
        UnPossess ();
        Pawn.Destroy ();
        Pawn = Spawn(PawnClass,,,StartSpot.Location,StartSpot.Rotation);
        Possess (Pawn) ;
        PawnClass = Pawn.Class;
        ClientSetRotation(Pawn.Rotation);
        if(Pawn.Class != None)
        {
            PlayerReplicationInfo.bDead = false;
            PlayerReplicationInfo.bOutOfLives = false;
            PlayerReplicationInfo.bIsSpectator = false;
            SetStartupStage(6);
            bGodMode = True; // added
            SGM.settimer(10,false); //added
        }
    }
}

added SOCOMGameM.uc:
Code: [Select]
class SOCOMGameM extends Mutator;

event PreBeginPlay ()
{
Level.Game.BaseMutator.AddMutator(self);
}

function Timer ()
{
    local PlayerController PC;

foreach Level.AllActors(Class'PlayerController',PC)
{
PC.bGodMode = false;
}
}
Title: Re: Respawn For AA2.5
Post by: -Vegeta- on Saturday, February 13, 2016, 12:00:19 PM
It worked just fine when they had it before on bridge anyway. And yes there was a bit of spawn rape. But it also back fired and worked both ways.
Title: Re: Respawn For AA2.5
Post by: Galle on Saturday, February 13, 2016, 20:22:04 PM
I remember these respawn games. They were great fun but it always went that way that one team trapped other in one area. Many spawn points would help in that but I would be carefull to use right maps for this where it works.  :style:
Title: Re: Respawn For AA2.5
Post by: LEEFFM on Monday, February 15, 2016, 22:51:18 PM
Original Post Updated.
Title: Re: Respawn For AA2.5
Post by: -Vegeta- on Tuesday, February 16, 2016, 10:13:13 AM
SO is it up and running or does it need aproved by the admins or what?
Title: Re: Respawn For AA2.5
Post by: teddy_grizzly_bear on Tuesday, February 16, 2016, 10:46:32 AM
You should be able to run it as an untracked mod.
Title: Re: Respawn For AA2.5
Post by: LEEFFM on Tuesday, February 16, 2016, 10:55:32 AM
I thought that anytime you extend a GameInfo class, PlayerController class that it has to be included Clientside (i could be wrong lol). it would have to be added to the ServerPackages (in the Server.ini) for sure to work.
Title: Re: Respawn For AA2.5
Post by: teddy_grizzly_bear on Tuesday, February 16, 2016, 11:44:18 AM
I'm not sure. But I have seen respawn mods without having to have anything on the client side.
Title: Re: Respawn For AA2.5
Post by: LEEFFM on Tuesday, February 16, 2016, 12:05:11 PM
yes i know there is a Server Mod i modified it (Posted in Games & Programming) so its a little better then the original, but this version would work the best and be a true Respawn GameMode.
Title: Re: Respawn For AA2.5
Post by: -Vegeta- on Tuesday, February 16, 2016, 12:06:00 PM
You got a server leeffm? Am sure Merlin would give it a go if not. Eh Merlin?
Title: Re: Respawn For AA2.5
Post by: LEEFFM on Tuesday, February 16, 2016, 13:02:16 PM
Ive added the ServerMod version of the RespawnMod tothe UltimateMod i relaesed here:
http://aao25.com/forum/games-programming/ultimatemod-v1-1-release (http://aao25.com/forum/games-programming/ultimatemod-v1-1-release)!/

Ive added the UltimateMod to:
BnA.^ Brothers !n Arms Server | Minneapolis Respawn (the server is run on my laptop, not always up)

I cannot join my own server as my router does not allow NAT LoopBack :(
Title: Re: Respawn For AA2.5
Post by: Vanoke on Thursday, February 18, 2016, 06:26:49 AM
Ad the moment the sec player can`t get in the server, so we must wait for solution sorry it take time and work to make it run !!!! wait for it  :shock:

Be welcome to tryout respawn and pick a weapon on PUF CLAN BORDER so far so good thx to Mr. LEEFFM  to make this work. Hope people will like it  . ther will be possible more updates to make thing better . HOOAH !
(https://aao25.com/forum/proxy.php?request=http%3A%2F%2Fimagizer.imageshack.us%2Fv2%2Fxq90%2F923%2FDrEzja.jpg&hash=b5a083ae4dce92eafb8253e6dcd6a25d) (https://imageshack.com/i/pnDrEzjaj)
Title: Re: Respawn For AA2.5
Post by: Vanoke on Saturday, February 20, 2016, 18:03:21 PM
After now trying out respawn agan on several maps. Border :Maap pipeline : Extraction. I can say and not only me that this is good fun and will bring action back on several game maps. I do hoop this will be a opening for Mr.  Leeffm to team assist to listerning and work together in this. Respawn now has som issues and need for full working the help from assist.   THX  For gameplay Leeffm good luck =puf=vanoke
p.s. to get in respawn server when you are in push :W ore F2 with 8 players server can handle the situation 90%