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

Members Online

»
0 Active | 12 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
Category: CoDUO Mapping
CoD United Offensive mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: connecting stuff in script?
Maddogg8472
General Member
Since: Jun 18, 2004
Posts: 55
Last: Aug 22, 2008
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Saturday, Mar. 11, 2006 08:57 pm
ok im making a lift in my map with doors that will have to move with the elevator as it moves. anyone know how i can connect my lift doors to the lift brush_model in my lift gsc file please?

here my lift script can you show me where in the script i should put it also:

main()
{
thread gate_init();

}
gate_init(){
level.gatemoving=false;
level.gate1 = getent("lift2DL","targetname");
level.gate2 = getent("lift2DR","targetname");
level.gate3 = getent("lift1bottom","targetname");
level.gate4 = getent("lift1top","targetname");
level.gate5 = getent("elevatormodel_2","targetname");
level.trig = getentarray ("elevatorswitchleft_2","targetname");

if (isdefined(level.trig))
for (i=0;i level.trigthread gate_handler();
}

gate_handler() {
while (1) {
self waittill ("trigger");
if (!level.gatemoving)
thread move_gate();
wait(1);
}
}
move_gate() {
level.gatemoving = true;
sound1 = getent("lift2doorstop","targetname");
sound2 = getent("lift2doorsbottom","targetname");
sound3 = getent("elevatornoise2","targetname");
sound3 playsound ("liftnoise");
level.gate5 movez (608,11,1.5,1.5,8); //the lift moves up
//now you need a wait on the gate5 move
level.gate5 waittill ("movedone");
//ok gate5 has stopped, now open upper doors
sound1 playsound ("metalgates");
level.gate3 movez (-59,4.5,0.5,0.5); //top door lower opens
level.gate4 movez (83,4.5,0.5,0.5); //top door upper opens
wait (5); //get into the lift
sound1 playsound ("metalgates");
level.gate3 movez (59,4.5,0.5,0.5); //top door lower closes
level.gate4 movez (-83,4.5,0.5,0.5); //top door upper closes
wait (5);
sound3 playsound ("liftnoise");
level.gate5 movez (-608,11,1.5,1.5,8); //the lift goes back down
//now you need to wait on the gate5 move again
level.gate5 waittill ("movedone");
//ok gate5 has stopped, now open upper doors
sound2 playsound ("gatesopen");
level.gate1 rotateto ((0,-90,0),4); //the bottom left door opens
level.gate2 rotateto ((0,90,0),4); //the bottom right door opens
wait (8); //this is the time to get in lift at bottom
sound2 playsound ("gatesopen");
level.gate1 rotateto ((0,0,0),4); //the bottom left door closes
level.gate2 rotateto ((0,0,0),4); //the bottom right door closes


//wait (2);

level.gatemoving=false;
}

thanks[wave]
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoDUO Mapping
Posted: Saturday, Mar. 11, 2006 11:08 pm
To connect something to something else the command to use is linkto()
If you need to link a trigger to something then it needs to be enabled or forced. To do this use this command.
trigger enablelinkto();

I'm not certain which parts are your doors in this.

gate_init(){
level.gatemoving=false;
level.gate1 = getent("lift2DL","targetname");
level.gate2 = getent("lift2DR","targetname");
level.gate3 = getent("lift1bottom","targetname");
level.gate4 = getent("lift1top","targetname");
level.gate5 = getent("elevatormodel_2","targetname");
level.trig = getentarray ("elevatorswitchleft_2","targetname");

level.gate1 linkto(level.lift1bottom);
level.gate2 linkto(level.lift1bottom);
//assuming the gates1/2 are your doors

Grassy
Share |
Maddogg8472
General Member
Since: Jun 18, 2004
Posts: 55
Last: Aug 22, 2008
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Sunday, Mar. 12, 2006 09:45 pm
well i tried it but the doors dont seem to move with the lift but i may have made an error. Also i didnt say that i have 8 doors to move about, and four door to link to the lift. Heres my lift gsc for anyone who can help.
Also i have a hatch in the top of the lift that opens closes..is there a way i can link a portal to the lift as well?

main()
{
thread gate_init();
}
gate_init(){
level.gatemoving=false;
level.gate1b = getent("passliftdoor_a1","targetname");
level.gate2b = getent("passliftdoor_a2","targetname");
level.gate3b = getent("passliftdoor_b1","targetname");
level.gate4b = getent("passliftdoor_b2","targetname");
level.gate5b = getent("door_ainner2","targetname");
level.gate6b = getent("door_ainner1","targetname");
level.gate7b = getent("door_binner2","targetname");
level.gate8b = getent("door_binner1","targetname");
level.gate9b = getent("passliftdoor2_a1","targetname");
level.gate10b = getent("passliftdoor2_a2","targetname");
level.gate11b = getent("passliftdoor2_b1","targetname");
level.gate12b = getent("passliftdoor2_b2","targetname");
level.gate13b = getent("passlift","targetname");
level.trig = getentarray("passlift_sw1","targetname");
//level.gate14b = getent("lifthatch","targetname");
//level.gate14b linkto(level.passlift);
level.gate5b linkto(level.passlift);
level.gate6b linkto(level.passlift);
level.gate7b linkto(level.passlift);
level.gate8b linkto(level.passlift);
if (isdefined(level.trig))
for (i=0;i level.trigthread gate_handler();
}
gate_handler() {
while (1) {
self waittill ("trigger");
if (!level.gatemoving)
thread move_gate();
wait(1);
}
}
move_gate() {
level.gatemoving=true;
level.gate1b movex (24,2,0.5,0.5); //the outer door opens
level.gate3b movex (-24,2,0.5,0.5); //the outer door opens
level.gate2b movex (23,2,0.5,0.5); //the outer door opens
level.gate4b movex (-23,2,0.5,0.5); //the outer door opens
level.gate5b movex (22,2,0.5,0.5); //the inner door opens
level.gate7b movex (-22,2,0.5,0.5); //the inner door opens
level.gate6b movex (22,2,0.5,0.5); //the inner door opens
level.gate8b movex (-22,2,0.5,0.5); //the inner door opens
wait (12); //time to get in the lift
level.gate1b movex (-24,3,0.5,0.5); //the outer door closes
level.gate3b movex (24,3,0.5,0.5); //the outer door closes
level.gate2b movex (-23,3,0.5,0.5); //the outer door closes
level.gate4b movex (23,3,0.5,0.5); //the outer door closes
level.gate5b movex (-22,3,0.5,0.5); //the inner door closes
level.gate7b movex (22,3,0.5,0.5); //the inner door closes
level.gate6b movex (-22,3,0.5,0.5); //the inner door closes
level.gate8b movex (22,3,0.5,0.5); //the inner door closes
wait (4);
level.gate13b movez (-486,8,1.5,1.5,5); //the lift moves down
//now you need a wait on the gate13b move
level.gate13b waittill ("movedone");
//ok gate13b has stopped, now open lower doors
level.gate6b movex (-22,3,0.5,0.5); //the inner door opens
level.gate8b movex (22,3,0.5,0.5); //the inner door opens
level.gate5b movex (-22,3,0.5,0.5); //the inner door opens
level.gate7b movex (22,3,0.5,0.5); //the inner door opens
level.gate10b movex (-24,3,0.5,0.5); //the outer door opens
level.gate12b movex (24,3,0.5,0.5); //the outer door opens
level.gate9b movex (-23,3,0.5,0.5); //the outer door opens
level.gate11b movex (23,3,0.5,0.5); //the outer door opens
wait (12);
level.gate9b movex (23,3,0.5,0.5); //the outer door closes
level.gate11b movex (-23,3,0.5,0.5); //the outer door closes
level.gate10b movex (24,3,0.5,0.5); //the outer door closes
level.gate12b movex (-24,3,0.5,0.5); //the outer door closes
level.gate5b movex (22,3,0.5,0.5); //the inner door closes
level.gate7b movex (-22,3,0.5,0.5); //the inner door closes
level.gate6b movex (22,3,0.5,0.5); //the inner door closes
level.gate8b movex (-22,3,0.5,0.5); //the inner door closes
wait (4);
level.gate13b movez (486,8,1.5,1.5,5); //the lift goes back up
//now you need to wait on the gate13b move again
level.gate13b waittill ("movedone");

//wait (2);

level.gatemoving=false;
}


any helps always apreciated[drink]
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoDUO Mapping
Posted: Sunday, Mar. 12, 2006 10:22 pm
you are linking them to the wrong name.
Quote:
level.gate13b = getent("passlift","targetname");
level.trig = getentarray("passlift_sw1","targetname");
//level.gate14b = getent("lifthatch","targetname");
//level.gate14b linkto(level.passlift);
level.gate5b linkto(level.passlift);
level.gate6b linkto(level.passlift);
level.gate7b linkto(level.passlift);
level.gate8b linkto(level.passlift);


If the actual elevator that you move is this part
level.gate13b = getent("passlift","targetname");
then your linkto lines should be,
//level.gate14b = getent("lifthatch","targetname");
//level.gate14b linkto(level.gate13b);
level.gate5b linkto(level.gate13b);
level.gate6b linkto(level.gate13b);
level.gate7b linkto(level.gate13b);
level.gate8b linkto(level.gate13b);

You have to refer to the alias you assign an entity

Grassy

edited on Mar. 12, 2006 05:26 pm by WHC_Grassy

Appologies as well, I see my other post was not correct and might have caused some confusion.


edited on Mar. 12, 2006 05:29 pm by WHC_Grassy
Share |
Maddogg8472
General Member
Since: Jun 18, 2004
Posts: 55
Last: Aug 22, 2008
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Sunday, Mar. 12, 2006 10:55 pm
well i was too polite to say anyting [lol]lol...

i spose i should have asked this before but after i link doors to the lift do i need to unlink them for the doors to be able to open?

as it stands the doors and hatch move with lift perfectly, but the doors dont open.

Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoDUO Mapping
Posted: Sunday, Mar. 12, 2006 11:02 pm
[biggrin]

Erm, ok........ ahh! have you used an origin brush for each script_model?

Each script_brushmodel should comprise the actual textured brush/s and a brush textured with origin, select them all and assign them as the brushmodel.

If your doors still wont move, then I suppose you will have to unlink them, move them, then link again before the elevator moves off... [crazy]

To unlink use: FirstEnt unlink(OtherEnt);


Grassy

edited on Mar. 12, 2006 06:06 pm by WHC_Grassy
Share |
Maddogg8472
General Member
Since: Jun 18, 2004
Posts: 55
Last: Aug 22, 2008
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Sunday, Mar. 12, 2006 11:12 pm
oh well i thought origins were only for doors or breakable windows[cry]

thats not too bad...thanks again grassy[thumbs_up]
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty : CoDUO 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

»