Jumppads or flippads possible ?

Have questions about CoD2 mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

User avatar
<LT>YosemiteSam[NL]
Core Staff
Core Staff
Posts: 2155
Joined: December 7th, 2004, 2:07 am
Location: Netherlands
Contact:

Jumppads or flippads possible ?

Post by <LT>YosemiteSam[NL] » May 10th, 2010, 10:54 am

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

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: Jumppads or flippads possible ?

Post by Rezil » May 10th, 2010, 11:00 am

It's possible by damaging the player, lev made jumppads in his new upcoming map for cod2.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Re: Jumppads or flippads possible ?

Post by waywaaaard » May 10th, 2010, 11:15 am

It's possible I am going to post my source code here when I am at home.
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

User avatar
<LT>YosemiteSam[NL]
Core Staff
Core Staff
Posts: 2155
Joined: December 7th, 2004, 2:07 am
Location: Netherlands
Contact:

Re: Jumppads or flippads possible ?

Post by <LT>YosemiteSam[NL] » May 10th, 2010, 11:30 am

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..

Pedsdude
Site Admin
Site Admin
Posts: 15909
Joined: October 15th, 2004, 7:18 pm
Location: UK

Re: Jumppads or flippads possible ?

Post by Pedsdude » May 10th, 2010, 2:17 pm

YosemiteSam, long time no see :o
Image
Image

User avatar
Mooselflies
CJ Spammer!
CJ Spammer!
Posts: 641
Joined: April 20th, 2009, 8:29 pm
PSN ID: mooselflies
Location: Reading :<

Re: Jumppads or flippads possible ?

Post by Mooselflies » May 10th, 2010, 3:25 pm

http://modsonline.com/Tutorials-read-464.html


don't no if your looking for that but it might help

Pedsdude
Site Admin
Site Admin
Posts: 15909
Joined: October 15th, 2004, 7:18 pm
Location: UK

Re: Jumppads or flippads possible ?

Post by Pedsdude » May 10th, 2010, 3:44 pm

Not the same, CoD4 jump pad are entirely different AFAIK.
Image
Image

User avatar
R4d0xZz
CJ Fan
CJ Fan
Posts: 199
Joined: August 24th, 2009, 2:08 am
Location: Berlin
Contact:

Re: Jumppads or flippads possible ?

Post by R4d0xZz » May 10th, 2010, 4:33 pm

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
Image|Image
Image|Image
Image|Image

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Re: Jumppads or flippads possible ?

Post by waywaaaard » May 10th, 2010, 5:54 pm

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
You do not have the required permissions to view the files attached to this post.
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: Jumppads or flippads possible ?

Post by Rezil » May 10th, 2010, 6:01 pm

I love you.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Jumppads or flippads possible ?

Post by Drofder2004 » May 10th, 2010, 6:06 pm

Simple yet awesome.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

User avatar
<LT>YosemiteSam[NL]
Core Staff
Core Staff
Posts: 2155
Joined: December 7th, 2004, 2:07 am
Location: Netherlands
Contact:

Re: Jumppads or flippads possible ?

Post by <LT>YosemiteSam[NL] » May 10th, 2010, 7:21 pm

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 :-) )

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Re: Jumppads or flippads possible ?

Post by waywaaaard » May 10th, 2010, 9:09 pm

add me on xfire or just ask here I can do the scripting for ya :D
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Re: Jumppads or flippads possible ?

Post by waywaaaard » May 10th, 2010, 10:26 pm

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);
	}
}
You do not have the required permissions to view the files attached to this post.
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

Soviet
Core Staff
Core Staff
Posts: 7760
Joined: April 23rd, 2005, 9:12 pm
Location: Plano, Texas
Contact:

Re: Jumppads or flippads possible ?

Post by Soviet » May 10th, 2010, 10:36 pm

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.
Image
ImageImageImage
Image
"Zaitsev is a cunt." - Pedsdude

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest