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 Send TopicPrint
Normal Topic HEALTH (Read 3118 times)
MEMOTRON
New Member
*
Offline


Oldunreal member

Posts: 8
Joined: Sep 17th, 2012
HEALTH
Sep 17th, 2012 at 2:45pm
Print Post  
What's up, I find the Unreal Editor too hard to use so I just edit maps to increase their difficulty by adding in 200 or so enemies.

What I was wondering is how to increase the players starting health?

Also how to make armour and items like superhealth respawn?



This is so I can play the maps co op.


cheers!
  
Back to top
 
IP Logged
 
GreatEmerald
Oldunreal MasterPoster
*
Offline


The Great Emerald

Posts: 5361
Location: Vilnius, Lithuania
Joined: May 21st, 2007
Gender: Male
Re: HEALTH
Reply #1 - Sep 17th, 2012 at 3:28pm
Print Post  
For item respawning, it's a setting in Unreal.ini. As for increasing the health, you'll need to write a mutator for it, I think.
  
Back to top
WWW  
IP Logged
 
MEMOTRON
New Member
*
Offline


Oldunreal member

Posts: 8
Joined: Sep 17th, 2012
Re: HEALTH
Reply #2 - Sep 17th, 2012 at 3:40pm
Print Post  
Thanks, how do I write a mutator?

And will it work for all people in the co op game if i change it to respawn?
  
Back to top
 
IP Logged
 
Hellkeeper
Global Moderator
*****
Offline


Soulless Automaton

Posts: 2873
Location: France
Joined: May 21st, 2008
Gender: Male
Re: HEALTH
Reply #3 - Sep 17th, 2012 at 5:06pm
Print Post  
If you have any question regarding the editor, feel free to ask them, someone will answer. It's not that complicated once you undestand a couple of concepts.
  

You must construct additional pylons.
Back to top
WWW  
IP Logged
 
GreatEmerald
Oldunreal MasterPoster
*
Offline


The Great Emerald

Posts: 5361
Location: Vilnius, Lithuania
Joined: May 21st, 2007
Gender: Male
Re: HEALTH
Reply #4 - Sep 18th, 2012 at 3:45pm
Print Post  
About the mutator, well, that involves a bit of coding. But it's really easy coding. You have to set up a coding environment first by creating a subfolder in the Unreal folder with the name of the U file that you want to get, inside create a subfolder called "Classes", then create a text document called "CustomHealthMutator.uc" (or any other descriptive, unique name). Then open Unreal.ini, find the "EditPackages=" lines and add a new one at the bottom with the name of the folder you created. Then open your UC file with a text editor, and put something like this in it:

Code (Javascript)
Select All
CustomHealthMutator extends Mutator;

function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
  if (UnrealIPlayer(Other) != None) //If actor Other is a human player
  {
    UnrealIPlayer(Other).default.Health = 200;
    UnrealIPlayer(Other).Health = 200;
  }
  return true;
}

defaultproperties
{
} 



Then open a terminal window, enter "cd /Path/To/Your/Unreal/System" (of course, replace with the real path), then enter "ucc make", and, if there are no errors, "ucc dumpint YourMutatorFolderNameHere" (of course, replace the last part with what you named your mod folder). Then open the newly generated INT file, and edit the line under the "[Public]" header to contain the name and the description of your mod, so that it appears in the mod menu.

As for if it will work in co-op, yes, it will work as long as you are the one hosting the server.
« Last Edit: Sep 19th, 2012 at 3:58am by GreatEmerald »  
Back to top
WWW  
IP Logged
 
BobIsUnreal
God Member
*****
Offline


gonna be dead soon, gg

Posts: 764
Joined: Apr 12th, 2010
Gender: Male
Re: HEALTH
Reply #5 - Sep 18th, 2012 at 4:27pm
Print Post  
lol you know what funny ,
i tried to make this for him last night on my own ,
and couldnt get it  to work at all and gave up ,
it wouldnt even log the class names , yet it looks exactly like yours except it has config options.

class lazyhealth expands Mutator;
var () int newhealth;
function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
     log ("nope "$ string(other.name));

              if (other.isa('PlayerPawn') )
              {
              log ("yes "$ string(other.name));
              playerpawn(other).health= newhealth;
            
              }

return true;

}

also in your script , there are brackets missing in the if ( statment) that fail at compile time.
  

[REM_img]http://i.imgur.com/V3OSsDu.gif.disable[/img]http://i.imgur.com/JOu38Gs.gif
Back to top
IP Logged
 
MEMOTRON
New Member
*
Offline


Oldunreal member

Posts: 8
Joined: Sep 17th, 2012
Re: HEALTH
Reply #6 - Sep 18th, 2012 at 5:25pm
Print Post  
Thank you everyone, gonna try tonight
  
Back to top
 
IP Logged
 
GreatEmerald
Oldunreal MasterPoster
*
Offline


The Great Emerald

Posts: 5361
Location: Vilnius, Lithuania
Joined: May 21st, 2007
Gender: Male
Re: HEALTH
Reply #7 - Sep 19th, 2012 at 4:01am
Print Post  
Hmm, perhaps players are not part of the CheckReplacement routine. Perhaps then one could use Level.PawnList to iterate through the pawns.
  
Back to top
WWW  
IP Logged
 
BobIsUnreal
God Member
*****
Offline


gonna be dead soon, gg

Posts: 764
Joined: Apr 12th, 2010
Gender: Male
Re: HEALTH
Reply #8 - Sep 19th, 2012 at 11:49pm
Print Post  
assuming  your not attempting to only change the defualts , witch woulnt effect the already spawned player , if you illiterated tho the pawns ,
wouldn't it be difficult to determine whether or not the player just spawned vs just lost health. you would have to have some sort of referece table that saved that it has been set , then how to detect when the player respawns somehow there is no real way to differentiate in my eyes...

another method would be to use a  actor  to detect there spawn ,
prehaps placed on any playerstarts so they would set the players health as soon as they spawned.. even that it sort of flawwed.( the player can go back and reset there health)

also if you gametype supported giving items , you could have a pickup set the health and delete itself.
  

[REM_img]http://i.imgur.com/V3OSsDu.gif.disable[/img]http://i.imgur.com/JOu38Gs.gif
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo