Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds
Watch MODSonair

Members Online

»
0 Active | 86 Guests
Online:

LATEST FORUM THREADS

»
run artillery on maps
CoD+UO Map + Mod Releases
Call of DutyŽ: WWII
CoD WW2 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 4
Category: CoD4 MP Mapping
CoD 4 mapping and level design for multiplayer.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Jumppads
S3NiC
General Member
Since: Aug 13, 2009
Posts: 71
Last: Feb 1, 2010
[view latest posts]
Level 3
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Monday, Oct. 19, 2009 06:00 pm
Ok guys, I have a question. I am following the tutorial http://www.modsonline.com/Tutorials-read-464.html

I have it all done and it works great! (Thanks Marshall2006.) But i need to know what values and keys i would use to put more in my map? Also do i need to modify my gsc to accomodate for the new jump pads?

Your only,

S3NiC

P.S. here is my gsc if you need it for some reason.

Code:

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

	ambientPlay("ambient_backlot_ext");
	
	level._effect ["javelin_explosion"] = loadfx ("explosions/javelin_explosion");
	level._effect ["brickblast_100"] = loadfx ("test/brickblast_100");
	game["allies"] = "sas";
	game["axis"] = "opfor";
	game["attackers"] = "axis";
	game["defenders"] = "allies";
	game["allies_soldiertype"] = "woodland";
	game["axis_soldiertype"] = "woodland";
	
	setdvar( "r_specularcolorscale", "1" );
	
	setdvar("r_glowbloomintensity0",".25");
	setdvar("r_glowbloomintensity1",".25");
	setdvar("r_glowskybleedintensity0",".3");
	setdvar("compassmaxrange","1800");

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


				//air moveto (throw, time, 0.5,0.5); 
				//air moveto (throw, time, 0.5,0.5); 
				wait 1; 
				user unlink(); 
				wait 1; 
				} 
		} 
}
Share |
DeekCiti
General Member
Since: Mar 12, 2008
Posts: 1293
Last: Jul 8, 2016
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Monday, Oct. 19, 2009 06:29 pm
You'll need to catch an array of entities, instead of just one.

The code you have won't work for an array, it would need to be modified.
Try this code instead. I'm not sure where I found it but I picked it up from somewhere.

It catches an array of the glowing circles and jump pad triggers.
I've never made one of these things but I did look at the tut for it one time and there isn't much to it.

Try this code in place of yours, change the code to fit your entities and values.

Code:
main()
{
	level._effect[ "beacon_glow" ] = loadfx( "misc/ui_pickup_available" );

	jumpx = getentarray("jump", "targetname");
	glow = getentarray("glow", "targetname");

	if(isdefined(glow))
	{
		for (g=0; g<glow.size; g++)
		{
			maps\mp\_fx::loopfx("beacon_glow", (glow[g].origin), 3, (glow[g].origin) + (0, 0, 90));
		}
	}

	if(isdefined(jumpx))
	{
		for (j = 0; j < jumpx.size; j++)
		{
			jumpx[j] thread jump_idle();
		}
	}

	jump_idle()
	{
		while (1)
		{
			self waittill ("trigger",user);
			if (user istouching(self))
			{
		
				//throw = user.origin + (100, 100, 0);
				air = spawn("script_model",(0,0,0));

				// TODO: prevent script abort when no target is defined by checking if it's defined
				air1 = self.target;
				air2 = air1.target;
				air3 = air2.target;
				air4 = air3.target;
			
				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);
						
				//air moveto (throw, time, 0.5,0.5);
				//air moveto (throw, time, 0.5,0.5);
				wait 1;
				user unlink();
				wait 1;
			}
		}
	}
}


Maybe someone can explain how to use this code if you have trouble, because it appears there are origins that need to be placed in radiant.

If you only have let's say 3 different pads, what you can do is duplicate your original code, with different targetnames and variables so they don't conflict with eachother, to simplify it for you. Up to you.
Share |
S3NiC
General Member
Since: Aug 13, 2009
Posts: 71
Last: Feb 1, 2010
[view latest posts]
Level 3
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Monday, Oct. 19, 2009 06:32 pm
Ok Thanks ill give them both a try. Ill post if i need any help. [biggrin]
Share |
S3NiC
General Member
Since: Aug 13, 2009
Posts: 71
Last: Feb 1, 2010
[view latest posts]
Level 3
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Monday, Oct. 19, 2009 08:56 pm
All right here is my new gsc.
Code:
jump1
{ 
jump1x = getent ("jump1","targetname"); 
glow1 = getent ("glow1","targetname"); 
air5 = getent ("air5","targetname"); 
air6 = getent ("air6","targetname"); 
air7 = getent ("air7","targetname"); 
air8 = getent ("air8","targetname"); 

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

	while (1) 
	{ 
	jump1x waittill ("trigger",user); 
			if (user istouching(jump1x)) 
			{ 
			//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 (air5.origin, 1); 
				wait 1; 
	air moveto (air6.origin, 1); 
				wait .5; 
	air moveto (air7.origin, 1); 
				wait .5; 
	air moveto (air8.origin, 1); 


				//air moveto (throw, time, 0.5,0.5); 
				//air moveto (throw, time, 0.5,0.5); 
				wait 1; 
				user unlink(); 
				wait 1; 
				} 
		} 
}
()
I then Compiled the reflections it finnished that and then i built the ff then i started the map. Went to jump pad 1 then i went to jump pad two but nothing was there. to give you a better understanding of what i am trying to say here is a video. Where i shoot is where the jump pad is supossed to be but it isnt there.
http://www.xfire.com/video/16b262/

