Page 1 of 2
Jumppads or flippads possible ?
Posted: May 10th, 2010, 10:54 am
by <LT>YosemiteSam[NL]
Hi Guys,
Starting on a new map and I was wondering if you can make jumppads. When triggered they shoot you across the room.
Tried this with the door script (brushmodel/hinge) and made the "door" open in 0.01 sec but that doesn't work you do not get launched from it.
Maybe if I change the gravity on the map ???
Anyone have an idea if this is even possible
Re: Jumppads or flippads possible ?
Posted: May 10th, 2010, 11:00 am
by Rezil
It's possible by damaging the player, lev made jumppads in his new upcoming map for cod2.
Re: Jumppads or flippads possible ?
Posted: May 10th, 2010, 11:15 am
by waywaaaard
It's possible I am going to post my source code here when I am at home.
Re: Jumppads or flippads possible ?
Posted: May 10th, 2010, 11:30 am
by <LT>YosemiteSam[NL]
aha, thx m8, looking forward to it.
*edit* I found and made a jumppad, but when I look in thirdperson view is stutters like crazy..
Re: Jumppads or flippads possible ?
Posted: May 10th, 2010, 2:17 pm
by Pedsdude
YosemiteSam, long time no see

Re: Jumppads or flippads possible ?
Posted: May 10th, 2010, 3:25 pm
by Mooselflies
http://modsonline.com/Tutorials-read-464.html
don't no if your looking for that but it might help
Re: Jumppads or flippads possible ?
Posted: May 10th, 2010, 3:44 pm
by Pedsdude
Not the same, CoD4 jump pad are entirely different AFAIK.
Re: Jumppads or flippads possible ?
Posted: May 10th, 2010, 4:33 pm
by R4d0xZz
u used these jump pads on ib_glass .
doesn´t look like a jump pad from quake.
Also you cant move while you´r flying :S
Re: Jumppads or flippads possible ?
Posted: May 10th, 2010, 5:54 pm
by waywaaaard
Here it comes!
Basically you have one way to simulate the quake style bounce pads. You can't use the same function as in quake because this would include to use a SP-only function. But we can use the push back of an damage like grenades or panzerfaust that comes directly from beneath(normal vector) the player. Either you use radiusDamage() or playerFinishDamage().
When the player hits the trigger he gets damaged from beneath and pushed up. The height depends on the fps and trigger rate of the trigger (and trigger size). Use a loop with a predefined count and it will be more controlled.
http://www.xfire.com/video/22e915/
http://www.xfire.com/video/22b474/
Code: Select all
/* 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
}
}
http://pastebin.com/sLV2ZThj
to thread use this:
Code: Select all
bjArray = getEntArray("YOURTARGETNAME", "targetname");
if(isdefined(bjArray)){
for(i = 0; i < bjArray.size; i++)
bjArray[i] thread bounce_jump();
}
I attached the original jump pad texture, the surrounding texture in dds format and the sound.
quake_jumppad_files.zip
Re: Jumppads or flippads possible ?
Posted: May 10th, 2010, 6:01 pm
by Rezil
I love you.
Re: Jumppads or flippads possible ?
Posted: May 10th, 2010, 6:06 pm
by Drofder2004
Simple yet awesome.
Re: Jumppads or flippads possible ?
Posted: May 10th, 2010, 7:21 pm
by <LT>YosemiteSam[NL]
KillerSam wrote:Maybe so, but it looks like that method would work - as you are just essentially moving the player to a series of points to simulate being thrown in the air.
I made a jumppad that way but you can't move in midair and the movement is stuttering like crazy when looking in thirdperson.
Lev!athan thx m8, I'll give it a try but I'm not very good at scripting (made a few but no difficult ones).
And Pedsdude, it's been a while... yes. But I was always checkeing the site and forums (just didn't log in

)
Re: Jumppads or flippads possible ?
Posted: May 10th, 2010, 9:09 pm
by waywaaaard
add me on xfire or just ask here I can do the scripting for ya

Re: Jumppads or flippads possible ?
Posted: May 10th, 2010, 10:26 pm
by waywaaaard
I just went through my script and found even a better version so that you don't need the count for the height anymore.
jumppads2.png
You only need a trigger multiple and and script_origin as a target a little bit above where you want to land. Don't make it to high. Now the script looks if you are high enough and stops if so.
Code: Select all
bounce_jump(){
while(1){
self waittill("trigger", player);
tar = self.target;
if(!isDefined(tar))
return;
target = getEnt(tar, "targetname");
height = 0;
count = 0;
player playsound("jump_pad");
// iprintln("height: "+(target.origin[2]-player.origin[2])); // debug lines
while((player.origin[2] < target.origin[2])){
power = 75;
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 );
height = player.origin[2];
count++;
// iprintln(target.origin[2]+" : " + player.origin[2]); // debug lines
wait(0.01);
if(player.origin[2] >= target.origin[2]){
break;
}
}
wait(0.5);
}
}
Re: Jumppads or flippads possible ?
Posted: May 10th, 2010, 10:36 pm
by Soviet
If you want it to be more freeform, check out the SetMoveSpeedScale command. I used this a while back with some trigger_multiples on some ramps. When the player sprints up them they're launched forward as they touch the script, and with a little bit more code you can have it revert back over time with a for loop as they fly. It's not exactly a "jumppad", but it definitely launches the player and allows somewhat controlled flight.