View Full Version : Please Help Me Expert Scripters!!!
Jabroni{GREEK_STYLE}
17th Aug 2000, 01:39 PM
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.
Jabroni{GREEK_STYLE}
22nd Aug 2000, 10:50 AM
c'mon, doesn't anybody know?
KittyCSpot
5th Sep 2000, 01:06 AM
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
Jabroni{GREEK_STYLE}
5th Sep 2000, 11:50 AM
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.
Aphex
5th Sep 2000, 12:02 PM
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.
G-Man
5th Sep 2000, 07:37 PM
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!
reaction
6th Sep 2000, 04:09 AM
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.
vBulletin® v3.8.0 Release Candidate 2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.