anything?????
http://www.xfire.com/video/16b262/[confused][confused]


S3NiC
Share |
DeekCiti
General Member
Since: Mar 12, 2008
Posts: 1293
Last: Jul 8, 2016
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Monday, Oct. 19, 2009 09:13 pm
It doesn't look like you changed anything. What did you do differently?

I'm confuzzeled. [confused]
Share |
S3NiC
General Member
Since: Aug 13, 2009
Posts: 71
Last: Feb 1, 2010
[view latest posts]
Level 3
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Monday, Oct. 19, 2009 10:25 pm
I changed the jump to jump1 and glow to 'glow1' and air1 to "air5 air2 to "air6" etc but for somereason it is not showing up in cod4... [confused]
Share |
S3NiC
General Member
Since: Aug 13, 2009
Posts: 71
Last: Feb 1, 2010
[view latest posts]
Level 3
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Tuesday, Oct. 20, 2009 06:19 pm
Dont Forget I still need an answer for this. :)
Share |
DeekCiti
General Member
Since: Mar 12, 2008
Posts: 1293
Last: Jul 8, 2016
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Tuesday, Oct. 20, 2009 09:32 pm
You should re-read my post, it has two solutions.

1. You use the script I posted instead of yours, and make it fit your entities in radiant.

2. You duplicate your existing script as many times as you have different jump pads, but in every duplicate, you change the variable names in script, always making sure they match in radiant.

An example of duplicating the script twice, using your first script you posted in this thread. Keep in mind, that doing it this way is inefficient. You would be better off using an array, but suit yourself.

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

	ambientPlay("ambient_backlot_ext");
	
	level._effect ["javelin_explosion"] = loadfx ("explosions/javelin_explosion");
	level._effect ["brickblast_100"] = loadfx ("test/brickblast_100");
	game["allies"] = "sas";
	game["axis"] = "opfor";
	game["attackers"] = "axis";
	game["defenders"] = "allies";
	game["allies_soldiertype"] = "woodland";
	game["axis_soldiertype"] = "woodland";
	
	setdvar( "r_specularcolorscale", "1" );
	
	setdvar("r_glowbloomintensity0",".25");
	setdvar("r_glowbloomintensity1",".25");
	setdvar("r_glowskybleedintensity0",".3");
	setdvar("compassmaxrange","1800");

	thread jump_pad_1();
	thread jump_pad_2();
}

jump_pad_1() 
{ 
	jump1 = getent ("jump1","targetname"); 
	glow1 = getent ("glow1","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", (glow1.origin), 3, (glow1.origin) + (0, 0, 90)); 

	while (1) 
	{ 
		jump1 waittill ("trigger",user); 
		if (user istouching(jump1)) 
		{ 
		//throw = user.origin + (100, 100, 0); 

		air_a = spawn ("script_model",(0,0,0)); 
		air_a.origin = user.origin; 
		air_a.angles = user.angles; 
		user linkto (air_a); 
		time = 1; 
		air_a moveto (air1.origin, 1); 
		wait (1); 
		air_a moveto (air2.origin, 1); 
		wait (.5); 
		air_a moveto (air3.origin, 1); 
		wait (.5); 
		air_a moveto (air4.origin, 1); 

		//air_a moveto (throw, time, 0.5,0.5); 
		//air_a moveto (throw, time, 0.5,0.5); 

		wait (1); 
		user unlink(); 
		wait (1); 
		} 
	} 
}

jump_pad_2() 
{ 
	jump2 = getent ("jump2","targetname"); 
	glow2 = getent ("glow2","targetname"); 
	air5 = getent ("air5","targetname"); 
	air6 = getent ("air6","targetname"); 
	air7 = getent ("air7","targetname"); 
	air8 = getent ("air8","targetname"); 

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

	while (1) 
	{ 
		jump2 waittill ("trigger",user); 
		if (user istouching(jump2)) 
		{ 
		//throw = user.origin + (100, 100, 0); 

		air_b = spawn ("script_model",(0,0,0)); 
		air_b.origin = user.origin; 
		air_b.angles = user.angles; 
		user linkto (air_b); 
		time = 1; 
		air_b moveto (air5.origin, 1); 
		wait (1); 
		air_b moveto (air6.origin, 1); 
		wait (.5); 
		air_b moveto (air7.origin, 1); 
		wait (.5); 
		air_b moveto (air8.origin, 1); 

		//air_b moveto (throw, time, 0.5,0.5); 
		//air_b moveto (throw, time, 0.5,0.5); 

		wait (1); 
		user unlink(); 
		wait (1); 
		} 
	} 
}


Look at the example and figure out how to add more. Look at the variables and targetnames that had to be changed so they don't interact with each other. Like I said, doing it this way is inefficient but not entirely wrong. Nothing is "wrong" as long as it works.
Share |
S3NiC
General Member
Since: Aug 13, 2009
Posts: 71
Last: Feb 1, 2010
[view latest posts]
Level 3
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Wednesday, Oct. 21, 2009 06:49 am
Haha! It worked! Thanks a bunch!!!!! [biggrin][biggrin][cool][drink][jumping][jumping][rocking]
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 MP Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»