logo
Main

Forums

Downloads

Unreal-Netiquette

Donate for Oldunreal:
Donate

borderline

Links to our wiki:
Wiki

Walkthrough

Links

Tutorials

Unreal Reference

Usermaps

borderline

Contact us:
Submit News
Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) Reload Map On Death [Request] (Read 5681 times)
ti.teg.tnod.I
New Member
*
Offline


Oldunreal member

Posts: 11
Location: Ontario
Joined: May 31st, 2010
Gender: Male
Reload Map On Death [Request]
Nov 18th, 2010 at 2:41am
Print Post  
I was wondering if someone could either make or assist me in making a mod that (on coop) reloads the map on death or loads the state everyone was in when the map was initially loaded.

Thanks Smiley

Edit:

Okay this is an outline of what I want!

I want the mod to restart the current map on a player death forcing the players to work together (Of course there will often be administrators online to prevent lamers). I would like the mod to retain the inventory and frags that the players had from the start of the level (But if this is not possible / easy don't worry about it).

That's pretty much it, nothing fancy just changes the feel of the game a little bit. I plan on getting on VOIP and chatting it up with 6-8 friends while playing on this server and I want cooperation to be a big deal in this server. I think I'll also recover some of my old mods (Lost after a hard drive wipe, ran dd on the wrong drive -.-) if I can (Because I think I gave a couple to a friend of mine), which are improved upon versions of the current Unreal monsters (Making them 2x-10x more challenging), and a couple weapons I designed.

I also intend on using the Gemdagger mod with this, though I've noticed a few months ago that I can't allow users to purchase ammo through the mod (At least on the version posted on hypernl.tk), is there a version of the aura pack that has a gemdagger which supports this?

Thank you all for your support.
« Last Edit: Nov 20th, 2010 at 5:07pm by ti.teg.tnod.I »  
Back to top
 
IP Logged
 
Pcube
Ex Member


Re: Reload Map On Death [Request]
Reply #1 - Nov 18th, 2010 at 4:57am
Print Post  
Actually, Jackrabbit has already made a gametype that does something like this (and it's pretty damn fun at that!). I'll tell him about this thread and maybe he'll share it. Wink

Ok apparently he saw this thread and told me on MSN the following...

Quote:
jackrabb!t says (8:58 PM):
*WOW fuck that guy
*not responding


:/
  
Back to top
 
IP Logged
 
ti.teg.tnod.I
New Member
*
Offline


Oldunreal member

Posts: 11
Location: Ontario
Joined: May 31st, 2010
Gender: Male
Re: Reload Map On Death [Request]
Reply #2 - Nov 18th, 2010 at 4:59am
Print Post  
Quote:
Actually, Jackrabbit has already made a gametype that does something like this (and it's pretty damn fun at that!). I'll tell him about this thread and maybe he'll share it. Wink


Okay thank you! I would prefer to stay with JCoopz though so hopefully he's willing to share some UScript to accomplish this Smiley.

Edit: Noticed xCoop open-source, also noticed xCoop isn't bad. What's up with his attitude? Does xCoop have this feature?
  
Back to top
 
IP Logged
 
Pcube
Ex Member


Re: Reload Map On Death [Request]
Reply #3 - Nov 18th, 2010 at 2:44pm
Print Post  
ti.teg.tnod.I wrote on Nov 18th, 2010 at 4:59am:
Quote:
Actually, Jackrabbit has already made a gametype that does something like this (and it's pretty damn fun at that!). I'll tell him about this thread and maybe he'll share it. Wink


Okay thank you! I would prefer to stay with JCoopz though so hopefully he's willing to share some UScript to accomplish this Smiley.

Edit: Noticed xCoop open-source, also noticed xCoop isn't bad. What's up with his attitude? Does xCoop have this feature?


xCoop's open source but doesn't have this feature. I mentioned the topic to jackrabbit, but he seemed offended by 'jcoopz' and made that remark.
  
Back to top
 
IP Logged
 
Jkrit
God Member
*****
Offline



Posts: 811
Location: USA
Joined: Oct 7th, 2007
Gender: Male
Re: Reload Map On Death [Request]
Reply #4 - Nov 18th, 2010 at 4:18pm
Print Post  
that is correct.  As a server owner and a modder, I could never understand how jCoopZ could be the ideal gametype for something such as this. 

Making a mutator like this for JCoopZ would require you to be able to look at the source of the gametype and as you may or may not know, JCoopZ is a closed source gametype which makes this near impossible without asking Zombie to do it himself. 

Unfortunatly, XCoop is probably not the ideal gametype to do this on either, because it will soon be considered abandonware by the new open source gametype for unreal that is 90% complete by Pcube here.  That will have to wait until February or something.  I would recommend you start a brand new gametype instead which subclasses "unrealshare.coopgame".  If I find the time to start working on it, I'll let you know here.  Converting my old XCoop code to non-xcoop code might be tough considering all the functions I can use to my advantage in xcoop.  It might be best just to wait for this new gametype to be released.

-Jackrabbit (lol Like you didn't know it was by me)
  

Back to top
 
IP Logged
 
ti.teg.tnod.I
New Member
*
Offline


Oldunreal member

Posts: 11
Location: Ontario
Joined: May 31st, 2010
Gender: Male
Re: Reload Map On Death [Request]
Reply #5 - Nov 18th, 2010 at 11:09pm
Print Post  
Jkrit wrote on Nov 18th, 2010 at 4:18pm:
that is correct. As a server owner and a modder, I could never understand how jCoopZ could be the ideal gametype for something such as this.

Making a mutator like this for JCoopZ would require you to be able to look at the source of the gametype and as you may or may not know, JCoopZ is a closed source gametype which makes this near impossible without asking Zombie to do it himself.

Unfortunatly, XCoop is probably not the ideal gametype to do this on either, because it will soon be considered abandonware by the new open source gametype for unreal that is 90% complete by Pcube here. That will have to wait until February or something. I would recommend you start a brand new gametype instead which subclasses "unrealshare.coopgame". If I find the time to start working on it, I'll let you know here. Converting my old XCoop code to non-xcoop code might be tough considering all the functions I can use to my advantage in xcoop. It might be best just to wait for this new gametype to be released.

-Jackrabbit (lol Like you didn't know it was by me)


Hmm well I'm not too fond of waiting so in the meantime lets discuss alternatives.

Is there nothing called when a player dies that would be easy to modify? Like if not in JCoopz because it's closed-source, could I just find what's called on death in xcoop and make it so instead of giving the player the option to respawn with a click or whatever just make it reload the current loaded map?

Also, I think I'll ask Zombie about this because I do like JCoopz and I also support open-source, all my experiences with Zombie have been good and he's been more than happy to help me with any mod I've needed in the past.

Thanks for the info.
  
Back to top
 
IP Logged
 
Zombie
Forum Administrator
The One Who Wanted To Have A Special Title In Forum
*****
Offline


Living Dead

Posts: 323
Joined: May 9th, 2002
Re: Reload Map On Death [Request]
Reply #6 - Nov 19th, 2010 at 8:00am
Print Post  
It should be possible now to accomplish this on a 227 server (JCoopZ or not) with a GameRules mutator. If Jackrabbit is interested in another method using GameRules then much of that existing work could be adapted for those with their own private/custom/future gametype preference.

On a 224/225/226 server running JCoopZ this would be tricky, namely because I have not opened up enhanced mutator capability with a JCoopZ version of UT/GameRules features for those patches. I suppose it depends on what happens with what is left of 225 server administration. Undecided


-Zombie
  
Back to top
 
IP Logged
 
Jkrit
God Member
*****
Offline



Posts: 811
Location: USA
Joined: Oct 7th, 2007
Gender: Male
Re: Reload Map On Death [Request]
Reply #7 - Nov 19th, 2010 at 8:45am
Print Post  
Yeah, I forgot to mention this other option (GameRules).  I haven't worked with it myself, so its no surprise that I forgot totally about it.  You must remember though, If I transfer my code and to GameRules, your server will only  be able to accept 227 clients only and nothing else.  I am willing to give it a shot, only if you are willing to make your server "227 only".  Honestly, I wouldn't want to do it myself, but I cannot stop others.
  

Back to top
 
IP Logged
 
.:..:
Oldunreal MasterPoster
Developer Team
*
Offline



Posts: 1511
Location: Finland
Joined: Aug 16th, 2005
Gender: Male
Re: Reload Map On Death [Request]
Reply #8 - Nov 19th, 2010 at 4:19pm
Print Post  
Jkrit wrote on Nov 19th, 2010 at 8:45am:
Yeah, I forgot to mention this other option (GameRules). I haven't worked with it myself, so its no surprise that I forgot totally about it. You must remember though, If I transfer my code and to GameRules, your server will only be able to accept 227 clients only and nothing else. I am willing to give it a shot, only if you are willing to make your server "227 only". Honestly, I wouldn't want to do it myself, but I cannot stop others.

Not quite true. If you make that mod serverside only, clients won't "care" about if the mod uses GameRules or not.
  

Shivaxi wrote on Jul 25th, 2013 at 12:50pm:
...and now im stuck trying to fix everything you broke for the next 227 release xD Tongue

(ಠ_ಠ)
Back to top
IP Logged
 
ti.teg.tnod.I
New Member
*
Offline


Oldunreal member

Posts: 11
Location: Ontario
Joined: May 31st, 2010
Gender: Male
Re: Reload Map On Death [Request]
Reply #9 - Nov 20th, 2010 at 2:21am
Print Post  
Jkrit wrote on Nov 19th, 2010 at 8:45am:
Yeah, I forgot to mention this other option (GameRules). I haven't worked with it myself, so its no surprise that I forgot totally about it. You must remember though, If I transfer my code and to GameRules, your server will only be able to accept 227 clients only and nothing else. I am willing to give it a shot, only if you are willing to make your server "227 only". Honestly, I wouldn't want to do it myself, but I cannot stop others.


I don't care either way, I like 227f, I'd rather everyone be able to play on it though.

@Dots/Zombie/Jackrabbit: So is this gonna be difficult? I'll try to run UnrealED under Wine...I don't have a Windows partition to try to make the mod on though :/.

Thanks for the help and I would really appreciate it if someone would help make the mod Smiley.

Edit: Could someone please do this if it wouldn't be too much trouble? I see a function that looks like it's called on pawn death. Could someone just throw in an if statement checking to see if it's a player and reload the current map? Running UnrealEd under Wine is horrendous!
  
Back to top
 
IP Logged
 
Jkrit
God Member
*****
Offline



Posts: 811
Location: USA
Joined: Oct 7th, 2007
Gender: Male
Re: Reload Map On Death [Request]
Reply #10 - Nov 20th, 2010 at 7:31pm
Print Post  
Okay, I went ahead and made the damn thing but of course 227's SHIT editor crashes everytime it try and compile the crappity smack|ING THING. Too bad, looks like I'm never again using 227 Editor to compile any of my mods. I might give ucc a shot still though.

EDIT:
Okay, I compiled using UCC and the code doesn't work.  I really don't care at this point. 

Code (Java)
Select All
class UnrealSurvival expands CoopGame;

function PreBeginPlay()
{
  local GameRules G;

    G = Spawn(class'USGR');
      if( Level.Game.GameRules==None )
	      Level.Game.GameRules = G;
      else Level.Game.GameRules.AddRules(G);
}
 



Code (Java)
Select All
ss USGR expands GameRules;

function NotifyKilled( Pawn Killed, Pawn Killer, name DamageType )
{
  local String URL;

    super.NotifyKilled(Killed, Killer, DamageType);

    if(Killed.isA('PlayerPawn'))
    {
       log("Someone Got Killed, Restarting...");
        URL=self.getUrlMap();
        Level.Game.SendPlayer(PlayerPawn(Killed), URL);
    }
}
 

« Last Edit: Nov 20th, 2010 at 9:09pm by Jkrit »  

Back to top
 
IP Logged
 
ti.teg.tnod.I
New Member
*
Offline


Oldunreal member

Posts: 11
Location: Ontario
Joined: May 31st, 2010
Gender: Male
Re: Reload Map On Death [Request]
Reply #11 - Nov 21st, 2010 at 12:59am
Print Post  
Jkrit wrote on Nov 20th, 2010 at 7:31pm:
Okay, I went ahead and made the damn thing but of course 227's SHIT editor crashes everytime it try and compile the crappity smack|ING THING. Too bad, looks like I'm never again using 227 Editor to compile any of my mods. I might give ucc a shot still though.

EDIT:
Okay, I compiled using UCC and the code doesn't work. I really don't care at this point.

Code (Java)
Select All
class UnrealSurvival expands CoopGame;

function PreBeginPlay()
{
 local GameRules G;

  G = Spawn(class'USGR');
  if( Level.Game.GameRules==None )
	  Level.Game.GameRules = G;
  else Level.Game.GameRules.AddRules(G);
}
 



Code (Java)
Select All
ss USGR expands GameRules;

function NotifyKilled( Pawn Killed, Pawn Killer, name DamageType )
{
 local String URL;

  super.NotifyKilled(Killed, Killer, DamageType);

  if(Killed.isA('PlayerPawn'))
  {
   log("Someone Got Killed, Restarting...");
   URL=self.getUrlMap();
   Level.Game.SendPlayer(PlayerPawn(Killed), URL);
  }
}
 



Thanks for the attempt Smiley. Anyone feel like finishing it?
  
Back to top
 
IP Logged
 
.:..:
Oldunreal MasterPoster
Developer Team
*
Offline



Posts: 1511
Location: Finland
Joined: Aug 16th, 2005
Gender: Male
Re: Reload Map On Death [Request]
Reply #12 - Nov 21st, 2010 at 7:51am
Print Post  
Code (Java)
Select All
class UnrealSurvival extends Mutator;

function PreBeginPlay()
{
	local GameRules G;

	G = Spawn(class'USGR');
	if( Level.Game.GameRules==None )
		Level.Game.GameRules = G;
	else Level.Game.GameRules.AddRules(G);
	Destroy();
} 



Code (Java)
Select All
class USGR extends GameRules;

function NotifyKilled( Pawn Killed, Pawn Killer, name DamageType )
{
	local Pawn P;

	if(Killed.isA('PlayerPawn'))
	{
		for( P=Level.PawnList; P!=None; P=P.nextPawn )
			if( P.bIsPlayer && P!=Killed && PlayerPawn(P)!=None && P.Health>0 && !P.PlayerReplicationInfo.bIsSpectator )
				return;
		Level.ServerTravel("?restart",false);
	}
}
function bool CanRestartPlayer( PlayerPawn Other )
{
	if( Other.Health<=0 )
		Other.GoToState('PlayerSpectating');
	return false;
}

defaultproperties
{
	bHandleDeaths=true
	bHandleMapEvents=true
} 


What it does is it turns players that dies into spectators and when all players has died it restarts the map.
« Last Edit: Nov 21st, 2010 at 10:07am by .:..: »  

Shivaxi wrote on Jul 25th, 2013 at 12:50pm:
...and now im stuck trying to fix everything you broke for the next 227 release xD Tongue

(ಠ_ಠ)
Back to top
IP Logged
 
ti.teg.tnod.I
New Member
*
Offline


Oldunreal member

Posts: 11
Location: Ontario
Joined: May 31st, 2010
Gender: Male
Re: Reload Map On Death [Request]
Reply #13 - Nov 21st, 2010 at 5:15pm
Print Post  
.:..: wrote on Nov 21st, 2010 at 7:51am:
Code (Java)
Select All
class UnrealSurvival extends Mutator;

function PreBeginPlay()
{
	local GameRules G;

	G = Spawn(class'USGR');
	if( Level.Game.GameRules==None )
		Level.Game.GameRules = G;
	else Level.Game.GameRules.AddRules(G);
	Destroy();
} 



Code (Java)
Select All
class USGR extends GameRules;

function NotifyKilled( Pawn Killed, Pawn Killer, name DamageType )
{
	local Pawn P;

	if(Killed.isA('PlayerPawn'))
	{
		for( P=Level.PawnList; P!=None; P=P.nextPawn )
			if( P.bIsPlayer && P!=Killed && PlayerPawn(P)!=None && P.Health>0 && !P.PlayerReplicationInfo.bIsSpectator )
				return;
		Level.ServerTravel("?restart",false);
	}
}
function bool CanRestartPlayer( PlayerPawn Other )
{
	if( Other.Health<=0 )
		Other.GoToState('PlayerSpectating');
	return false;
}

defaultproperties
{
	bHandleDeaths=true
	bHandleMapEvents=true
} 


What it does is it turns players that dies into spectators and when all players has died it restarts the map.


Wow thanks dots that's more what I wanted than what I knew I wanted! Mind compiling it for me? I can't under wine and I don't have access to a Windows machine.

I love you dots <3
  
Back to top
 
IP Logged
 
Gizzy
Ex Member
**


Oldunreal Member

Re: Reload Map On Death [Request]
Reply #14 - Nov 22nd, 2010 at 12:14pm
Print Post  
http://www.sendspace.com/file/j57u2m

Mutator is: UnrealSurvival.UnrealSurvival
Enjoy.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo