Jump Height / Scuba Fins

Ask questions, discuss ideas, get answers
Post Reply
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Jump Height / Scuba Fins

Post by Swaffy »

I would like to slightly increase a foot soldier's jump height (by about 1.2x) but how can this be done? I have been looking around the code but can't find it. I do not want to affect the world gravity.
Last edited by Swaffy on Wed Jan 17, 2018 12:21 pm, edited 1 time in total.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
russ
Posts: 73
Joined: Sun Oct 29, 2017 8:12 am

Re: Jump Height

Post by russ »

The only straightforward way to do this is hack the server binary. However, you might be able to get an extra bounce by adding an ActiveKitPart (jetpack) to every kit.

side note, has anyone used ActiveKitPart to make this like scuba fins? Make it only work while swimming, and possibly use setActivater to make it always on?
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Jump Height

Post by Swaffy »

russ wrote:The only straightforward way to do this is hack the server binary. However, you might be able to get an extra bounce by adding an ActiveKitPart (jetpack) to every kit.

side note, has anyone used ActiveKitPart to make this like scuba fins? Make it only work while swimming, and possibly use setActivater to make it always on?
In the jet pack code there are some parts that "prevent" the jet pack from working, you can see Swimming here so maybe it can be changed.
ObjectTemplate.addToNegativeMask Climbing
ObjectTemplate.addToNegativeMask Crouching
ObjectTemplate.addToNegativeMask Swiming
ObjectTemplate.addToNegativeMask Lying

Also in a mod (KillerCommando) it has a directional jer pack sort of thing. A guy holding a rocket and you point it where you want to go.

Code: Select all

ObjectTemplate.create HandFireArms JetPackAllies
ObjectTemplate.networkableInfo HandFireArmsInfo
ObjectTemplate.aiTemplate JetPackAlliesAI
ObjectTemplate.itemIndex 5
ObjectTemplate.magSize 100
ObjectTemplate.numOfMag 6
ObjectTemplate.magType 0
ObjectTemplate.autoReload 0.1
ObjectTemplate.reloadtime 10
ObjectTemplate.roundOfFire 1
ObjectTemplate.AmmoType	1

ObjectTemplate.loadSoundScript Sounds/JetPack.ssc

ObjectTemplate.GUIIndex 17
ObjectTemplate.setHudAmmoType ATIcon
ObjectTemplate.setAmmoIcon "Ammo/Icon_bazooka_64x32.tga"
ObjectTemplate.setCrossHairType CHTIcon
ObjectTemplate.setHasMag 1

ObjectTemplate.createSkeleton animations/JetPackAllies.ske
ObjectTemplate.useSkeletonPartAsMain JetPackAllies


rem !!! JUMP !!!

ObjectTemplate.addTemplate JetPackAlliesThrust
ObjectTemplate.setPosition 0/0/0
ObjectTemplate.setRotation 190/0/0

ObjectTemplate.addTemplate JetPackPointer
ObjectTemplate.setPosition 0.1/-0.25/-0.2

ObjectTemplate.create RotationalBundle JetPackPointer
ObjectTemplate.geometry r_rocket_m1
rem ! Monster_Thruster

rem *** JetPackAlliesThrust ***
ObjectTemplate.create FireArms JetPackAlliesThrust
ObjectTemplate.setNetworkableInfo TankFireArmInfo
ObjectTemplate.loadSoundScript Sounds/MonsterNitro.ssc
rem -------------------------------------
ObjectTemplate.addTemplate e_JetPackAllies
ObjectTemplate.setPosition 0/0/5
ObjectTemplate.setRotation 0/0/0
rem -------------------------------------
ObjectTemplate.projectileTemplate JetPackAlliesProjectile
ObjectTemplate.projectilePosition 0/0/0

rem -- magazine
ObjectTemplate.magSize 200
ObjectTemplate.numOfMag 1

rem -- firing rate + overheat
ObjectTemplate.reloadtime 6
ObjectTemplate.roundOfFire 10
ObjectTemplate.autoReload 1
objectTemplate.coolDownPerSec 1
objectTemplate.heatAddWhenFire 0.01

objectTemplate.timeDelayOnOverHeat 1

rem -- kickback
ObjectTemplate.velocity 100
ObjectTemplate.fireingForce 400

rem -- bind it to a key
ObjectTemplate.setInputFire c_PIFire

rem *** JetPackAlliesProjectile ***
ObjectTemplate.create Projectile JetPackAlliesProjectile
ObjectTemplate.createNotInGrid 1
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.hasCollisionPhysics 0
ObjectTemplate.hasResponsePhysics 0
ObjectTemplate.timeToLive CRD_NONE/0/0/0
ObjectTemplate.damageType 0
ObjectTemplate.material 0
ObjectTemplate.material2 0
ObjectTemplate.hasCollisionEffect 0
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
russ
Posts: 73
Joined: Sun Oct 29, 2017 8:12 am

Re: Jump Height / Scuba Fins

Post by russ »

You can instead use addToPossitiveMask [sic] Swimming to make it only usable while swimming. Oh, and something that might help you. There is a Jumping mask as well. So if you add that to the negative mask, they can't get the extra boost if they are already jumping. Masks are:

HideWeapon
LockFreeLook
Swimming
Climbing
Crouching
Lying
Jumping
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Jump Height / Scuba Fins

Post by freddy »

Swaffy wrote:I would like to slightly increase a foot soldier's jump height (by about 1.2x) but how can this be done? I have been looking around the code but can't find it. I do not want to affect the world gravity.

Code: Select all

ObjectTemplate.create ActiveKitPart jump
ObjectTemplate.setBoneName A
ObjectTemplate.setCopyLinksCount 0
ObjectTemplate.setActiveAcceleration  0/25/10
ObjectTemplate.setPassiveAcceleration 0/0/0
ObjectTemplate.burstFrequency 30
ObjectTemplate.setTrigger PIAction
ObjectTemplate.ActiveEffectPersistancePerFrame 0
ObjectTemplate.OverrideAirMovementInhibitations 0

Code: Select all

ObjectTemplate.Active Jap_Engineer  <------- could perhaps be replaced by "ObjectTemplate.Active JapaneseSoldier"  havent tried 
ObjectTemplate.addTemplate jump
russ
Posts: 73
Joined: Sun Oct 29, 2017 8:12 am

Re: Jump Height / Scuba Fins

Post by russ »

BTW, have you played with the damping property for ActiveKitParts? It looks like it's "armor".
Post Reply