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

Members Online

»
1 Active | 256 Guests
Online:

LATEST FORUM THREADS

»
New BF2 Mod
BF2 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 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
Previous Page
subscribe
Author Topic: elevator with doors trigger questions
(VM)Monkey
General Member
Since: Jul 31, 2006
Posts: 113
Last: Mar 24, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Thursday, Sep. 13, 2007 07:43 am
Macklebee beat me to it.

As far as the verzoek trigger, I guess I really need to ask how you have it set up. On mine, there are buttons outside the elevator that call the elevator to the floor, so those are stationary, and you will need one on each floor. They should both be named verzoektrigger.

If you're using the same trigger to move the lift from the outside that you are to call it, then it's even easier. I'm half asleep right now though, so let me know if this is the case before I start trying to code.

And yes, I used a translator. I'm teaching myself german, which is why I knew what links was, but I was trying to figure out what benenden and boven meant. That's when I figured out it was dutch. babelfish.altavista.com/tr is the best. =P
Share |
ricardos
General Member
Since: Aug 22, 2007
Posts: 191
Last: Dec 24, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Thursday, Sep. 13, 2007 09:29 am
thank you mackelebee :D
and (VM)Monkey i thought it was not possible to make 2 triggers with the same targetname:P but it is. and now it's working :D finaly thank you all! i'm going to make outside doors too but that shouldn't be hard i think i can do that easily.
and monkey i use that site too for my english homework:P but if i put a dutch line in it it translate it wrong:P the words are good but in a weird/wrong order:P and german language is hard:P i don't realy understand it if i hear a german talking .. well sometimes i do:P but it's totaly different from dutch.
to see that the order of that site is always wrong try translating this to english:
hallo monkey. hoe gaat het? bedankt voor het helpen met mijn map. deze zin staat zeker in een verkeerde volgorde? dat denk ik wel!
hahaha(dutch=nederlands NOT duits because that's german :P )

edited on Sep. 13, 2007 12:31 pm by ricardos
Share |
(VM)Monkey
General Member
Since: Jul 31, 2006
Posts: 113
Last: Mar 24, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Thursday, Sep. 13, 2007 09:41 am
Glad you got it working.

You can use the same targetname for more than one entity, but you have to use getentarray() and usually a for() loop.

Good luck with the outside doors, I'm sure you'll get it. The hard part will be making sure that the door only opens if the elevator is at that floor. Try checking the level.direction in an if() statement.

Babelfish is pretty good for translating one word (unless it's a word with multiple meanings, then it gets weird). It sometimes doesn't seem to take into account the language's grammatical structure. I only use it for translating sentences if I'm desperate and don't mind sounding like an idiot tourist. =)
Share |
ricardos
General Member
Since: Aug 22, 2007
Posts: 191
Last: Dec 24, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Thursday, Sep. 13, 2007 10:05 am
ok i keep asking haha but htis is the last time. i got this in my map.gsc
thread door1_move();
thread door2_rotate();
thread door3_rotate();
thread door4_rotate();
thread door5_rotate();
thread door6_rotate();
thread door7_rotate();
thread door8_rotate();

and here are al those scripts
how do i put the elevator script with it if i just paste it under al the door things it dont work but i i place it above it dont work either script error everytime.
Share |
(VM)Monkey
General Member
Since: Jul 31, 2006
Posts: 113
Last: Mar 24, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Thursday, Sep. 13, 2007 10:29 am
Not sure exactly what you mean. Can you post your .gsc?
Share |
ricardos
General Member
Since: Aug 22, 2007
Posts: 191
Last: Dec 24, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Thursday, Sep. 13, 2007 11:22 am
sure here it is:
do i need tot make a tread();?
Code:
main() {

maps\mp\_load::main();
maps\mp\elevator::main();
maps\mp\kabelbaan::main();
maps\mp\trein::main();
maps\mp\slidingdoors::main();
maps\mp\mp_fearvillage_drown::main();
maps\mp\mp_fearvillage_fx::main();
// set background ambient noise
ambientPlay("ambient_mp_fearvillage");

//	setExpFog(0.0001, 0.55, 0.6, 0.55, 0);
	setCullFog(0, 10000, 0.55, 0.6, 0.55, 0);

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

        // Set some cvars
        setcvar("r_glowbloomintensity0","1");
	setcvar("r_glowbloomintensity1","1");
	setcvar("r_glowskybleedintensity0",".5");



thread door1_move();
thread door2_rotate();
thread door3_rotate();
thread door4_rotate();
thread door5a_rotate();
thread door5b_rotate();
thread door6a_rotate();
thread door6b_rotate();
thread door7_rotate();
thread door8_rotate();

}


door1_move()
{
door1 = getent("door1", "targetname");
trig = getent("door_trigger1", 
"targetname");
while (1)
{
trig waittill("trigger");
door1 movex(50, 1.5, 0.7, 0.7);
door1 playsound ("dooropen"); 

door1 waittill("movedone");
wait (3);
door1 movex(-50, 1.5, 0.7, 0.7);
door1 playsound ("doorclose");
door1 
waittill("movedone"); 
}
}


door2_rotate()
{
door2 = getent("door2", "targetname");
trig = 
getent("door_trigger2", "targetname");
while (1)
{
trig waittill("trigger");
door2 rotateYaw(90, 1.5, 0.7, 0.7);
door2 
playsound ("dooropen"); 
door2 waittill("rotatedone");
wait (3);
door2 rotateYaw(-90, 1.5, 0.7, 0.7);
door2 playsound 
("doorclose");
door2 waittill("rotatedone"); 
}
}
 
door3_rotate()
{
door3 = getent("door3", "targetname");
trig = 
getent("door_trigger3", "targetname");
while (1)
{
trig waittill("trigger");
door3 rotateYaw(-90, 1.5, 0.7, 0.7);
door3 
playsound ("dooropen"); 
door3 waittill("rotatedone");
wait (3);
door3 rotateYaw(90, 1.5, 0.7, 0.7);
door3 playsound 
("doorclose");
door3 waittill("rotatedone"); 
}
}

door4_rotate()
{
door4 = getent("door4", "targetname");
trig = 
getent("door_trigger4", "targetname");
while (1)
{
trig waittill("trigger");
door4 rotateYaw(-90, 1.5, 0.7, 0.7);
door4 
playsound ("dooropen"); 
door4 waittill("rotatedone");
wait (3);
door4 rotateYaw(90, 1.5, 0.7, 0.7);
door4 playsound 
("doorclose");
door4 waittill("rotatedone"); 
}
}

door5a_rotate()
{
door5a = getent("door5", "targetname");
trig = getent("door_trigger5a", 
"targetname");
while (1)
{
trig waittill("trigger");
door5a rotateYaw(90, 1.5, 0.7, 0.7);
door5a 
playsound ("dooropen"); 
door5a waittill("rotatedone");
wait (3);
door5a rotateYaw(-90, 1.5, 0.7, 0.7);
door5a playsound 
("doorclose");
door5a waittill("rotatedone");  
}
}

door5b_rotate()
{
door5b = getent("door5", "targetname");
trig = getent("door_trigger5b", 
"targetname");
while (1)
{
trig waittill("trigger");
door5b rotateYaw(-90, 1.5, 0.7, 0.7);
door5b 
playsound ("dooropen"); 
door5b waittill("rotatedone");
wait (3);
door5b rotateYaw(90, 1.5, 0.7, 0.7);
door5b playsound 
("doorclose");
door5b waittill("rotatedone");  
}
}

door6_rotate1()
{
trig = getent("door_trigger6", "targetname");
door = getent(trig.script_noteworthy, "targetname");
while (1)
{
trig waittill("trigger", other);
rotatearray = thread rotation_dir(door, other);
door rotateYaw(rotatearray[0],1.5,0.7,0.7);
door playsound ("dooropen");
door waittill("rotatedone");
wait (2);
while (other istouching (trig))
wait (1);
wait (2);
door rotateYaw(rotatearray[1],1.5,0.7,0.7);
door playsound ("mp_v2_bunkerdoorback");
door waittill("rotatedone");
door playsound ("doorclose");
}
}

door7_rotate()
{
door7 = getent ("door7", "targetname");
trig = getent ("door_trigger7", "targetname"); 

while(1)
{
trig waittill ("trigger");

door7 rotateroll (90,0.5);
door7 waittill ("rotatedone");

trig waittill ("trigger");

door7 rotateroll (-90,0.5);
door7 waittill ("rotatedone");
}

}


door8_rotate()
{
door8 = getent ("door8", "targetname");
trig = getent ("door_trigger8", "targetname"); 

while(1)
{
trig waittill ("trigger");

door8 rotateroll (90,0.5);
door8 waittill ("rotatedone");

trig waittill ("trigger");

door8 rotateroll (-90,0.5);
door8 waittill ("rotatedone");
}

}



level.liftmoving = false;
        level.direction = 553;


        thread lift();
        
        trig = getentarray("verzoektrigger", "targetname");
        for (i=0; i < trig.size; i++)
        {
                trig[i] thread verzoeklift();
        }
}

lift()
{
     lift= getent ("lift", "targetname");
     deurrechts= getent ("dr", "targetname");
     deurlinks= getent ("dl", "targetname");
     trig= getent ("triggerlift", "targetname");
     trig enableLinkTo();
     trig linkTo(lift);

     while(1)
     {
          trig waittill ("trigger");

          if (!level.liftmoving)
          {
               level.liftmoving = true;
               lift playsound("doorclose");
               deurrechts movex(47,2);
               deurlinks movex(-47,2);
               deurlinks waittill ("movedone");
               lift playloopsound("elevator");
               lift movez (level.direction,5);
               deurrechts movez(level.direction,5);
               deurlinks movez(level.direction,5);
               deurlinks waittill ("movedone");
               lift stoploopsound("elevator");
               lift playsound("dooropen");
               deurrechts movex(-47,2);
               deurlinks movex(47,2);
               deurlinks waittill ("movedone");

               level.direction = level.direction * -1;

               level.liftmoving = false;
          }
     }
}

verzoeklift()
{
     lift= getent ("lift", "targetname");
     deurrechts= getent ("dr", "targetname");
     deurlinks= getent ("dl", "targetname");

     while(1)
     {
          self waittill ("trigger");

          if (!level.liftmoving)
          {
               level.liftmoving = true;
               lift playsound("doorclose");
               deurrechts movex(47,2);
               deurlinks movex(-47,2);
               deurlinks waittill ("movedone");
               lift playloopsound("elevator");
               lift movez (level.direction,5);
               deurrechts movez(level.direction,5);
               deurlinks movez(level.direction,5);
               deurlinks waittill ("movedone");
               lift stoploopsound("elevator");
               lift playsound("dooropen");
               deurrechts movex(-47,2);
               deurlinks movex(47,2);
               deurlinks waittill ("movedone");

               level.direction = level.direction * -1;

               level.liftmoving = false;
          }
     }
}
Share |
(VM)Monkey
General Member
Since: Jul 31, 2006
Posts: 113
Last: Mar 24, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Thursday, Sep. 13, 2007 12:13 pm
This part:

Code:

level.liftmoving = false;
        level.direction = 553;


        thread lift();
        
        trig = getentarray("verzoektrigger", "targetname");
        for (i=0; i < trig.size; i++)
        {
                trig[i] thread verzoeklift();
        }
}


