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

Members Online

»
0 Active | 17 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 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
Page
Previous Page Next Page
subscribe
Author Topic: Rotating brushes and models at same time...
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoD4 MP Mapping
Posted: Thursday, Mar. 22, 2012 10:51 am
Rezil writes...
Quote:
Quote:
That isn't true. You can redefine an origin for a script_model as many times as you like, without any problems.


You can redefine an origin, but consequently you'd be moving that script_model to that origin. He wants to rotate the sink using the same pivot as his script_brushmodel.

My interpretation is that he wants to rotate along one of the vertical edges of his brushmodel. If you call a rotate function on both, the brushmodel would rotate using wherever the origin brush is as the pivot while the script_model would rotate along it's own origin point(which, without recompiling the model to my knowledge is impossible to change).

edited on Mar. 22, 2012 02:46 am by Rezil


I don't think you're understanding what is being attempted here, and more importantly HOW it is being attempted. No one is suggesting that a script_model is handled as if it was a brushmodel, thereby confusing different origins and angles between the 2 different entities. In COD, you always have to address each entity with a certain targetname individually by searching for it in a for() loop. You would do it like this:

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


Doing it this way - the "proper" way - would mean no confusion between script_model origins with brushmodel origins.
Share |
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 11:07 am
I think I do understand what is being attempted and I agree with what you said. HarryNutz would like to rotate the sink(brushmodel+model) as one entity. The only way to rotate the sink as an individual entity(or rather, make it seem that it's one entity) is if every element of your sinkElements array has the same origin. That way, when you call rotateYaw, it rotates using the same pivot for every entity.

So I guess what I'm saying is, the brushmodel origin has to be the same as the script_model one(or vice versa).
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 12:20 pm
My head is spinning now, lol

All i need is a simple method to move these pieces to allow access to the tunnel under it. It doesn't necessarily have to rotate.
Share |
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 12:30 pm
HarryNutz writes...
Quote:
My head is spinning now, lol

All i need is a simple method to move these pieces to allow access to the tunnel under it. It doesn't necessarily have to rotate.


Use Tallys method and report back.
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 12:37 pm
I don't understand how Im suppose to use that method. Don't mean to sound stupid... but all this scripting crap no matter how often I look at it... makes me go... [confused] and then [puke] and then [duh]
Share |
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 12:48 pm
Name your brushmodels and script models that you want to move "sink_element".

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

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


Save as your map .gsc. Check whether the sink rotated 45 degrees.
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 01:59 pm
okay
if you want to rotate your kitchen-armature, you create some brushes in radiant and make them ALL to ONE script_brushmodel
so you can call your armature with getEnt() > for only 1 single unique object. but you have to rotate your armature AND some xmodels at the same time, so your object consists of different parts, right?
so you have to set for each single object either a script_brushmodel or a script_model in radiant, depending what class it is.
this way getEnt() wont work, because of the different parts, so you have to use getEntArray() - which includes every part of your armature, also you have to call the motion stuff on every single part! this is done by the for-loop, like in Rezils script, every part rotates at the same time.
hope this helps a little
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 02:59 pm
Ok so I have all my brushes made into script_brushmodels with targetname of sink_element and then I have each model a script_model also with tagetnames of sink_element....

Now is where some confusion sets in... I already have a mymapname.gsc with:

Code:
main()
{
	//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");


}


And why do I feel like something is missing... what exactly is going to make this rotate? Don't I need a trigger/s?
Share |
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:05 pm
For purely testing purposes, you don't. If you did everything correctly the sink will be offset by a 45 degree angle.
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 03:28 pm
Ok thats understandable... now what about my .gsc question?
Share |
Restricted Access Topic is Locked
Page
Previous Page Next 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

»