For direct access use https://forums.oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com

HEALTH

Ask UnrealEd 1 mapping related questions, or give hints, tips and tricks
Post Reply
User avatar
MEMOTRON
OldUnreal Member
Posts: 8
Joined: Mon Sep 17, 2012 1:35 pm

HEALTH

Post by MEMOTRON »

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!
User avatar
GreatEmerald
OldUnreal Member
Posts: 5347
Joined: Mon May 21, 2007 2:30 pm

Re: HEALTH

Post by GreatEmerald »

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.
User avatar
MEMOTRON
OldUnreal Member
Posts: 8
Joined: Mon Sep 17, 2012 1:35 pm

Re: HEALTH

Post by MEMOTRON »

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?
User avatar
Hellkeeper
Global Moderator
Posts: 3260
Joined: Wed May 21, 2008 8:24 pm
Location: France
Contact:

Re: HEALTH

Post by Hellkeeper »

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.
User avatar
GreatEmerald
OldUnreal Member
Posts: 5347
Joined: Mon May 21, 2007 2:30 pm

Re: HEALTH

Post by GreatEmerald »

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: 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 edited by GreatEmerald on Wed Sep 19, 2012 3:58 am, edited 1 time in total.
User avatar
BobIsUnreal
OldUnreal Member
Posts: 805
Joined: Mon Apr 12, 2010 12:34 am

Re: HEALTH

Post by BobIsUnreal »

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.
Last edited by BobIsUnreal on Tue Sep 18, 2012 4:36 pm, edited 1 time in total.
User avatar
MEMOTRON
OldUnreal Member
Posts: 8
Joined: Mon Sep 17, 2012 1:35 pm

Re: HEALTH

Post by MEMOTRON »

Thank you everyone, gonna try tonight
User avatar
GreatEmerald
OldUnreal Member
Posts: 5347
Joined: Mon May 21, 2007 2:30 pm

Re: HEALTH

Post by GreatEmerald »

Hmm, perhaps players are not part of the CheckReplacement routine. Perhaps then one could use Level.PawnList to iterate through the pawns.
User avatar
BobIsUnreal
OldUnreal Member
Posts: 805
Joined: Mon Apr 12, 2010 12:34 am

Re: HEALTH

Post by BobIsUnreal »

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.
Last edited by BobIsUnreal on Wed Sep 19, 2012 11:55 pm, edited 1 time in total.
Post Reply

Return to “UnrealEd, the editor for Unreal up to version  226”