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 

MoverMutator help needed

 
Post new topic   Reply to topic    Hyper.nl Unreal Services Forum Index -> HelpDesk
View previous topic :: View next topic  
Author Message
K죣èr_§kā&#



Joined: 10 Jul 2004
Posts: 164

PostPosted: Thu Jan 27, 2005 5:00 am    Post subject: MoverMutator help needed Reply with quote

I'm sorry that I ask for too much help but I need just this ONE little thing please. I don't know the line of code that I need to make the movers run faster within a line of code. Here's the script:

Code:

//=============================================================================
// MoverMutator.
// No need to wait for slow movers!
// Copyright (c) KillerSkaarj 2005
//=============================================================================
class MoverMutator expands Mutator;
             
Var() config bool MakeMoversFaster;

Function PreBeginPlay()
{
GotoState('MutatorActive');
}

State MutatorActive
{
             
begin:
log("Mutator Active");
if(MakeMoversFaster == true);
ConsoleCommand ("Admin set mover delaytime 0.000000");
Sleep(0.1);

if(MakeMoversFaster == false);

//This is not yet implemented

}

_________________
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
Zombie



Joined: 27 Jan 2004
Posts: 295

PostPosted: Thu Jan 27, 2005 10:40 am    Post subject: Reply with quote

First of all I recammend that you guys use console command calls only when neccessary. Specificaly since movers are sensitive integrated map actors I HIGHLY suggest not altering them from console commands as it might create some bizzare GPFs about hashing problems.

The variable 'DelayTime' will only effect when a mover will actually begin its movement. If you want to make a mover move speedy or fast you should try float variable 'MoveTime'. You should totaly revise your uscript to aquire the mover objects for altering without using a CC call. Mutator's CheckReplacement will sort through each spawning actor when the level starts so you can aquire them for altering that way.


-Zombie
Back to top
View user's profile Send private message Send e-mail
K죣èr_§kā&#



Joined: 10 Jul 2004
Posts: 164

PostPosted: Fri Jan 28, 2005 12:53 am    Post subject: Reply with quote

Never mind. I can't make a mutator even if I would die if I didn't.
_________________
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
Zombie



Joined: 27 Jan 2004
Posts: 295

PostPosted: Fri Jan 28, 2005 2:50 am    Post subject: Reply with quote

You only asked for one thing for help on in your own words, and it wouldn't be proper for me to write everyones uscript for them. You should still try what you were doing because it would be a learning experience on what/whatnot to do after you run into whatever problems with your own script.

There are plenty of examples online you can use to help you write some of your scripts. The trick to learning this stuff is to find some example scripts that do similar things you need done, and then you study every part of it with the help of a knowledge base like Unrealwiki so you know exactly how it works. When you figure out what certain events/functions do, how to use their parameters, and flow syntax, then it clears your mind up with a doorway. Plus, like some say "Neccessity is the mother of invention". When you need something nobody has done yet, or you want something done bad enough you'll coax yourself into achieving the goal.

http://wiki.beyondunreal.com/wiki/UnrealScript
Take a look at the links under the Core "Syntax" topic on that page. What you do is visit every day in your spare time and click on one of those links to start reading about it. You may not understand or absorb much at first, but with enough patience you'll begin to pick things up. Most people start small with simple editing of weapons, items, and pawns before experimenting with replacing some of the actual uscript or writing mutators.

If you want I can give you a basic chunk of script for altering mover speeds, and you can mess from there. Up to you.


-Zombie
Back to top
View user's profile Send private message Send e-mail
K죣èr_§kā&#



Joined: 10 Jul 2004
Posts: 164

PostPosted: Fri Jan 28, 2005 11:31 pm    Post subject: Reply with quote

I have a great Idea (thanks to UnrealWiki). I'll make a mutator that when someone enters they'll say Hello. Wait... if I do ConsoleCommand("say Hello"); then would that make the ADMIN say it or the person who entered say it? I'll just use the HelloWorldMut for now.
_________________
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
swagman



Joined: 17 Jan 2005
Posts: 36

PostPosted: Sat Jan 29, 2005 12:18 am    Post subject: Reply with quote

it seems I've allready done a cool mutator that does that. It's called MessageMut.

Every chosen seconds it broadcasts a chosen message with

Code:
 BroadcastMessage (msg1)

or something.

It was just a test mutator for practicing on so i'll just put the script up here for KillerSkaarj.

Code:

//================================================
// MessageMutator
// A mutator that displays messages every so often
//================================================

class msgmutator extends mutator Config(MsgMutator);

