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

Members Online

»
0 Active | 63 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
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: Doors opening
jonezy93
General Member
Since: Feb 6, 2005
Posts: 138
Last: Jul 12, 2008
[view latest posts]
Level 4
Category: CoDUO Mapping
Posted: Monday, Jun. 26, 2006 12:40 pm
Hi all, I'm making doors in my map. But special doors. When you get in an special area around the door the door goes open and then you can go trough. When you are out the area then door closes again. how the hell do I do this
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoDUO Mapping
Posted: Tuesday, Jun. 27, 2006 12:39 am
Trigger multi in the area you require to pick up the players, trigger activates the door, the trigger gets whoever activated it, opens the door and then waits at a while statement while the players is still in the trigger.
For eg: A rough layout of the script would be like this.

ent = getent("door","targetname");
ent_trig = getent("door_trig","targetname");

ent_trig waittill("trigger",other);
ent moveto or moveZ or rotateyaw
ent waittill("movedone"); or rotatedone

while(other isTouching(ent_trig))
wait(1);

//player must have left the trigger, close the door
ent moveto or moveZ or rotateyaw

Grassy
Share |
jonezy93
General Member
Since: Feb 6, 2005
Posts: 138
Last: Jul 12, 2008
[view latest posts]
Level 4
Category: CoDUO Mapping
Posted: Tuesday, Jun. 27, 2006 12:24 pm
My script:

main()

{

maps\_load::main();

ent = getent("door","targetname");
ent_trig = getent("door_trig","targetname");

ent_trig waittill("trigger",other);
ent moveto (64, 136, 256),
ent waittill("movedone"); or rotatedone

while(other isTouching(ent_trig))
wait(1);

//player must have left the trigger, close the door
ent moveto (64, 136, 64),


}


Its not working, the thing that has to move isnt moving (and yes the door's a brushmodel)
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoDUO Mapping
Posted: Tuesday, Jun. 27, 2006 11:42 pm
jonezy93 writes...
Quote:
My script:

main()

{

maps\_load::main();

ent = getent("door","targetname");
ent_trig = getent("door_trig","targetname");

ent_trig waittill("trigger",other);
ent moveto (64, 136, 256),
ent waittill("movedone"); or rotatedone

while(other isTouching(ent_trig))
wait(1);

//player must have left the trigger, close the door
ent moveto (64, 136, 64),


}


Its not working, the thing that has to move isnt moving (and yes the door's a brushmodel)


The moveto syntax is not right and text that is not code needs to be remed with //
Also make sure part of the brushmodel includes a brush with the origin texture, this brush MUST be part of the script_brushmodel makeup.
Also things like this should be in a separate thread outside of the main thread.

main()
{

maps\_load::main();

thread auto_door();

}


auto_door() {

ent = getent("door","targetname");
ent_trig = getent("door_trig","targetname");

//to make it easier define ent's origin here
//this will always send ent back to the startng position
org = ent.origin;

ent_trig waittill("trigger",other);

//move the door to a specific position
//moveto ((x,y,z), total time, speedup time, slowdown time);
ent moveto ((64, 136, 256),2,.5,.5);
ent waittill("movedone");

while(other isTouching(ent_trig))
wait(1);

//player must have left the trigger, close the door
ent moveto (org, 2, .5, .5);

}

Grassy


edited on Jun. 27, 2006 07:48 pm by WHC_Grassy

edited on Jun. 27, 2006 07:51 pm by WHC_Grassy
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

»