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

Members Online

»
0 Active | 246 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
Next Page
subscribe
Author Topic: elevator with doors trigger questions
ricardos
General Member
Since: Aug 22, 2007
Posts: 191
Last: Dec 24, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Tuesday, Sep. 11, 2007 11:31 am
i've made a script for my elevator with doors and i've tried it several times but think that its going to work this time.
i just got 2 questions:
1. how can i make a trigger unusable for some time ( til its up ) and then usable again to go down.
2. I got 1 trigger for the elevator that goes up with the elevator but how can i let the script don't make it go up if it's already up if i press the use button.
( i'm sorry for my english i dont know how to say it :P )
so i mean im down in the elevator i press the use button then im up but i dont want the elevator to go up again i want the trigger to use a different script if its already up ( i got the script already just make the 500 like -500 and -500 to 500:P.
can anyone help me ? thank you[thumbs_up]
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: Tuesday, Sep. 11, 2007 12:00 pm
This is the post I was telling you about on youtube: http://www.modsonline.com/Forums-top-64288.html

As far as your questions:

1) Use the script I gave you with your rotating door question ( http://www.modsonline.com/Forums-top-64600.html ). That way you can know if the elevator is moving, and if it is, just ignore the trigger.

2) it depends on if your elevator just goes between two floors or not. If it just goes between two floors, try something like this:

Code:

elevatorWatch()
{
 direction = 500;

 trigger = getent("trigger", "targetname");
 eleveator = getent("elevator", "targetname");
 while(1)
 {
   trigger waittill("trigger")
   if (!level.elevatormoving)
   {
     level.elevatormoving = true;
     elevator movez(direction, 20);
     elevator waittill("movedone");
     direction = direction * -1; 
     level.elevatormoving = false;
   }
 }
}


It's basic, but you get the idea. The main think is the direction variable. It starts out at 500, which moves you up, then it's multiplied times -1, which makes it -500. The next time it's activated, it moves you down, and then it is multiplied by -1 returning it's value to 500, moving you up.
Share |
ricardos
General Member
Since: Aug 22, 2007
Posts: 191
Last: Dec 24, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Tuesday, Sep. 11, 2007 12:28 pm
ok lets see if i can do this:P i just don't understand english that well but im trying.

Code:
lift(){

lift= ("lift""targetname")
deurrechts= ("dr""targetname")
deurlinks= ("dl""targetname")
trig= ("triggerlift""targetname")

}


lift() {


while (true) {
		lift waittill ("trigger");
lift playsound("idontknowwhatsoundthisisbutidontcarebiatches");
deurrechts movey(-34,2);
deurlinks movey(34,2);
deurlinks waittil ("movedone");
lift playloopsound("elevator");
lift movez(553,5);
deurrechts movez(553,5);
deurlinks movez(553,5);
deurlinks waittil ("movedone");
lift stoploopsound("elevator");
lift playsound("thisisthissoundagainithinkitsaPINGGGorsomethinglikethatbiatches");
deurrechts movey(34,2);
deurlinks movey(-34,2);
deurlinks waittill ("movedone");
trigger::on;


while (true) {
		lift waittill ("trigger");
lift playsound("idontknowwhatsoundthisisbutidontcarebiatches");
deurrechts movey(34,2);
deurlinks movey(-34,2);
deurlinks waittil ("movedone");
lift playloopsound("elevator");
lift movez(-553,5);
deurrechts movez(-553,5);
deurlinks movez(-553,5);
deurlinks waittil ("movedone");
lift stoploopsound("elevator");
lift playsound("thisisthissoundagainithinkitsaPINGGGorsomethinglikethatbiatches");
deurrechts movey(-34,2);
deurlinks movey(34,2);
deurlinks waittill ("movedone");
}
}


lets see..
oh btw i saw this in a script.

triggerE_runter thread maps\mp\_utility::triggerOff();
triggerE_hoch thread maps\mp\_utility::triggerOff();
and later in the script:
triggerE_runter thread maps\mp\_utility::triggerOff();

cant i just use that to put of the triggers where ever i want from before the doors close i put of the trigger because then the trigger is alreasy pressed and then when the lift is above and the doors stand stil after opening i put the trigger on?
if that's possible i understand it better int he script.

ok i think im doing thise totally wrong ( this is the first time i make a script totaly on my own , but its a start )

Code:
lift(){

lift= ("lift""targetname")
deurrechts= ("dr""targetname")
deurlinks= ("dl""targetname")
trig= ("triggerlift""targetname")

}


lift() {


while (true) {
		lift waittill ("trigger");
[b]if (!level.liftmoving)
{
 level.liftmoving = true;[/b]

lift playsound("idontknowwhatsoundthisisbutidontcarebiatches");
deurrechts movey(-34,2);
deurlinks movey(34,2);
deurlinks waittil ("movedone");
lift playloopsound("elevator");
lift movez(553,5);
deurrechts movez(553,5);
deurlinks movez(553,5);
deurlinks waittil ("movedone");
lift stoploopsound("elevator");
lift playsound("thisisthissoundagainithinkitsaPINGGGorsomethinglikethatbiatches");
deurrechts movey(34,2);
deurlinks movey(-34,2);
deurlinks waittill ("movedone");

[b] level.liftmoving = false;
}[/b]



while (true) {
		lift waittill ("trigger");
[b]if (!level.liftmoving)
{
 level.liftmoving = false;[/b]

lift playsound("idontknowwhatsoundthisisbutidontcarebiatches");
deurrechts movey(34,2);
deurlinks movey(-34,2);
deurlinks waittil ("movedone");
lift playloopsound("elevator");
lift movez(-553,5);
deurrechts movez(-553,5);
deurlinks movez(-553,5);
deurlinks waittil ("movedone");
lift stoploopsound("elevator");
lift playsound("thisisthissoundagainithinkitsaPINGGGorsomethinglikethatbiatches");
deurrechts movey(-34,2);
deurlinks movey(34,2);
deurlinks waittill ("movedone");

[b] level.liftmoving = true;
}[/b]

}


i made the things i added bold so it's easier to see what i did.
this is totaly wrong isnt it?
problem 2 comes later first this one:P
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: Tuesday, Sep. 11, 2007 12:43 pm
The problem that will come up is that only one door will move since they're on separate scripts. Also, it looks like you have three lift() functions. The computer is going to get confused. Just combine them all into one.

Code:


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

     direction = 553;

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

          if (!level.liftmoving)
          {
               level.liftmoving = true;
               lift playsound("idontknowwhatsoundthisisbutidontcarebiscuit eateres");
               deurrechts movey(-34,2);
               deurlinks movey(34,2);
               deurlinks waittil ("movedone");
               lift playloopsound("elevator");
               lift movez(direction,5);
               deurrechts movez(direction,5);
               deurlinks movez(direction,5);
               deurlinks waittil ("movedone");
               lift stoploopsound("elevator");
               lift playsound("thisisthissoundagainithinkitsaPINGGGorsomethinglikethatbiscuit eateres");
               deurrechts movey(34,2);
               deurlinks movey(-34,2);
               deurlinks waittill ("movedone");

               direction = direction * -1;

               level.liftmoving = false;
          }
     }
}
Share |
ricardos
General Member
Since: Aug 22, 2007
Posts: 191
Last: Dec 24, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Tuesday, Sep. 11, 2007 12:49 pm
thank you[jumping]
finaly i can make it :D hope it works.
oooohhh i puttet a word in the script:P but it gets automaticaly replaced by biscuit eaters whaha.. i think you know what word it was:P
how did you know deurrechts was doorright:P and the other one left:P
oke now im going to make it in radiant.

edited on Sep. 11, 2007 03:50 pm by ricardos
Share |
ricardos
General Member
Since: Aug 22, 2007
Posts: 191
Last: Dec 24, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Tuesday, Sep. 11, 2007 01:20 pm
hey i've got 4 doors.
2 up and 2 down.. so that script isnt complete? or is it?
and if i made veerything i get an error:

******* script compile error *******
expression list must have 1 or 3 parameters: (file 'maps/mp/liftmetdeuren.gsc', line 3)
lift= ("lift", "targetname");
*
i dont really get that. any ideas?
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: Tuesday, Sep. 11, 2007 01:23 pm
Doh! Sorry, I was rushing to get ready for work and missed that.

Code:

     lift= ("lift", "targetname");
     deurrechts= ("dr", "targetname");
     deurlinks= ("dl", "targetname");
     trig= ("triggerlift", "targetname");



should be

Code:

     lift= getent("lift", "targetname");
     deurrechts= getent("dr", "targetname");
     deurlinks= getent("dl", "targetname");
     trig= getent("triggerlift", "targetname");
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD2 MP Mapping
Posted: Tuesday, Sep. 11, 2007 01:24 pm
the correct way to define stuff is like this:

lift = getent ("lift", "targetname");

do the same for your doors and trigger.
Share |
ricardos
General Member
Since: Aug 22, 2007
Posts: 191
Last: Dec 24, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Tuesday, Sep. 11, 2007 01:26 pm
hihi monkey was faster:P
thanks anyway :D i could have known that but i didn't see it[crazy]
but does this work with 4 doors?
i named the leftdoor up and the leftdoor down both targetname:DL
oops and now i know i forgot the origin of the doors [duh]
Share |
94sniper
General Member
Since: Jun 15, 2007
Posts: 907
Last: Jun 22, 2009
[view latest posts]
Level 7
Category: CoD2 MP Mapping
Posted: Tuesday, Sep. 11, 2007 01:27 pm
looks like caretaker beat me to it[cry]. ohwell.

he's right, forgetting this line happened to me alot.


[read]double-check your script before you run it. [read]
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

»