1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Please Help Me Expert Scripters!!!

Discussion in 'Mapping' started by Jabroni{GREEK_STYLE}, Aug 17, 2000.

  1. Jabroni{GREEK_STYLE}

    Jabroni{GREEK_STYLE} New Member

    Joined:
    Aug 2, 2000
    Messages:
    5
    Likes Received:
    0
    I am trying to make a mutator where when you hold down the jump button you can jump higher.

    I ideally need to replicate a
    state halfgravjump
    {
    function tick()
    {
    if( player releases jump )
    gotostate('');
    playerGravity *=3;
    }
    begin:
    playerGravity /=3;
    }
    on the client, but i have tried everything and can't get it to replicate. I have put this state in the mutator class,
    i have made it in a tournament pickup class, i have declared it simulated, i have tried everything.

    Please help if you have any ideas.
     
  2. Jabroni{GREEK_STYLE}

    Jabroni{GREEK_STYLE} New Member

    Joined:
    Aug 2, 2000
    Messages:
    5
    Likes Received:
    0
    c'mon, doesn't anybody know?
     
  3. KittyCSpot

    KittyCSpot New Member

    Joined:
    Sep 4, 2000
    Messages:
    2
    Likes Received:
    0
    Hmmm how about something like this...

    // ---------

    Class JumpHighItem Expands TournamentPickup;

    var bool bJumped;
    var bool bLetGo;

    simulated function Tick( float DeltaTime )
    {
    // did we jump?
    if (bJumped == true)
    {
    // check button state
    if (jumpbuttonvar == pressed)
    {
    // we let go so reset our var
    bLetGo = true;
    }
    // have we let go yet?
    if (bLetGo == true)
    {
    // we let go so reset our jump acceleration
    Pawn(Owner).JumpZ = Pawn(Owner).Default.JumpZ;
    }
    }
    }

    simulated function OwnerJumped()
    {
    Pawn(Owner).JumpZ = Pawn(Owner).Default.JumpZ * 3;
    bJumped = true;
    bLetGo = false;
    }

    // --------------

    Then all you have to do is make a mutator to give this item to a playerpawn when it is created with something like this... dont bother giving it to a bot cause it wont use it (why waste memory?)

    // --------------

    class JumpHighMut expands Mutator;


    function ModifyPlayer(Pawn Other)
    {
    local Inventory inv;

    if Other.IsA('PlayerPawn')
    {
    inv = Spawn(class'JumpHighItem');
    if( inv != None )
    {
    inv.bHeldItem = true;
    inv.RespawnTime = 0.0;
    inv.GiveTo(Other);
    }

    // called by GameInfo.RestartPlayer()
    if ( NextMutator != None )
    NextMutator.ModifyPlayer(Other);
    }
    }

    // --------------

    a few things in there are pseudo code (I dont know how to access the button state for jumping) but im sure you can figure out the gist of it...not sure if it will work or not cause im too lazy to go write it up and try it...lemmie know how it turns out :)

    Cheyenne 'Coolspot' Meyer
     
  4. Jabroni{GREEK_STYLE}

    Jabroni{GREEK_STYLE} New Member

    Joined:
    Aug 2, 2000
    Messages:
    5
    Likes Received:
    0
    Thanks a million

    I will give it a try.
    I have tried something similiar by modifying the jumpboots class and failed before, but i may have been doing something wrong.

    I really appreciate your help.

    I'll let you know how it goes.
     
  5. Aphex

    Aphex New Member

    Joined:
    Jan 31, 2000
    Messages:
    563
    Likes Received:
    0
    Where's the best info on all this scripting stuff?
    I need to do the same fn as the server browser to create some in-game text.
     
  6. G-Man

    G-Man New Member

    Joined:
    Mar 11, 2000
    Messages:
    348
    Likes Received:
    0
    Hey Jabro,

    You might want to check out http://www.myureal.com, there is a message board over there where YoMammy drops by every once in a while. He really knows his stuff. The editing message board isn't very busy (plus it crashed recently and all previous posts were lost, so it looks like even more of a ghost town...), but YoMammy will answer pretty much any technical question you've got. HEy YoMammy, if you read this, I hope you don't mind the referal!
     
  7. reaction

    reaction New Member

    Joined:
    Aug 22, 2000
    Messages:
    30
    Likes Received:
    0
    Courteous Correction

    One problem, g-man, you missed an 'n', it should be http://www.myunreal.com, not 'myureal.com'
    But a nice forum none-the-less.
     

Share This Page