var(MsgMutator) config string Msg1;
Var(MsgMutator) config string Msg2;
Var(MsgMutator) config string Msg3;
Var(MsgMutator) config bool bDoMessage;
Var(MsgMutator) config float TimeBetweenMsgs;


  Auto State initmut
  {
  Begin:
       log ("-------------------------------");
       log ("MsgMutator Activated");
       log ("By Swagman");
       log ("-------------------------------");
       log ("Current messages are");
       log (""$Msg1);
       log (""$Msg2);
       log (""$Msg3);
       Log ("Messages are configureable by the Advanced options menu");
       if (bDoMessage==true)
        {
        log ("MSGmutator: Messages are ENABLED");
        Goto ('messages');
        }
       else if (bDoMessage==false)
        {
        log ("MSGmutator: Messages are DISABLED");
        Goto ('DisableLoop');
        }

        Messages:
                //Message 1
               
                Sleep (TimeBetweenMsgs);
                Log ("MSGmutator: Message Broadcasted");               
                BroadcastMessage (Msg1);
                 
                //Message 2
               
                Sleep (TimeBetweenMsgs);
                Log ("MSGmutator: Message Broadcasted");         
                BroadcastMessage (Msg2);
               
                //Message 3
               
                Sleep (TimeBetweenMsgs);
                Log ("MSGmutator: Message Broadcasted");
                BroadCastMessage (Msg3);
               
               
                //Enable \ Disable messages check
               
                log ("MSGmutator: Commencing Enable/Disable check");
                if (bDoMessage==true)
                {
                log ("MSGmutator: Messages are still enabled, replaying messages");
                Goto ('Messages');
                }
                else if (bDoMessage==true)
                {
                Goto ('DisableLoop');
                }
               
               
        DisableLoop:
                    if (bDoMessage==True)
                      {
                      log ("MSGmutator: You've enabled Messages");
                      log ("MSGmutator: Messages are ENABLED");
                      goto ('Messages');
                      }
                     else if (bDoMessage==False)   
                      {
                      sleep (10);
                      goto ('DisableLoop');
 }       
}


Use it as a ServerActor.
_________________

Feeding your Unreal addiction....
Back to top
View user's profile Send private message
Zombie



Joined: 27 Jan 2004
Posts: 295

PostPosted: Sat Jan 29, 2005 1:39 am    Post subject: Reply with quote

A timed interval messager? An interesting practice excercise, but I'd be confused if that was to be used for practical purposes. Heres a tip for cleaner if/else flow conditions. When you use an if/else to question if a variable is true/false you can use "else" simply as the opposite instead of "else if".

Code:
Pre EX:
if (bDoMessage==true)
{
    log ("MSGmutator: Messages are ENABLED");
    Goto ('messages');
}
else if (bDoMessage==false)
{
    log ("MSGmutator: Messages are DISABLED");
    Goto ('DisableLoop');
}

Post EX:
if (bDoMessage)
{
    log ("MSGmutator: Messages are ENABLED");
    Goto ('messages');
}
else //first condition is found false it will execute "else" as the opposite.
{
    log ("MSGmutator: Messages are DISABLED");
    Goto ('DisableLoop');
}


Using "else if" is only neccessary if you plan on checking a totaly new condition if the first condition is found false. If you use
if{}
else if(){}
else{}
in that pattern then if the first two conditions are found false then the final "else" path is picked as the last to fall back on.


-Zombie
Back to top
View user's profile Send private message Send e-mail
K죣èr_§kā&#



Joined: 10 Jul 2004
Posts: 164

PostPosted: Sat Jan 29, 2005 2:53 am    Post subject: Reply with quote

Yo swag. Hey mind if I use that code and modify it to get me recognised to UScript alittle more? Don't worry, I'll give you BIIIIIIGGGGG credit in the script ;) (Off Topic: Any one notice these smilies look exactly like the ones for Unreal Sanctuary?)
_________________
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
swagman



Joined: 17 Jan 2005
Posts: 36

PostPosted: Sat Jan 29, 2005 5:03 am    Post subject: Reply with quote

sure, as long as you don't give it out. I was planning to make the broadcast message appear in the midle of the screen.
_________________

Feeding your Unreal addiction....
Back to top
View user's profile Send private message
K죣èr_§kā&#



Joined: 10 Jul 2004
Posts: 164

PostPosted: Sat Jan 29, 2005 5:41 am    Post subject: Reply with quote

Hmmm... how about I make a MsgMutatorPlus! It can have those words in the center, that's what I added into my console!
_________________
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
K죣èr_§kā&#



Joined: 10 Jul 2004
Posts: 164

PostPosted: Sat Jan 29, 2005 6:38 am    Post subject: Reply with quote

Back to the mover mutator! Is this reasonable enough?

Code:

//=============================================================================
// MoverMutator.
// No need to wait for slow movers!
// Copyright (c) KillerSkaarj 2005
//=============================================================================
class MoverMutator expands Mutator;
             
Var() bool MakeMoversFaster;

Function PreBeginPlay()
{
Begin:
log("*****************************", 'MoverMutator');
log("MoverMutator Active", 'MoverMutator');
log("Now movers are faster", 'MoverMutator');
log("By KillerSkaarj", 'MoverMutator');
log("*****************************", 'MoverMutator');
GotoState('MutatorActive');
}

State MutatorActive
{
             
Function PostBeginPlay()
{
local Mover M;
if(MakeMoversFaster == true);
M.movetime=0.000000;
}
}

_________________
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