MODSonline
  Welcome Guest to MODSonline Home | Forums | Register | Login
Main-Menu
Home
Login
Register
Add Download
Add News
Add Tutorial *
Forums

Advertise
Affiliate Store US *
Affiliate Store UK *
Affiliate Store CA *
Angry Letter Generator
Avatar Upload
Calendar of Games
Contact
Downloads
FAQs
Forums
Member List
Member Projects
News
News Grabber *
Policy
Polls
Private Messages
Reviews
Screenshot Gallery
Search
Servers - Game
Store - Shirts *
Subscribe
Topics
Tutorials
Weblinks
Wiki *
Tutorials
CoD Mapping
CoDUO Mapping
CoD2 Mapping
CoD4 Mapping
CoD FAQs
HL2 Mapping
HL2 FAQs
SOF1 Mapping
Crysis Mapping
Q4 Mapping
Doom 3 Mapping
Doom 3 FAQs
UT2K3 Mapping
SOF2 Mapping
SOF2 FAQs

Lightray Modeling
General Modeling
General Modding
Adobe Photoshop
Common Mapping Errors

Readme.txt Generator
Members-Online
Gordonreap... [Downl]

1 Members and 15 Guests
Chat MODSonline
0 People Now Chatting
MODSOnline TeamSpeak

download TeamSpeak

In-The-News
Sunday, Oct. 12th
MODSonair 149 Live
Friday, Oct. 10th
Far Cry 2 Money, Diamonds, and Blood Trailer
Friday, Oct. 10th
MODSonair Episode 148
Thursday, Oct. 9th
Multiplayer Game Modes Interview
Sunday, Oct. 5th
Help MODSonline Heal Kids and Fight Cancer!
Latest Poll
Would you pay for mod tools?
I would pay a one time fee for mod tools for my favorite title 13%
I would pay a monthly/yearly subsrciption fee for mod tools for my favorite title 0%
I already paid for the game - Tools should come bundled because I am just fixing what the developers broke 59%
100% definitely NOT! 22%
I haven't seen a game yet that wasn't 100% perfect when the developers released it 4%
Games are the devil! 2%
Read More...
10 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
making a new teture!!
CoD 4 Level Desi.. Posts: (2) Views: (13) by WHISKYMAN
xmodel works, but tells me image file is missi...
CoD 4 Level Desi.. Posts: (11) Views: (51) by mjrtoo
Radar Pic. HOW TO MAKE IT....?
CoD 4 Level Desi.. Posts: (2) Views: (15) by fireball1
writing a word in radian without wall XD!!
CoD 4 Level Desi.. Posts: (1) Views: (12) by killerciao
Extra Life - Save Kids Quake 4 Mods for Dummies
Forums
MODSonline.com 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: CoD 4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, rEdrUmMDK, Foxhound, Rasta, StrYdeR, The_Caretaker, batistablr, playername, Welshy
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: multiple rotating brushes
sin-.virus
General Member
Since: Apr 21, 2008
Posts: 5
Last: May 10, 2008
[view latest posts]
Level 0
Category: CoD 4 Scripting
Posted: Saturday, May. 10, 2008 02:37 pm
Using the tutorial i easly was able to make the first of my model rotate, but the others won't rotate only the first one. Is there a special syntax or something for multiple brushes? I tried giving each of the brush its own unique targetname since i have a series of gears that i am looking to rotate but every time i change the key/value pairs for one brush it changes the for the other gears too. Any help on getting them all to rotate woulld be much apriceated.
The_Caretaker
Preferred Member
Since: Jun 8, 2004
Posts: 11559
Last: Oct 4, 2008
[view latest posts]
Level 10
Forum Moderator
Category: CoD 4 Scripting
Posted: Saturday, May. 10, 2008 03:08 pm
Can you post your script please?

You'll basically have to give every gear a seperate targetname (gear1, gear2 etc for instance), call them in your script seperately and rotate them seperately as well..

so for instance this script will rotate two gear opposite directions making a full rotation in 4 seconds:

