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

Members Online

»
0 Active | 7 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
Next Page
subscribe
Author Topic: Rotating brushes and models at same time...
HarryNutz
General Member
Since: May 6, 2011
Posts: 182
Last: Mar 26, 2012
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Sunday, Mar. 18, 2012 07:20 pm
Deek said he would help me with this when we got together, but the gods are against us all the time and we keep missing each other... so I figured, just incase I should ask in here.

I have a tunnel and want it to come into a restaurant I made, but instead of a simple hatch door or something, I want it to slide/rotate a small island sink area. This consists of 9 brushes and 2 models (sink and faucet)



I know how to get the brushes to rotate, but not how to rotate the 2 models at the same time.
Share |
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 1293
Last: Jul 9, 2016
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Sunday, Mar. 18, 2012 09:17 pm
If you are available today just PM me, and we can post the results here for others to learn from later.
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: Sunday, Mar. 18, 2012 10:39 pm
select all brushes > script_brushmodel
select every single model > script_model
select your object > K/V : targetname/yourobjectname
and now call your object with:
object = getEntArray( "yourobjectname" , "targetname" );
and move every piece!
Share |
HarryNutz
General Member
Since: May 6, 2011
Posts: 182
Last: Mar 26, 2012
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Monday, Mar. 19, 2012 01:38 am
@Deek... if your around Monday or Tues just send a
pm with email selected.

@serthy... I know about selecting brushes as I have functional doors, but the models it still wont do it. Says "Entity NOT created, can't make a point entity out of brushes" when I select both models and do script_model.
Share |
Rezil
General Member
Since: Aug 25, 2006
Posts: 30
Last: Apr 10, 2013
[view latest posts]
Level 2
Category: CoD4 MP Mapping
Posted: Monday, Mar. 19, 2012 08:25 am
You have to select each individual model, then give it a targetname and either get each entity with getEnt or you could give the two models the same targetname and getting them via getEntArray.
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:49 am
Im completely lost... so I have all the brushes as script_brushmodel with a targetname of sink and then each model is a script_model also with targetname of sink.

Now what is it I need to do, to make them all rotate 180 when hitting trigger and then back after hitting trigger again? [rolleyes]
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 08:10 am
Sorry I couldn't make it the other day to help you out. It's 3am and I just got off work otherwise I would write something up, but I don't think you should rotate them, because each model will rotate on its own axis and not the same axis as your brushmodel group, which wouldn't make them rotate together. I would move them in a direction. Using the function "moveX" or "moveY". This would make the group slide on the floor instead of rotate.

I'll see if I can write something up in the morning. I'm not the greatest at scripting but since you aren't getting much help, something is better than nothing.
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 08:26 am
Give the script_brushmodels a different name than the script_models. The reason being that you cannot change the origin of your script_model but you can do that what a script_brushmodel.

If you absolutely must rotate them, then you could use some high school trigonometry to figure out the x and y values and use moveTo/rotateTo. Otherwise, moving them would be the best option.
Share |
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 09:13 am
Rezil writes...
Quote:
Give the script_brushmodels a different name than the script_models. The reason being that you cannot change the origin of your script_model but you can do that what a script_brushmodel.

If you absolutely must rotate them, then you could use some high school trigonometry to figure out the x and y values and use moveTo/rotateTo. Otherwise, moving them would be the best option.


Quote:
The reason being that you cannot change the origin of your script_model


That isn't true. You can redefine an origin for a script_model as many times as you like, without any problems.

The way he has been advised to do it - give everything the same targetname - is the right way to do this. You then just move the whole lot at once.
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 09:37 am
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
Share |
Restricted Access Topic is Locked
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

»