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

Members Online

»
0 Active | 96 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 MP Mapping
CoD 2 mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Rotating Doors
jelvischan
General Member
Since: Jun 22, 2012
Posts: 48
Last: Feb 15, 2014
[view latest posts]
Level 2
Category: CoD2 MP Mapping
Posted: Wednesday, Jul. 4, 2012 05:20 am
My 2 doors rotate 90 degrees, but don't rotate back. Can someone check my scripts?

Code:
ddoors()
{
door=getent("mcdoor","targetname");
door1=getent("mcdoor1","targetname");
trig=getent("trig_mcdoors","targetname");
while(1)
{
trig waittill ("trigger");
door rotateyaw (90,2,0.5,0.5);
door1 rotateyaw (-90,2,0.5,0.5);
door waittill ("rotatedone");
door1 waittill ("rotatedone");
door rotateyaw (-90,2,0.5,0.5);
door1 rotateyaw (90,2,0.5,0.5);
door waittill ("rotatedone");
door1 waittill ("rotatedone");
wait(5);
}
}
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: CoD2 MP Mapping
Posted: Wednesday, Jul. 4, 2012 09:23 am
hehehe easy :D

look at your code

you wait until yome1 triggers your switch then both doors will rotate simoultanous
then you call a door waittill( "rotatedone" ) so you script is waiting until door is done with the rotation and after this you wrote that your script should wait for door1' rotation end, but they will end at the same time, so it will wait until infinity ^^

you have to remove 1 waittill or use wait( 2 ) instead

Code:

ddoors()
{
door=getent("mcdoor","targetname");
door.oldangles = door.angles;
door1=getent("mcdoor1","targetname");
door1.oldangles = door1.angles;
trig=getent("trig_mcdoors","targetname");

// ( pitch , yaw , roll )
rotation = ( 0 , 90 , 0 );
time = 2;
opentime = 2;

while(1)
{
trig waittill ("trigger");
door rotateTo( door.angles + rotation , time , time / 2 , time / 2 );
door1 rotateTo( door1.angles + rotation , time , time / 2 , time / 2 );

wait( time + opentime );

door rotateTo( door.oldangles , time , time / 2 , time / 2 );
door1 rotateTo( door1.oldangles , time , time / 2 , time / 2 );

wait( time );
}
}
Share |
jelvischan
General Member
Since: Jun 22, 2012
Posts: 48
Last: Feb 15, 2014
[view latest posts]
Level 2
Category: CoD2 MP Mapping
Posted: Wednesday, Jul. 4, 2012 04:21 pm
Wow how did you learn all this javascript?
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 MP Mapping
Posted: Wednesday, Jul. 4, 2012 06:18 pm
jelvischan writes...
Quote:
Wow how did you learn all this javascript?


Too bad you cant have sigs here on modsonline.
Would have mad a good quote to put in it.
Share |
liltc64
General Member
Since: Feb 12, 2007
Posts: 906
Last: Oct 22, 2012
[view latest posts]
Level 7
Im a fan of MODSonair
Category: CoD2 MP Mapping
Posted: Wednesday, Jul. 4, 2012 07:23 pm
[lol][lol][lol][lol]
Share |
jelvischan
General Member
Since: Jun 22, 2012
Posts: 48
Last: Feb 15, 2014
[view latest posts]
Level 2
Category: CoD2 MP Mapping
Posted: Wednesday, Jul. 4, 2012 08:16 pm
IzNoGoD writes...
Quote:
jelvischan writes...
Quote:
Wow how did you learn all this javascript?


Too bad you cant have sigs here on modsonline.
Would have mad a good quote to put in it.


It is java script right?
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: CoD2 MP Mapping
Posted: Wednesday, Jul. 4, 2012 08:20 pm
:0 No - lets say something similar.. [thumbs_up]
Share |
jelvischan
General Member
Since: Jun 22, 2012
Posts: 48
Last: Feb 15, 2014
[view latest posts]
Level 2
Category: CoD2 MP Mapping
Posted: Wednesday, Jul. 4, 2012 08:22 pm
serthy writes...
Quote:
:0 No - lets say something similar.. [thumbs_up]


Can you tell me what the name of the scripting language is? I wanna learn some online tutorials.
Share |
StrYdeR
General Member
Since: May 11, 2004
Posts: 11672
Last: Apr 20, 2024
[view latest posts]
Level 10
Admin
Forum Moderator
Im a HOST of MODSonair
Category: CoD2 MP Mapping
Posted: Wednesday, Jul. 4, 2012 11:42 pm
Near as dammit to objective C

[angryalien]
Share |
jelvischan
General Member
Since: Jun 22, 2012
Posts: 48
Last: Feb 15, 2014
[view latest posts]
Level 2
Category: CoD2 MP Mapping
Posted: Wednesday, Jul. 4, 2012 11:56 pm
Hey I got those doors working! Thanks a lot guys!

Another question tho, I have a use button when someone presses it I want them to be teleported to the script>origin that I set up.

I got help from another person and they said that this code would work, but nothing happens when I click use in game:
Code:
mchome()
{

trig=getent("home","targetname");
newplace=getent("backhome","targetname");

while(1)

{

trig waittill ("trigger");

self.origin = newplace.origin;  //also tried newplace;

}

}
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 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

»