Hyper.nl Unreal Services Forum Index Hyper.nl Unreal Services
The forum of Hyper.nl Unreal Services and the semi-offical resource for Winged Unicorn's Unreal mods
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Comments wanted on mutator

 
Post new topic   Reply to topic    Hyper.nl Unreal Services Forum Index -> HelpDesk
View previous topic :: View next topic  
Author Message
Hyper



Joined: 24 Jan 2004
Posts: 1227
Location: Middelburg, The Netherlands

PostPosted: Sun May 21, 2006 1:27 am    Post subject: Comments wanted on mutator Reply with quote

After a tip from Zombie I made this simple mutator:

Code:

//=============================================================================
// FactoryFix.
//=============================================================================
class FactoryFix expands Mutator;


function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
   if ( Other.IsA('CreatureFactory') );
      if ( (CreatureFactory(other).capacity > 30) || (CreatureFactory(other).capacity == -1) );
         CreatureFactory(other).capacity = 5;
}


It should prevent creature factories from creating endless amounts of monsters which is used by players to get score in an unfair way. (At the klingon maps)

If the capacity of the factory is -1 (unlimited) or set to something above 30 it should be set to 5)

Will this mutator do the job?

Details about the creaturefactory class can be found here.
_________________
Alter your reality...forever.
Hyper.nl Unreal Services
unreal://hypercoop.tk
Back to top
View user's profile Send private message Visit poster's website
Zombie



Joined: 27 Jan 2004
Posts: 295

PostPosted: Sun May 21, 2006 3:54 am    Post subject: Reply with quote

You might want to check Level.Title first before making any factory changes, but if you want to limit ALL custom maps your code would work. Also, you could opt to just increase the interval and that would provide far less that could be killed within 60 minutes too.
Code:
function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
        if (Level.Title ~= "INSERT LEVEL TITLE")
        {
                if (Other.IsA('ThingFactory'))
                {
                        if (ThingFactory(Other).capacity == -1 || ThingFactory(Other).capacity > 50)
                        {
                                ThingFactory(Other).capacity=50;
                        }
                }
        }
        return True;
}

With what I added you'd have to look up the exact title of the klingon map(s) for the code because I don't know it.


-Zombie
_________________
GameType: JCoopZ1 - Build137 (11/30/12)
Mutator: DZMapM - 2.34 (12/15/11)
Back to top
View user's profile Send private message Send e-mail
Hyper



Joined: 24 Jan 2004
Posts: 1227
Location: Middelburg, The Netherlands

PostPosted: Sun May 21, 2006 11:05 am    Post subject: Reply with quote

Thanks for the code. I removed the level title check because it occurs at more than one level. I'll do some testing.
_________________
Alter your reality...forever.
Hyper.nl Unreal Services
unreal://hypercoop.tk
Back to top
View user's profile Send private message Visit poster's website
Hyper



Joined: 24 Jan 2004
Posts: 1227
Location: Middelburg, The Netherlands

PostPosted: Sun May 21, 2006 12:32 pm    Post subject: Reply with quote

Testing done. Mutator works perfectly.
_________________
Alter your reality...forever.
Hyper.nl Unreal Services
unreal://hypercoop.tk
Back to top
View user's profile Send private message Visit poster's website
K죣èr_§kā&#



Joined: 10 Jul 2004
Posts: 164

PostPosted: Mon May 22, 2006 9:25 pm    Post subject: Reply with quote

Isn't this "thing factory" in QueenEnd? Well, I hope this thing works on the Pupae, cause I usually like to shoot off a gun that spreads projectiles everywhere, and the last thing I need is an annoying earthquake due to the bug that Epic forgot to fix.
_________________
K죣èr_§kaarj
-|-Mess with me and you get the clàw§-|-
www.freewebs.com/killerskaarjslair
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Hyper.nl Unreal Services Forum Index -> HelpDesk All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group