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

Members Online

»
0 Active | 7 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: CoD Mapping
CoD mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Auto Open Sliding Door
azzar92
General Member
Since: Feb 18, 2006
Posts: 29
Last: Oct 6, 2006
[view latest posts]
Level 2
Category: CoD Mapping
Posted: Tuesday, Feb. 28, 2006 09:49 am
I want to make a sliding door that opens when the player gets within a certain distance from the door. I know how to make a sliding door that is activated with the Use key but i have tried and failed with this. [mad]

Do i need a trigger to open the door?
Share |
Yorkshire-Rifles
General Member
Since: Mar 16, 2005
Posts: 272
Last: Apr 19, 2008
[view latest posts]
Level 5
Category: CoD Mapping
Posted: Tuesday, Feb. 28, 2006 02:57 pm
If you want to use the Use Key, you need to make a trigger_use.

If you want the door to open at a distance when a player is moving towards the door put in a trigger_multiple for the player to run through.

As for the door itself, if you haven't made it as a script_brushmodel, you'll want to.

Whatever you decide, you might want to use a script something like this, calling the door targetname door and the trigger targetname trig.

Code:
mydoor = getent("door", "targetname");
mytrigger = getent("trig", "targetname");
mytrigger waittill("trigger");
mydoor movex (64, 1);
//movex is along the x axis, moves 64 units/inches, in 1 second
Share |
azzar92
General Member
Since: Feb 18, 2006
Posts: 29
Last: Oct 6, 2006
[view latest posts]
Level 2
Category: CoD Mapping
Posted: Tuesday, Feb. 28, 2006 10:24 pm
i tried the script and it didnt work. am i doing this right?
this is the script for it and i'm doing the auto opening door.

Code:
main()
{
thread door_slider ();
}

door_slider ()
{
mydoor = getent ("door", "targetname");
mytrigger = getent ("trig", "targetname");
while (1)
{
mytrigger waittill ("trigger");
door movey (63, 1);
door waittill ("movedone");
wait (3);
door movey (-63, 1);
door waittill ("movedone");
}
}
Share |
Yorkshire-Rifles
General Member
Since: Mar 16, 2005
Posts: 272
Last: Apr 19, 2008
[view latest posts]
Level 5
Category: CoD Mapping
Posted: Wednesday, Mar. 1, 2006 01:43 am
main()
{
thread door_slider ();
}

door_slider ()
{
mydoor = getent ("door", "targetname");
mytrigger = getent ("trig", "targetname");
mytrigger waittill ("trigger");

door movey (63, 1);
// Instead of movedone you can just use the 1 second wait below cos that's the door move time
//wait(1);
door waittill ("movedone");


wait (3);

door movey (-63, 1);
// Instead of movedone you can just use the 1 second wait below cos that's the door move time
//wait(1);
door waittill ("movedone");
}



edited on Feb. 28, 2006 08:44 pm by Yorkshire-Rifles
Share |
azzar92
General Member
Since: Feb 18, 2006
Posts: 29
Last: Oct 6, 2006
[view latest posts]
Level 2
Category: CoD Mapping
Posted: Wednesday, Mar. 1, 2006 02:38 am
using this script has now made the door work. but as soon as the level starts even before you picked your team and gun, the door opens for 3 sec then closes and stays shut.

any ideas[confused]
Share |
Horseman
General Member
Since: May 12, 2005
Posts: 99
Last: Apr 20, 2011
[view latest posts]
Level 3
Category: CoD Mapping
Posted: Wednesday, Mar. 1, 2006 03:13 am
Sounds like the trigger isnt setup correctly ---
the door functions once (but not as you desiire) then wont function after tht, right?

Sounds like the trigger to me.
Share |
azzar92
General Member
Since: Feb 18, 2006
Posts: 29
Last: Oct 6, 2006
[view latest posts]
Level 2
Category: CoD Mapping
Posted: Wednesday, Mar. 1, 2006 03:20 am
the trigger is a trigger_multiple and the target name is trig.
thats all the settings it has.

as soon as the map loads, the door opens, stays there for 3 sec then shuts and stays shut
Share |
Horseman
General Member
Since: May 12, 2005
Posts: 99
Last: Apr 20, 2011
[view latest posts]
Level 3
Category: CoD Mapping
Posted: Wednesday, Mar. 1, 2006 03:30 am
Now.. im no expert..dont claim to be...
So im taking liberties here by posting and trying to help out.

Read over the script again...
Make sure its correct...
Is it possible that the door is functioning backwards?
is it that the door waittill ("movedone"); isnt being met ?
Im just tossing out ideas here.


edited on Feb. 28, 2006 10:31 pm by Horseman
Share |
azzar92
General Member
Since: Feb 18, 2006
Posts: 29
Last: Oct 6, 2006
[view latest posts]
Level 2
Category: CoD Mapping
Posted: Wednesday, Mar. 1, 2006 03:37 am
i went over the script. I changed the move coordinates so that its reversed and changed the door waittill ("movedone"); so that it says wait (1); because thats how long it takes to open / shut.
Tried them together and seperate, and everytime the door still opens at the start of the map then shuts and wont open
Share |
Horseman
General Member
Since: May 12, 2005
Posts: 99
Last: Apr 20, 2011
[view latest posts]
Level 3
Category: CoD Mapping
Posted: Wednesday, Mar. 1, 2006 03:50 am
The door :
classname / script_brushmodel
targetname / door
The trigger :
classname / trigger_multiple
targetname / trig

correct? Yes, im sure the door is correct or it wouldnt move at all.

Im at a loss...you're above me at this point. Without haveing it right infront of me, i cant tell.

BUT.. are you using both the WAIT line AND the MOVEDONE line

According to the script..it should open...wait 3 seconds ...then close..
and its called mydoor or door?


edited on Feb. 28, 2006 10:57 pm by Horseman
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty : CoD 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

»