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

Members Online

»
0 Active | 100 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

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
Page
Previous Page
subscribe
Author Topic: Rotating brushes and models at same time...
Rezil
General Member
Since: Aug 25, 2006
Posts: 30
Last: Apr 10, 2013
[view latest posts]
Level 2
Category: CoD4 MP Mapping
Posted: Thursday, Mar. 22, 2012 03:32 pm
Add this:

Code:
thread rotateSink();


inside the curly brackets of your main() function. Place the entire rotateSink() function outside of main(). Test.
Share |
HarryNutz
General Member
Since: May 6, 2011
Posts: 182
Last: Mar 26, 2012
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Thursday, Mar. 22, 2012 04:00 pm
Well Im getting an error... and Im still not sure I have it in the right place lol.

So here is what my .gsc looks like now and I feel its not right:

Code:
main(thread rotateSink();)
{
	//maps\createart\mp_ag_town_art::main();
	maps\mp\_load::main();
	maps\mp\_breakglass::main();
	maps\mp\mp_ag_town_doors::main();
	maps\mp\mp_ag_town_hatches::main();
	maps\mp\mp_ag_town_doors_pack::main();
	maps\mp\_ac_fan_script::main();
	maps\mp\mp_ag_town_drown::main();
	maps\createfx\mp_ag_town_fx::main();
	maps\mp\mp_ag_town_fx::main();
	maps\mp\_explosive_barrels::main();

	//maps\mp\_compass::setupMiniMap("compass_map_mp_ag_town");

	//setExpFog(500, 2200, 0.81, 0.75, 0.63, 0);
	//VisionSetNaked( "mp_ag_town" );
	//ambientPlay("ambient_ag_town_ext");

	game["allies"] = "marines";
	game["axis"] = "opfor";
	game["attackers"] = "axis";
	game["defenders"] = "allies";
	game["allies_soldiertype"] = "desert";
	game["axis_soldiertype"] = "desert";

	setdvar( "r_specularcolorscale", "1" );

	setdvar("r_glowbloomintensity0",".25");
	setdvar("r_glowbloomintensity1",".25");
	setdvar("r_glowskybleedintensity0",".3");
	setdvar("compassmaxrange","1800");
	}

rotateSink {	
	sinkElements = getEntArray( "sink_element", "targetname" );
	if( isDefined( sinkElements ) )
		for( i=0; i < sinkElements.size; i++ )
			sinkElements[i] rotateYaw( 45, 1.5 );
	
}


}


And the error is for line 1 of my .gsc, it doesnt like the code inside the ()
Share |
serthy
General Member
Since: Sep 8, 2010
Posts: 482
Last: Jun 28, 2013
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Thursday, Mar. 22, 2012 04:28 pm
xD this is crazy

Code:
main() //inside these brackets is nothing!
{
	//maps\createart\mp_ag_town_art::main();
	maps\mp\_load::main();
	maps\mp\_breakglass::main();
	maps\mp\mp_ag_town_doors::main();
	maps\mp\mp_ag_town_hatches::main();
	maps\mp\mp_ag_town_doors_pack::main();
	maps\mp\_ac_fan_script::main();
	maps\mp\mp_ag_town_drown::main();
	maps\createfx\mp_ag_town_fx::main();
	maps\mp\mp_ag_town_fx::main();
	maps\mp\_explosive_barrels::main();

	//add calls to other funktions inside the main ( between these brackets > { } )
	thread rotateSink();
	//maps\mp\_compass::setupMiniMap("compass_map_mp_ag_town");

	//setExpFog(500, 2200, 0.81, 0.75, 0.63, 0);
	//VisionSetNaked( "mp_ag_town" );
	//ambientPlay("ambient_ag_town_ext");

	game["allies"] = "marines";
	game["axis"] = "opfor";
	game["attackers"] = "axis";
	game["defenders"] = "allies";
	game["allies_soldiertype"] = "desert";
	game["axis_soldiertype"] = "desert";

	setdvar( "r_specularcolorscale", "1" );

	setdvar("r_glowbloomintensity0",".25");
	setdvar("r_glowbloomintensity1",".25");
	setdvar("r_glowskybleedintensity0",".3");
	setdvar("compassmaxrange","1800");

}
//extra function, out of the main brackets!

rotateSink()
{	
	sinkElements = getEntArray( "sink_element", "targetname" );
	if( isDefined( sinkElements ) )
		for( i=0; i < sinkElements.size; i++ )
			sinkElements[i] rotateYaw( 45, 1.5 );
	
}



EDIT: fixed
EDIT: thanks to sevenz
edited on Mar. 22, 2012 10:02 am by serthy

edited on Mar. 22, 2012 10:23 am by serthy
Share |
HarryNutz
General Member
Since: May 6, 2011
Posts: 182
Last: Mar 26, 2012
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Thursday, Mar. 22, 2012 04:43 pm
That kicked a bad syntax error for the { below rotateSink

Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Thursday, Mar. 22, 2012 05:22 pm
brackets missing:

rotateSink <--- HERE
{
sinkElements = getEntArray( "sink_element", "targetname" );
...

should be rotateSink()
Share |
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 1293
Last: Jul 9, 2016
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Thursday, Mar. 22, 2012 07:03 pm
attachment: application(1.1Kb)
Give this a try. It should work. Take a look at the attached .map for reference on setting it up. One thing you have to take into consideration is players can jam the sink movement unless you put a trigger hurt somewhere in there, and turn it on when needed.

Code:
main()
{
	thread sinkSecret();
}

sinkSecret()
{
	level.sinkTrig = getEnt ("sink_trig", "targetname");
	level.hurtTrig = getEnt ("sink_hurt_trig", "targetname");
	
	level.hurtTrig maps\mp\_utility::triggerOff();
	
	sinkParts = getEntArray ("sink", "targetname");
	for (i=0; i < sinkParts.size; i++)
	{
		sinkParts[i] thread sinkThink();
	}
}

sinkThink()
{
	while(1)
	{
		level.sinkTrig waittill ("trigger");
		level.sinkTrig maps\mp\_utility::triggerOff();

//		self playSound ("my_sound");
		self moveX (-64, 2, 0.5, 0.5);
		self waittill ("movedone");
		
		wait (5);
		
//		self playSound ("my_sound");
		self moveX (64, 2, 0.5, 0.5);
		self waittill ("movedone");
		
		level.hurtTrig maps\mp\_utility::triggerOff();
		
		level.sinkTrig maps\mp\_utility::triggerOn();
	}
}


The sounds won't work, I don't have enough time to work on it right now, so I just commented them out, because with the current code it will play three times, which is not what you want, since there are 3 sink entities. You have to create an origin for the sounds to play from, either spawn a script origin or just put one in and grab its targetname, which is probably best. Anyway, it should work. Just change your distance (64, -64) it moves and direction, (X or Y) based on where you want to move it to. the speed you'll have to match with your sound later.
Share |
Restricted Access Topic is Locked
Page
Previous Page
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

»