![]() |
|
|
#1 |
|
Registered User
Join Date: Aug. 2nd, 2000
Posts: 5
|
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 |
|
Registered User
Join Date: Aug. 2nd, 2000
Posts: 5
|
c'mon, doesn't anybody know?
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Sep. 4th, 2000
Posts: 2
|
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 |
|
Registered User
Join Date: Aug. 2nd, 2000
Posts: 5
|
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 |
|
Registered User
Join Date: Jan. 31st, 2000
Location: Manchester, UK
Posts: 563
|
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 |
|
Registered User
Join Date: Mar. 11th, 2000
Location: Montreal, Quebec, Canada
Posts: 348
|
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!
__________________
"It is better to deserve honors and not have them than to have them and not deserve them." -Mark Twain |
|
|
|
|
|
#7 |
|
Registered User
Join Date: Aug. 22nd, 2000
Posts: 30
|
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.
__________________
-=reaction=- Lead coder for Unreal: Outlawed reaction@mailandnews.com ICQ# 43307155 http://gameday.de/Outlaws "When Unreal is Outlawed, only outlaws play Unreal..." |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|