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

Members Online

»
0 Active | 94 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 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: continuous rotation script help
-Ghost-
General Member
Since: Jun 21, 2006
Posts: 36
Last: Oct 31, 2007
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Friday, Jan. 19, 2007 10:26 am
hey there

i have a quick question regarding this script:

Code:
main()
{

thread door();
}


door()

{
door=getent("door","targetname");
trig=getent("trigger","targetname");
while(1)
{
trig waittill ("trigger");
door rotateto( (0,90,0),2.7);
door waittill ("rotatedone");
trig waittill ("trigger");
door rotateto( (0,90,0),2.7);
door waittill ("rotatedone");
} 
}


is it possible too make changes to the above script so that the rotation would be continuous and a trigger not needed, basically i want the rotation to keep going without a trigger but if a trigger is needed what sort of trigger can i use so that it would start say when i enter a room in which the object is in i want rotating.

what i am making is something with a few moving parts which all move in different directions at the same time, up till now i have'nt found any script that can do this, but i could be wrong

any and all help is appreciated

Ghost

edited on Jan. 19, 2007 05:27 am by -Ghost-

edited on Jan. 19, 2007 05:28 am by -Ghost-
Share |
OLD_MAN_WITH_GUN
General Member
Since: May 13, 2006
Posts: 754
Last: Jan 23, 2010
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Friday, Jan. 19, 2007 10:59 am
-Ghost- writes...
Quote:
hey there
up till now i have'nt found any script that can do this, but i could be wrong

[confused] http://www.modsonline.com/Forums-top-60390.html
Share |
-Ghost-
General Member
Since: Jun 21, 2006
Posts: 36
Last: Oct 31, 2007
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Friday, Jan. 19, 2007 01:18 pm
i know dude but that is a different script, i was hoping to modify the one i posted, that other script can only be named rotate as i believe it and i found it difficult to make more than one rotate function which would rotate a different way in conjunction with another.

that is also why i added this post because that other script is not what i was looking for. i want to be able to rotate multiple items going in different directions all moving at the same time.

Ghost
Share |
{GITS}Cleaner
General Member
Since: May 23, 2006
Posts: 778
Last: Apr 23, 2011
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Friday, Jan. 19, 2007 01:26 pm
I sent you a pm Ghost.
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Friday, Jan. 19, 2007 05:05 pm
-Ghost- writes...
Quote:
i want to be able to rotate multiple items going in different directions all moving at the same time.

Ghost


And thats EXACTLY what the other script does!
Share |
-Ghost-
General Member
Since: Jun 21, 2006
Posts: 36
Last: Oct 31, 2007
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Saturday, Jan. 20, 2007 03:06 am
i don't understand how though as i wrote in the other post, if a brushmodel is named rotate then surely all that are named rotate will rotate in the direction selected, i've tried adding the code twice but as i stated the brushmodels all rotate in the same direction.

i want to know how to rotate brushmodels on the y,x,z axis all at the same time..

thanks again

Ghost
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Saturday, Jan. 20, 2007 05:13 am
[banghead]

It tells you right there at the top of the script what key values you need to add to each model to make them rotate the direction you want.

Grassy
Share |
OLD_MAN_WITH_GUN
General Member
Since: May 13, 2006
Posts: 754
Last: Jan 23, 2010
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Saturday, Jan. 20, 2007 09:34 am
For you again.
Try this:
Create two script_brushmodels you want to rotate in different directions.
Now give the first script_brushmodel the following keys/values:
Quote:
key: targetname
value: rotate
key: script_noteworthy
value: z
key: speed
value: 2


And give the second script_brushmodel the following keys/values:
Quote:
key: targetname
value: rotate
key: script_noteworthy
value: x
key: speed
value: 3

Now, when you start your map, the first script_brushmodel will rotate along the z-axis with a speed of 2 (2 sec. for a full rotation) and the second script_brushmodel will rotate along the x-axis with a speed of 3 (3 sec. for a full rotation).



edited on Jan. 20, 2007 04:36 am by OLD_MAN_WITH_GUN
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Saturday, Jan. 20, 2007 12:39 pm
I just made a small demo map to test out why you are having problems. The model I made had four rotating parts all on different axis, zyx and it works fine.
Look at the screen shot of the properties box for a model.


Grassy
Share |
-Ghost-
General Member
Since: Jun 21, 2006
Posts: 36
Last: Oct 31, 2007
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Saturday, Jan. 20, 2007 04:34 pm
i tried that myself just before coming here and now i see you have posted some great help for me which is so much appreciated, i'm really really new at this and i tend to ask alot of questions sometimes the answer confuses me lol

thanks for that little extra help [thumbs_up]

Ghost
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

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

»