05-29-2008, 08:46 PM | #1 |
Join Date: Jul 2007
Posts Rated Helpful 0 Times
|
How was auto jump feature coded?
I'm trying to get a HL single player mod made with a really good auto jump feature like FF has. I was wondering how it works. Does it spam +jump commands, or does it have a way telling when you hit ground and makes you jump as soon as you hit it?
What does it do to be more effective than a +jump;wait;-jump script or an auto hot key macro? I'm not wondering about the hold key and then it jumps feature, that's obvious how to code; I'm wondering how it was made to keep your time spent the ground to a minimum. Less time on the ground than a basic spamming script or macro. And is it possible to have the time on the ground be zero? Last edited by Spider-Waffle; 05-30-2008 at 12:31 AM. |
|
05-29-2008, 09:11 PM | #2 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
what the hell is a "spider waffle"??
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
05-29-2008, 09:27 PM | #3 |
Lock 'n Loll!
Join Date: Sep 2007
Location: 2fort
Class/Position: Scout, Spy, Sniper Gametype: CTF Posts Rated Helpful 0 Times
|
Well, my tiny brain says it might be a variable that switches off after the player is on the ground for 0.x seconds and that turns on when you jump. Either way, it's nothing like a script...
.. I think I'd actually like to know too, is a code snippet possible? |
|
05-29-2008, 09:33 PM | #4 |
Useless
Retired FF Staff
|
Are you mother-fuckers coders?
No? Then why are you replying?
__________________
Look at all those dead links. |
|
05-29-2008, 09:38 PM | #5 |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
The real question is why is this a thread and not a PM?
__________________
#FF.Pickup ¤ Fortress-Forever pickups My Non-official Maps Released FF_DM_Squeek - FF_2Mesa3_Classic - FF_Siege_Classic Beta FF_Myth - FF_Redlight_Greenlight Sick of the people on the internet, always moanin'. They just moan. - Karl Pilkington |
|
05-29-2008, 09:49 PM | #6 |
Useless
Retired FF Staff
|
I was wondering that myself but it was already here and he probably doesn't know who to PM.
__________________
Look at all those dead links. |
|
05-29-2008, 10:53 PM | #7 |
Join Date: Mar 2007
Posts Rated Helpful 0 Times
|
less whining more question answering...?!
|
|
05-29-2008, 11:36 PM | #8 |
Join Date: Mar 2007
Posts Rated Helpful 0 Times
|
Circuitous you need to calm teh feck down.
|
|
05-30-2008, 12:03 AM | #9 |
Wiki Standards Team
Wiki Team
Join Date: Mar 2007
Location: Geokill's closet
Class/Position: Sniper/Demoman Gametype: CTF Affiliations: :e0: Co-leader Posts Rated Helpful 6 Times
|
Well I don't know the structure of the HL1 or HL2 SDK, but the easiest way I can think of to implement something like this is so (this is all pseudocode btw):
Code:
//a global variable to figure out if we're supposed to be jumping bool jumping = false; //in where ever key presses are handled void processKeyDown(int key) { if (key == SPACE_BAR) //would replace this constant with a call to get the "jump key" jumping = true; } void processKeyUp(int key) { if (key == SPACE_BAR) //would replace this constant with a call to get the "jump key" jumping = false; } //the jump function --- this executes the entire process of moving the camera up & down. void jump() { jumping = false; //move the camera up and down and deal with other stuff } //where ever the game loop is void gameLoop() { //.... if ((jumping) && (player.isOnGround()) //can't jump in midair jump(); //.... } Now I just thought this up off the top of my head and of course actually implementing it into an HL Mod will probably be different, but that's the basics of it I think. It's not like I tested this or anything and it may have problems. But hopefully that should point you in the right direction. |
|
05-30-2008, 12:08 AM | #10 | |
Annoying people since 1986
|
Quote:
|
|
|
05-30-2008, 12:11 AM | #11 |
Community Member
Server Owner
Beta Tester Forum Moderator Join Date: Mar 2007
Location: Hawthorne, California
Class/Position: Soldier/Spy/Scout Gametype: AvD Affiliations: :e0:Eternal Order Leader Posts Rated Helpful 12 Times
|
Not sure how that answer his question but ok.....
__________________
|
|
05-30-2008, 12:22 AM | #12 |
FF God
|
Circuitous needs to ban himself. Great way to represent a struggling mod. Grow up. No, this is not your first time insulting / attacking people. Do you not have something better to do? How sad.
__________________
|
|
05-30-2008, 12:37 AM | #13 |
Join Date: Jul 2007
Posts Rated Helpful 0 Times
|
What I really want to know is if it spams jump, how was is made to spam jump extra fast, or if it can tell when your on the ground and jumps one time at the exact right time, how does it do this? Or maybe it uses some method which is neither of these.
I was thinking there must be some flag in HL which lets the jump event happen, some variable which indicates when you're on jumpable ground. Seems like you could use this. I didn't make this a PM because I don't know who knows how the code works, or who wrote it. |
|
05-30-2008, 12:45 AM | #14 | |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Quote:
__________________
#FF.Pickup ¤ Fortress-Forever pickups My Non-official Maps Released FF_DM_Squeek - FF_2Mesa3_Classic - FF_Siege_Classic Beta FF_Myth - FF_Redlight_Greenlight Sick of the people on the internet, always moanin'. They just moan. - Karl Pilkington |
|
|
05-30-2008, 01:06 AM | #15 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
spider-waffle, i wasnt being mean when i asked what it was, it was a joke/honest question, is it a term for something?
there are several ppl you can pm who can help you, or send you to the person who can. but please, dont hesitate to make a thread for a valid question such as this. we're glad to help when we can, sorry i know nothing about this, but if you get a mapping/texture problem come to me!
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
05-30-2008, 01:06 AM | #16 |
Fortress Forever Staff
Join Date: Sep 2007
Class/Position: O: Scout Affiliations: {NFO} - New Family Order Posts Rated Helpful 0 Times
|
My guess is that it is jumping whenever the player hits the ground, not spamming jump. Spamming jump would give the player lag in other commands(shooting, etc).
|
|
05-30-2008, 01:29 AM | #17 |
Useless
Retired FF Staff
|
PM Jiggles and see if he can answer you.
Useless posts deleted, unnecessary thread locked.
__________________
Look at all those dead links. |
|
05-30-2008, 01:31 AM | #18 |
Community Member
Server Owner
Beta Tester Forum Moderator Join Date: Mar 2007
Location: Hawthorne, California
Class/Position: Soldier/Spy/Scout Gametype: AvD Affiliations: :e0:Eternal Order Leader Posts Rated Helpful 12 Times
|
lolz what was the point of deleting the post when your locking it...
__________________
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|