Call of Duty 4: Jumppads: Difference between revisions

From COD Modding & Mapping Wiki
Jump to navigation Jump to search
(New page: ''Marshall2006 show you how to make 'Quake III style' jump pads'' Image:warning.png This tutorial assume that you are familiar with Radiant/trigger and some level of scripting. == C...)
 
Line 137: Line 137:


Here's the finishing product:
Here's the finishing product:
[[Image:jumpfinished.jpg]]

Revision as of 19:40, 16 October 2008

Marshall2006 show you how to make 'Quake III style' jump pads

 This tutorial assume that you are familiar with Radiant/trigger and some level of scripting.

Create your landing zone

Create the trigger

  • Texture it with Trigger. Filter settings: Usage > Tools
  • Right click your brush, Trigger > Multiple
  • Press the N key twice and enter the following Values:
Key: targetname
Value: jump


Origins

  • Rightclick, script > origin
  • Place it where you want to jump from.

  • Make sure it's 4 units off the ground. (effect purposes)
  • Give it the following Values:


Key: targetname
Value: glow
  • Copy and Paste the origin 4 times.
  • Place them like below:



Start adding Values to each origin, starting from the closest to the ..

.. parent origin, moving to the furthest.

Pasted Origin #1

Key: targetname
Value: air1
Key: target
Value: air2

Pasted Origin #2

Key: targetname
Value: air2
Key: target
Value: air3

Pasted Origin #3

Key: targetname
Value: air3
Key: target
Value: air4

Pasted Origin #4

Key: targetname
Value: air4


The origins with the values of, for example air1, represent the flight path. The more you add, the smoother the flight is.

 Keep note of the height difference between the jumpad and the landing.


Scripting GSC

Copy the following into your .GSC file:

main()
{
  maps\mp\_load::main();

  game["allies"] = "sas";
  game["axis"] = "russian";
  game["attackers"] = "axis";
  game["defenders"] = "allies";
  game["allies_soldiertype"] = "woodland";
  game["axis_soldiertype"] = "woodland";

setdvar( "r_specularcolorscale", "1" );
  thread jumper();
}

jumper()
{
 jumpx = getent ("jump","targetname");
 glow = getent ("glow","targetname");
 air1 = getent ("air1","targetname");
 air2 = getent ("air2","targetname");
 air3 = getent ("air3","targetname");
 air4 = getent ("air4","targetname");

 level._effect[ "beacon_glow" ] = loadfx( "misc/ui_pickup_available" );
 maps\mp\_fx::loopfx("beacon_glow", (glow.origin), 3, (glow.origin) + (0, 0, 90));

 while (1)
 {
  jumpx waittill ("trigger",user);
   if (user istouching(jumpx))
   {
	//throw = user.origin + (100, 100, 0);
	air = spawn ("script_model",(0,0,0));
        air.origin = user.origin;
	air.angles = user.angles;
	user linkto (air);
	time = 1;
        air moveto (air1.origin, 1);
	wait 1;
        air moveto (air2.origin, 1);
	wait .5;
        air moveto (air3.origin, 1);
	wait .5;
        air moveto (air4.origin, 1);
	wait 1;
	user unlink();
	wait 1;
	}
  }
}


Here's the finishing product: