Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Quake-Like Bounce-Jump
- * Will use the finishPlayerDamage function to boost you up with full
- * air control. (only one won't work, needs about 10-20)
- * How to use:
- * Make a trigger_multiple and give it a targetname then thread the
- * trigger with this function. E.g. in a loop target thread bounce_jump()
- *
- * How is it possible to control the bounce:
- * In order to control the height of the bounce you can vary with the power
- * but this won't work really good. Though the bounce height depends also
- * on the used fps.
- *
- * Try to work with a loop (see comments) and a specific count for your
- * jump height. I made an array(lookup table) for my entities.
- * entityToPower(self) is this lookup-table with a simple (swith-case)
- */
- bounce_jump(){
- while(1){
- self waittill("trigger", player);
- // player playsound("jump_pad"); // original quake sound
- /* for(i = 0; i < entityToPower(self); i++){ */
- power = 150;
- player.health = player.health + power;
- eInflictor = player;
- eAttacker = player;
- iDamage = power;
- iDFlags = 0;
- sMeansOfDeath = "MOD_PROJECTILE";
- sWeapon = "panzershreck_mp";
- vPoint = ( player.origin + (0,0,-1) );
- vDir = vectornormalize( player.origin - vPoint );
- sHitLoc = "none";
- psOffsetTime = 0;
- player finishPlayerDamage( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime );
- /* } */
- // wait(0.5); // adjust this to your needs
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement