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

Members Online

»
1 Active | 98 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 4
Category: CoD4 MP Mapping
CoD 4 mapping and level design for multiplayer.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: door is brush and does not move
CHS
General Member
Since: May 28, 2010
Posts: 106
Last: Mar 21, 2012
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Thursday, Jan. 6, 2011 11:54 pm
Hi again,

just making another map and since it is a fallout vault i`d like to have moving doors. Looked at tutorials here (and others around the web), but somehow i fail to make it move? All tutorials are telling about rotating here and there, and if tutorials about slide, then with ready made prefabs, not with a brush. I`d like to slide the brush up and down.

What i`ve done is:

- made a brush, textured it, gave it targetname door_slide, 2D>dyn>brushmodel
- made a trigger_use around it and named it door_trig
- selected both and pressed W to connect

then i have this as moving script:
Code:

main() 
{ 
	thread slidedoor_slider (); 
} 


 
slidedoor_slider() 
{ 
	slidedoor = getent( "door_slide", "targetname" ); 
	trig      = getent( "door_trig", "targetname" ); 
 
	while(true) 
	{ 
		trig waittill ("trigger"); 
		//wait 4; 
		slidedoor movey ( 512.0,-4.0,80.0); 
		slidedoor waittill ("movedone"); 
		wait 4; 
		//trig waittill ("trigger"); 
		slidedoor movey( 512.0,-4.0,64.0); 
		slidedoor waittill ("movedone"); 
	} 
}

The file is in the zone_file and called in the mp_mapname.gsc

The best i could get after several hours of try and error was, that the door remained completely transparent. I mean, it`s there, but i can walk throu it, but i guess that is connected with the error that no physic preset is specified for the dynmodel.

Thanks for any help or ideas :)
Share |
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 1293
Last: Jul 9, 2016
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Friday, Jan. 7, 2011 01:21 am
The door needs to be a 2D>script>brushmodel. The door needs to be a script brushmodel, NOT a dynamic brushmodel.

When you connect the trigger and door, you need to make sure you select the trigger first, then a piece of the door, then press W to connect them.
Share |
SQUISHY44
General Member
Since: Apr 16, 2007
Posts: 213
Last: Jul 20, 2011
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Friday, Jan. 7, 2011 04:38 am
main()
{
thread slidedoor_slider ();
}



slidedoor_slider()
{

slidedoor = getent( "door_slide", "targetname" );
trig = getent( "door_trig", "targetname" );

while(1)
{
trig waittill ("trigger");
//wait 4;
slidedoor movey ( 512.0,-4.0,80.0);
slidedoor waittill ("movedone");
wait 4;
//trig waittill ("trigger");
slidedoor movey( 512.0,-4.0,64.0);
slidedoor waittill ("movedone");
}
}
Share |
CHS
General Member
Since: May 28, 2010
Posts: 106
Last: Mar 21, 2012
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Friday, Jan. 7, 2011 06:27 pm
aw... dumb dumb dumb :D 2D>script>brushmodel of course, thanks, can`t wait to try it

And yes, i have first the trigger, then the door, not sure why i did it that way, but i did. I just felt somehow it would be wrong the other way.

Thanks again to both
Share |
CHS
General Member
Since: May 28, 2010
Posts: 106
Last: Mar 21, 2012
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Friday, Jan. 7, 2011 11:09 pm
Um... is there something i could be missing? I mean, the door moves, but like 1mm per second and it never stops moving :D

... and it moves away from me, not up, but i guess i just change the movey to movez, right? The coords can stay the same, or do they change, when i change the movey to movez? I tried a bit to play around, but got not very smart out of it yet (my first moving door).

Thanks again for any ideas

edited on Jan. 7, 2011 06:22 pm by CHS
BTW, does it matter, that the door has to go throu some other brushes or should that not be an issue? I mean, if the door has to have free movement space?
Share |
SQUISHY44
General Member
Since: Apr 16, 2007
Posts: 213
Last: Jul 20, 2011
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Friday, Jan. 7, 2011 11:13 pm
slidedoor movez ( distance,time,acceleration, deceleration);
distance = + or -
time = +
acceleration + deceleration <= time
edited on Jan. 7, 2011 06:16 pm by SQUISHY44
Share |
TexasRebel
General Member
Since: May 1, 2006
Posts: 373
Last: Aug 20, 2013
[view latest posts]
Level 5
Category: CoD4 MP Mapping
Posted: Friday, Jan. 7, 2011 11:20 pm
movez (distance to travel, travel time , acceleration time, deceleration time);

mainly mess with your second input variable to decrease amount of time it takes to move.

keep the number above 0, but close to 0 makes it faster while further away makes it slower.

also the acceleration and deceleration time can not be greater than total time spent traveling.
Share |
CHS
General Member
Since: May 28, 2010
Posts: 106
Last: Mar 21, 2012
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Saturday, Jan. 8, 2011 03:26 am
Tried, fooled around with it for a bit to get a feeling how it`s done and i must say - briliant :) worked just as wanted, thanks again

I can`t believe, that i made all my maps until now without triggers :)
Share |
CHS
General Member
Since: May 28, 2010
Posts: 106
Last: Mar 21, 2012
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Saturday, Jan. 8, 2011 06:09 pm
One last add (if someone else may read it later for study like i did)

DO NOT allow other brushes to block the door from movement. It won`t go :) i just spent 4 hours of compiling, debugging iprintln lines and whatnot just to find that one out.

Maybe there is a workaround like making it not solid, but that would obviously loose the point of having a door there, wouldn`t it :D

edited on Jan. 8, 2011 06:05 pm by CHS

Umm... not so sure anymore, because it could be connected with the wrong used trigger brush. Tried another door and it went throu the wall like a knife throu butter
Share |
COLMAC
General Member
Since: Sep 15, 2006
Posts: 914
Last: Jan 27, 2012
[view latest posts]
Level 7
Category: CoD4 MP Mapping
Posted: Saturday, Jan. 8, 2011 07:02 pm
here 1 that i used in cod mw for double sliding doors


main()
{
thread door_start();
}

door_start()
{
doortrigger = getentarray("doortrig","targetname");
for(i=0;i doortrigger thread door_think();
}

door_think()
{
stuff = getentarray(self.target,"targetname");
for(i=0;i {
if(!isDefined(stuff.script_noteworthy))
continue;

if(stuff.script_noteworthy == "g_left_door")
self.left_door = stuff;
else if(stuff.script_noteworthy == "g_right_door")
self.right_door = stuff;
}
self.doorMoving = false;
while (1)
{
self waittill("trigger");
if(!self.doorMoving)
self thread door_move();
}
}

door_move()
{
self.doorMoving = true;
self.right_door movey(31,2,0.5,0.5);
self.left_door moveY(-31,2,0.5,0.5);
wait 3.5;
self.right_door movey(-31,2,0.5,0.5);
self.left_door moveY(31,2,0.5,0.5);
wait 3.5;
self.doorMoving = false;
}


remember that your brush is .script_noteworthy, named (g_left_door)&(g_right_door) you can use your own name
these are like star trek doors[smokin]
hope this helps

also if you want malty door though out your map
you will need more scripts like thread door_1(); , thread door_2(); thread door_3(); and each door needs it own brush name


main()
{
thread door_1();
}

door_1()
{
doortrigger = getentarray("doortrig_1","targetname");
for(i=0;i doortrigger thread door_1_think();
}

door_1_think()
{
stuff = getentarray(self.target,"targetname");
for(i=0;i {
if(!isDefined(stuff.script_noteworthy))
continue;

if(stuff.script_noteworthy == "glass_left_door")
self.left_door = stuff;
else if(stuff.script_noteworthy == "glass_right_door")
self.right_door = stuff;
}
self.doorMoving = false;
while (1)
{
self waittill("trigger");
if(!self.doorMoving)
self thread door_1_move();
}
}

door_1_move()
{
self.doorMoving = true;
self.right_door movex(31,2,0.5,0.5);
self.left_door moveX(-31,2,0.5,0.5);
wait 2.5;
self.right_door movex(-31,2,0.5,0.5);
self.left_door moveX(31,2,0.5,0.5);
wait 2.5;
self.doorMoving = false;
}


[smokin]
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 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

»