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

I has a question about 227...

Unreal Unreal and more Unreal
User avatar
GreatEmerald
OldUnreal Member
Posts: 5347
Joined: Mon May 21, 2007 2:30 pm

Re: I has a question about 227...

Post by GreatEmerald »

Also about returns, the Wiki says that it could also be like this:

Code: Select all

function bool CheckReplacement(Actor Other,out byte bSuperRelevant)
{
if(Other.class==Class'something.something')
{
ReplaceWith(Other,"something");
return false;
}
else if(...)
{
...
return false;
}
else if(...)
{
...
return false;
}
...
else return false;

return true;
} 
don't remember and the site is down, but the last two might be inverse - else return true return false. Note the use of else - your script will be a lot faster because it won't have to recheck everything all over again. Logically, an actor will never have two class names!

Another thing to note: you should use one mutator instead of three to make sure that they don't conflict with each other. However, sometimes three are better, like if you will release them separately, but you should still be aware that one is better than three. And the last thing, I'm not sure if there are mutator groups in UE1, but if there are, make sure the group name is "Arena" - this will prevent other mutators of the same group to be added in a game, thus preventing conflicts.
User avatar
KillerSkaarj
OldUnreal Member
Posts: 935
Joined: Fri Jan 25, 2008 2:04 am

Re: I has a question about 227...

Post by KillerSkaarj »

I'm using UE2, 227 version. I'll make sure to do that. I wanted three mutators because the Stinger Minigun is a hybrid of two guns that already exist in Unreal 1. I wanted it so that you could have it replace one, the other, or both.
User avatar
Bane
OldUnreal Member
Posts: 493
Joined: Sun Mar 03, 2002 6:32 pm

Re: I has a question about 227...

Post by Bane »

I'll try making everything with correct cases.
Unreal and UScript are case insensitive, so don't worry about doing something like that.
NOOOO, please don't skip that. Unreal in windows may be case insensitive but Unreal in Linux is (for filenames only). So if you or anyone else ever wants to compile stuff with UCC in Linux- the filenames need to be :)
I thought he was talking about something like class'STINGER'. Unreal and UScript ARE case insensitive (although if you plan to do any future programming work it'll become a bad habit if you take advantage of it too much), while Linux is not but windows is. But I mean honestly, how often do you use UScript to interact with the filesystem anyways?!
Also about returns, the Wiki says that it could also be like this:

Code: Select all

function bool CheckReplacement(Actor Other,out byte bSuperRelevant)
{
if(Other.class==Class'something.something')
{
ReplaceWith(Other,"something");
return false;
}
else if(...)
{
...
return false;
}
else if(...)
{
...
return false;
}
...
else return false;

return true;
} 
Note the use of else - your script will be a lot faster because it won't have to recheck everything all over again. Logically, an actor will never have two class names!
Nope. Shouldn't be any faster. 'Return' stop execution of the script, so if you hit the first case with just if, it stops, and if you hit the first case with if else, it stops. If there wasn't a return it would be faster, but in this case it shouldn't make any difference.




I'm starting to get the feeling this topic is on the wrong board.
Author of Hide and Seek mod, and the NALIBALL mod

Hide and Seek can be downloaded from:
http://HideNSeek.5u.com
Post Reply

Return to “Unreal General Forum”