needs to be in your main() function. Right now it's just sort of floating out there doing nothing. Put it after the door threads.

Code:

main(){

maps\mp\_load::main();
maps\mp\elevator::main();
maps\mp\kabelbaan::main();
maps\mp\trein::main();
maps\mp\slidingdoors::main();
maps\mp\mp_fearvillage_drown::main();
maps\mp\mp_fearvillage_fx::main();
// set background ambient noise
ambientPlay("ambient_mp_fearvillage");

// setExpFog(0.0001, 0.55, 0.6, 0.55, 0);
setCullFog(0, 10000, 0.55, 0.6, 0.55, 0);

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

// Set some cvars
setcvar("r_glowbloomintensity0","1");
setcvar("r_glowbloomintensity1","1");
setcvar("r_glowskybleedintensity0",".5");



thread door1_move();
thread door2_rotate();
thread door3_rotate();
thread door4_rotate();
thread door5a_rotate();
thread door5b_rotate();
thread door6a_rotate();
thread door6b_rotate();
thread door7_rotate();
thread door8_rotate();

level.liftmoving = false;
level.direction = 553;


thread lift();

trig = getentarray("verzoektrigger", "targetname");
for (i=0; i < trig.size; i++)
{
trig[i] thread verzoeklift();
}
}
[code]
Share |
94sniper
General Member
Since: Jun 15, 2007
Posts: 907
Last: Jun 22, 2009
[view latest posts]
Level 7
Category: CoD2 MP Mapping
Posted: Thursday, Sep. 13, 2007 01:17 pm
sorry, most everything I posted yesterday was untested because CoD wouldn't start. turns out I just needed to do a disk check. I can't test it right now either, cuz I'm at my grandma's house. I won't post anything today until it is tested and fixed, even though I can't get an internet connection at my house.
Share |
ricardos
General Member
Since: Aug 22, 2007
Posts: 191
Last: Dec 24, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Friday, Sep. 14, 2007 05:26 am
oke it works now monkey :)
and sniper that's ok:)
Share |
Restricted Access Topic is Locked
Page
Previous 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

»