rotategears()
{
gear1=getent("gear1","targetname");
gear2=getent("gear2","targetname");
while(1)
{
gear1 rotateyaw(90,1);
gear2 rotateyaw(-90,1);
gear2 waittill("rotatedone");
}
}
sin-.virus
General Member
Since: Apr 21, 2008
Posts: 5
Last: May 10, 2008
[view latest posts]
Level 0
Category: CoD 4 Scripting
Posted: Saturday, May. 10, 2008 03:35 pm
Actually I think you may have just answered my problem I was calling them in an array. I am going to go change my script and see how this works out.
sin-.virus
General Member
Since: Apr 21, 2008
Posts: 5
Last: May 10, 2008
[view latest posts]
Level 0
Category: CoD 4 Scripting
Posted: Saturday, May. 10, 2008 04:02 pm
Thank a lot man that helped out a lot now they are all working. Just a thought is it possible to have something rotate on two axises?
The_Caretaker
Preferred Member
Since: Jun 8, 2004
Posts: 11559
Last: Oct 4, 2008
[view latest posts]
Level 10
Forum Moderator
Category: CoD 4 Scripting
Posted: Saturday, May. 10, 2008 04:05 pm
sure

gear1 rotateyaw(90,1);
gear1 rotateroll(90,1);

that should work I think... because the script should not wait to do each rotation. If it does. try the rotateto command, it's explained in the wiki
sin-.virus
General Member
Since: Apr 21, 2008
Posts: 5
Last: May 10, 2008
[view latest posts]
Level 0
Category: CoD 4 Scripting
Posted: Saturday, May. 10, 2008 04:15 pm
Alright thanks alot man.
FiremanPaul
General Member
Since: Nov 5, 2006
Posts: 76
Last: Oct 5, 2008
[view latest posts]
Level 3
Category: CoD 4 Scripting
Posted: Monday, May. 12, 2008 10:12 pm
Check this tutorial, it will allow you to rotate any number of brush models or models at varying speeds and on any axis. They all have the same targetname. I don't think you can rotate one object on more than one axis tho, but I've never tried. http://www.modsonline.com/Tutorials-read-481.html
82ndAB-Talon
General Member
Since: May 14, 2006
Posts: 82
Last: Sep 29, 2008
[view latest posts]
Level 3
Category: CoD 4 Scripting
Posted: Monday, May. 12, 2008 11:07 pm
Could you explain what a yaw is? I see this time and time again, but I'm not sure what it actually is...
The_Caretaker
Preferred Member
Since: Jun 8, 2004
Posts: 11559
Last: Oct 4, 2008
[view latest posts]
Level 10
Forum Moderator
Category: CoD 4 Scripting
Posted: Tuesday, May. 13, 2008 11:20 am
yaw, roll and pitch are the axis along which the entity is rotated.

Yaw will rotate in the XY plane.

edit: Wikipedia, that explain it all

edited on May. 13, 2008 11:20 am by The_Caretaker
Restricted Access Restricted Access subscribe
MODSonline.com Forums : Call of Duty 4 : CoD 4 Scripting
All logos and trademarks and information in this site are property of MODSonline LLC © 2008.
The comments are property of their posters.
RSS news feeds for MODSonline can be found News.php.
Art of War Central
Partners
Frag Universe
The Firing Box
Call of Duty Headquarters
modbase.be
XoXide
Battle for Europe COD2
CODAddicts - Call of Duty News & Downloads
Ask About
Advertising
Friends
Great Gamer
CoD 4 Base
The Clan Database
Ask About
Advertising
Link to Us
MODSonair
View in iTunes
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
MODSonair Releases
MODSonair Episode 148
MODSonair Episode 147
MODSonair Episode 146
MODSonair Episode 145
MODSonair Episode 144
Next Show
The next MODSonair show will air LIVE on:
10/19/2008 11:00 EDT

Time remaining:
Copyright © 2008 MODSonline
Tresware Content Management System Copyright © 2008 Tresware
Website Designed and Hosted   Tresware