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

Members Online

»
0 Active | 53 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: multi elevator help
1coolboy8
General Member
Since: Jun 6, 2009
Posts: 14
Last: Jul 15, 2010
[view latest posts]
Level 1
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Thursday, Nov. 12, 2009 12:54 pm
Hey all, I have a problem with one of my elevator's (Multi player map) and have been trying to get it working now for 4 days.... (been driving me mad)

I dont really like asking for help untill im really really stuck, and I am lol.

I have 4 elevator's in my map and the first 3 work fine its the last one that is driving me mad (a rocket looking elevator) I have redone this elevator 3 time's in Radiant thinking I most of fucked something up along the way but its not looking like it, Its something to do with the script (I hope)

Here is the picture of the settings in Radiant
http://i34.tinypic.com/334n893.jpg

and here is the script's I use for the .iwd
(each elevator has its own script)
elevator 1
Code:

main()
{
thread elevator();
}

elevator()
{
elevator=getent("elevator","targetname");
trig=getent("trig_elevator","targetname");
while(1)
{
trig waittill ("trigger");
elevator movez (504,7,1.9,1.9);
elevator waittill ("movedone");
wait(3);
elevator movez (512,7,1.9,1.9);
elevator waittill ("movedone");
wait(3);
elevator movez (514,7,1.9,1.9);
elevator waittill ("movedone");
wait(3);
elevator movez (-514,7,1.9,5);
elevator waittill ("movedone");
wait(3);
elevator movez (-512,7,1.9,5);
elevator waittill ("movedone");
wait(3);
elevator movez (-504,7,1.9,5);
elevator waittill ("movedone");
}
}


elevator 2
Code:

main()
{
thread elevator2();
}

elevator2()
{
elevator=getent("elevator2","targetname");
trig=getent("trig_elevator2","targetname");
while(1)
{
trig waittill ("trigger");
elevator movez (90,1,0.0,0.0);
elevator waittill ("movedone");
wait(0);
elevator movez (-90,1,0.0,0.0);
elevator waittill ("movedone");
wait(10);
}
}


elevator 3
Code:

main()
{
thread elevator3();
}

elevator3()
{
elevator=getent("elevator3","targetname");
trig=getent("trig_elevator3","targetname");
while(1)
{
trig waittill ("trigger");
elevator movez (728,11,0.1,0.1);
elevator waittill ("movedone");
wait(3);
elevator movez (-728,11,0.1,0.1);
elevator waittill ("movedone");

}
}


elevator 4
Code:

main()
{
thread elevator4();
}

elevator4()
{
elevator=getent("elevator4","targetname");
trig=getent("trig_elevator4","targetname");
while(1)
{
trig waittill ("trigger");
elevator movez (10000,2,1.9,1.9);
elevator waittill ("movedone");
wait(1);
elevator movez (-10000,1,0.1,0);
elevator waittill ("movedone");
}
} 


and here is the .gsc file
Code:

main()
{

	maps\mp\teleportenter::main();
	maps\mp\mp_elevator::main();
	maps\mp\mp_elevator2::main();
	maps\mp\mp_elevator3::main();
	maps\mp\mp_elevator4::main();


game["allies"] = "american";
game["axis"] = "german";
game["attackers"] = "allies";
game["defenders"] = "axis";
game["american_soldiertype"] = "normandy";
game["german_soldiertype"] = "normandy";


}


the trigger for the 4th one shows up when im in the map, but when I go to use it nutin happends, It just wont move. I have tryed changing how high it goes but still nutin
(tryed making others move up more and it works)

I am a noob to this scripting stuff but I really thought I could do it with out asking for help [cry] but if anyone could help me with this it would be great.

edited on Nov. 12, 2009 07:54 am by 1coolboy8

edited on Nov. 12, 2009 08:06 am by 1coolboy8

edited on Nov. 12, 2009 08:07 am by 1coolboy8
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 Scripting
Posted: Thursday, Nov. 12, 2009 03:53 pm
i think i know the problem not to sure, but next time when u test ur maps run them in /developer 1 or 2, then u could post the error from console now what i think is wronge is the time. u have 2 diffrent times try this,

elevator movez (10000,2,1.9,1.9);

elevator movez (-10000,2,1.9,1.9);

same thing basicly i think this should work.

if this dosnt work then u need to make sure that ur elevator 4 is a brush model and they have the same name in radaint and gsc.
Share |
_INSANE_
General Member
Since: Nov 7, 2008
Posts: 352
Last: Jul 10, 2011
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Thursday, Nov. 12, 2009 07:55 pm
The scripts look fine, maybe you don't have something named right or placed right in the map.
Share |
codmp
General Member
Since: Feb 7, 2006
Posts: 905
Last: Aug 1, 2011
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Friday, Nov. 13, 2009 12:23 am
In elevator script 4:

elevator movez (10000,2,1.9,1.9);

In that line you have the time for it to complete its movement set for 2 seconds, but the acceleration speed and de-acceleration times are 1.9. And 1.9 + 1.9 = 3.8, higher than 2, which is causing your problem. Change 2 to something higher than 3.8, or lower those values to add up less than 2.

Share |
_INSANE_
General Member
Since: Nov 7, 2008
Posts: 352
Last: Jul 10, 2011
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Friday, Nov. 13, 2009 12:25 am
codmp writes...
Quote:
In elevator script 4:
elevator movez (10000,2,1.9,1.9);
In that line you have the time for it to complete its movement set for 2 seconds, but the acceleration speed and de-acceleration times are 1.9. And 1.9 + 1.9 = 3.8, higher than 2, which is causing your problem. Change 2 to something higher than 3.8, or lower those values to add up less than 2.



That's probably the problem he has... i missed that.
Share |
codmp
General Member
Since: Feb 7, 2006
Posts: 905
Last: Aug 1, 2011
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Friday, Nov. 13, 2009 12:31 am
-=INSANE=- writes...
Quote:
codmp writes...
Quote:
In elevator script 4:
elevator movez (10000,2,1.9,1.9);
In that line you have the time for it to complete its movement set for 2 seconds, but the acceleration speed and de-acceleration times are 1.9. And 1.9 + 1.9 = 3.8, higher than 2, which is causing your problem. Change 2 to something higher than 3.8, or lower those values to add up less than 2.



That's probably the problem he has... i missed that.


It is =P

Also, intro to scripting:
http://www.modsonline.com/Tutorials-read-121.html
and
http://www.modsonwiki.com/index.php/Call_of_Duty_4:_Scripting_Introduction

If you haven't seen it already, to help with any scripting you do later on.
Share |
1coolboy8
General Member
Since: Jun 6, 2009
Posts: 14
Last: Jul 15, 2010
[view latest posts]
Level 1
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Friday, Nov. 13, 2009 03:05 pm
Dont know what to say dudes, Its not working. I even made a mini map with only a 4th elevator in it, didnt work, tryed the scripts from the other elevator's and changed the names to what the 4th one should be and still nutin.... [banghead] [duh]


lol -=INSANE=- I thought that had to be it :P

edited: just going to give up on it.... but thanks for the info and the help dudes. [tongue]

Edited2: think theres something wrong with my radiant I cant make any doors scripts or anything that moves now..... flick!
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

»