View Full Version : Want to change a key for crouch...
Lord Kaje
02-06-2005, 04:49 PM
... & jump (regular jump, not the force one) IF vector is >and/or< than a particular value... is this possible? I'm not finding what calls the crouch and jump animations...
_K_
JediKirby
02-06-2005, 05:09 PM
Crouch seems to be hardcoded. We could never stop the player from crouching into the floor with our mod.
JediKirby
Lord Kaje
02-07-2005, 01:03 AM
Uggg... hardcoded crouch... bummer...
I bet non-force jump is also hardcoded...
_K_
El Scorcho
02-07-2005, 11:20 AM
What do you want to do? Have a cog do something if you are crouching? Thats easy, use IsThingCrouching(). It returns 1 when a thing is a crouching.
If you want to stop crouching, you could probably just have a cog clear the crouching flag in a fast pulse.
Jump has no such verbs or flags however that I know of. Some one (I think sabermaster) wrote a cog that did a pretty good job of getting it however, but I don't think it was perfect.
Lord Kaje
02-07-2005, 11:38 AM
Hmm...! Thanx, I'll give that a shot (though I recall the JKspecs listing that IsThingCrouching is "? Not used in cogs".
_K_
Hell Raiser
02-07-2005, 11:45 AM
You could always just do what I did with TDiR, and make new Jump & Crouch keys so you can tell when they're pressed. ;)
El Scorcho
02-07-2005, 11:53 AM
Originally posted by Lord Kaje
Hmm...! Thanx, I'll give that a shot (though I recall the JKspecs listing that IsThingCrouching is "? Not used in cogs".
_K_
IsCrouching() does the same thing. The JKSpecs is pretty out of date, try the datamaster. Its in HellRaisers sig.
As Hellraiser mentioned, a good way to get the desired effect is to just make new jump and crouch keys that you CAN control.
zagibu
02-07-2005, 01:04 PM
You can also check the player's attach flags, to see whether he is jumping or not. Of course, you can't distinguish between jumping or falling this way, but yeah...it's easier than generating new keyfiles.
El Scorcho
02-07-2005, 06:22 PM
I just thought of something...would the GetThingThrust verb, used on the Z axis not get whether the player was jumping?
That would detect when the player is trusted upward for any reason.
El Scorcho
02-07-2005, 08:27 PM
Originally posted by Emon
That would detect when the player is trusted upward for any reason.
Are you sure? I've attempted to use getthingthrust on AI actors to get their direction. It always returns zero.
Thrust isn't the same as velocity, in this case, I'm pretty sure.
I said thrusted upward. So sector thrusts and possibly explosions would be affected.
Hell Raiser
02-08-2005, 02:26 AM
If anyone would have found a way to get whether regular JK jumping was being used, it would have been me. :p If I could count the times I've tried doing just that, I'd use two hands. We're not talkin working on it for 1 hour, we're talking days of T&E. :p
Thats why I suggest you go with new jump/crouch keys if at all possible. (JK only has 3 additional hotkeys you can use if you don't replace force powers or any JK items.)
Hell Raiser
02-08-2005, 02:31 AM
Hmmm, just thought of something.
If the player wasn't attached, and his velocity wasn't heading downwards below the players position, wouldn't the player be jumping? Check if there's sector thrust, check the direction to make sure jumping would be possible, and check if we weren't just damaged by an explosion. (It could bump you up y'know ;) )
I don't feel like testing. :p
JediKirby
02-08-2005, 07:21 PM
But what about when you get moved from non-damaging weapon splash? There IS a distance at which you will move, but will take no damage from the raildet. Trust me, CM and I have shot eachother enough with them, I can vouch.
JediKirby
El Scorcho
02-08-2005, 08:36 PM
Originally posted by Arden Lyn
Well although you can add things that happen when someone crouches and replicate crouch in another hotkey, it appears impossible to actually remove the crouching part :D.
Arden
Are you sure a fast pulse clearing the crouch flag wouldn't accomplish this?
LKOH_SniperWolf
02-08-2005, 10:17 PM
It stands to reason. Why don't you test it out?
Lord Kaje
02-09-2005, 08:18 PM
Holy Krap...! This thread went much further than I expected... Anyone experimenting with any of this, please lemme know what happens: I think creating hotkeys for jump & crouch is the way to go... but I think it may be beyond my COGging ability...
_K_
Hell Raiser
02-09-2005, 08:35 PM
If you want a good example of "Far out"/useful things, I'd suggest you check out the innards of TDiR 1.1, it's all documented pretty good, well, in some places. ;)
Lord Kaje
02-10-2005, 03:45 PM
Thanx, H.R. -- I will take a look.
_K_
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.