Page 1 of 1

Jump Height / Scuba Fins

Posted: Mon Jan 15, 2018 3:08 pm
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.

Re: Jump Height

Posted: Wed Jan 17, 2018 11:37 am
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?

Re: Jump Height

Posted: Wed Jan 17, 2018 12:15 pm
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

Re: Jump Height / Scuba Fins

Posted: Wed Jan 17, 2018 5:52 pm
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

Re: Jump Height / Scuba Fins

Posted: Sun Jan 21, 2018 7:39 am
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

Re: Jump Height / Scuba Fins

Posted: Mon Jan 29, 2018 8:03 am
by russ
BTW, have you played with the damping property for ActiveKitParts? It looks like it's "armor".