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

Members Online

»
0 Active | 11 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 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 subscribe
Author Topic: Couple of questions.
Yafas
General Member
Since: Aug 3, 2010
Posts: 32
Last: Apr 30, 2012
[view latest posts]
Level 2
Category: CoD4 MP Mapping
Posted: Friday, Apr. 22, 2011 01:41 pm
Hi All.

Not really a confusion, more of a curiosity laced with a hint of "how the hell?"

ok, is it at all possible to make doors that open slower? I have opening doors, but they seem to be "open" in a blink of the eye, and I vaguely remember seeing doors on a map that open slowly.

the code I am using is:

main()
{


doortriggers = getentarray("doortrig","targetname");
for(i=0;i doortriggers thread door_think();
}

door_think()
{
self.doormoving = false;
self.doorclosed = true;
self.doormodel = getent(self.target, "targetname");

while (1)
{
self waittill("trigger");
if(!self.doormoving)
self thread door_move();
}
}

door_move()
{
self.doormoving = true;
if(self.doorclosed)
{
self.doormodel rotateyaw(-90,1,0.5,0.5);
self.doormodel waittill("rotatedone");
self.doorclosed = false;
}
else
{
self.doormodel rotateyaw(90,1,0.5,0.5);
self.doormodel waittill("rotatedone");
self.doorclosed = true;
}
self.doormoving = false;
}

-----

Also (and I cant get my head around this: How do you do sliding doors? I have looked over many forums, and have found this:

main()
{
thread slidedoor_slider ();
}

slidedoor_slider()
{
slidedoor = getent( "slidedoor", "targetname" );
trig = getent( "slidetrig", "targetname" );

while(true)
{
trig waittill ("trigger");
//wait 4;
slidedoor movey ( -64, 2, 0.5, 0.5);
slidedoor waittill ("movedone");
wait 4;
//trig waittill ("trigger");
slidedoor movey( 64, 2, 0.5, 0.5);
slidedoor waittill ("movedone");
}
}

Would I be correct in thinking that this would work? if I am wrong can someone point me in the right direction please?

Many thanx

Yafas
Share |
voidsource
General Member
Since: May 5, 2007
Posts: 1513
Last: Sep 1, 2013
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Friday, Apr. 22, 2011 03:39 pm
Quote:

self.doormodel rotateyaw(-90,1,0.5,0.5);


-90 <--- is The y value to move the entity to, as a floating point number


1 <--- The time to move the entity in seconds. This is wat you want to change for slower doors more time added.


0.5<--- The time spent accelerating in seconds


0.5<--- The time spent decelerating in seconds

please use this as a reference guide for future questions u might have, as it comes in very handy:

Call of Duty 4 - Script Index

goodl luck [thumbs_up]
Share |
Yafas
General Member
Since: Aug 3, 2010
Posts: 32
Last: Apr 30, 2012
[view latest posts]
Level 2
Category: CoD4 MP Mapping
Posted: Friday, Apr. 22, 2011 03:42 pm
Excellent reply. Thank you very much.

It's just what i needed to know, and something for future ref.

Much appreciated.
Share |
voidsource
General Member
Since: May 5, 2007
Posts: 1513
Last: Sep 1, 2013
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Friday, Apr. 22, 2011 03:45 pm
your welcome. theres also a version so u can dl that and keep in ur desktop w/o going online. dont remember where i got it but yea theres one out there. If u cant find me let me know ill be more than happy to post as an attachment.
Share |
Yafas
General Member
Since: Aug 3, 2010
Posts: 32
Last: Apr 30, 2012
[view latest posts]
Level 2
Category: CoD4 MP Mapping
Posted: Saturday, Apr. 23, 2011 02:47 am
Brilliant thanx

The offline version would be helpful, and your right (I couldnt find it anywhere)

On the sliding door bit though:

Seriously having a few probs with it.

Been semi playing around with some scripting, but everything I try doesnt want to work. I had a look into the "elevator" door idea, but couldnt figure it at all (could have just been me though)

what i am wondering is: If someone can point me in the right direction for A: naming of .gsc
and B: what the code would look like?

The last effort i tried was _slidingdoor.gsc

No dice ;-(

Thanx in advance.

Yafas

Ps: I would post the script I used but in my frustration it kinda got shredded ;-)
Share |
voidsource
General Member
Since: May 5, 2007
Posts: 1513
Last: Sep 1, 2013
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Saturday, Apr. 23, 2011 03:18 am
if u want i can help you on xfre. My user name is "voidsource". but yea to create your own .gsc isnt hard. just rename a .txt file into .gsc and then make sure its in your zone source file. Whatever functions you put in the gsc you can later use if you include it on the original mp_mapname.gsc. You know at the very top where it says #include blah\blahldfa; yea just put ur newly created script in there. as for the standalone version try this link:

Cod4 Script Reference - Standalone version

dont know if it works or not but i found it through a google search.
dl at your own risk.

edited on Apr. 22, 2011 11:19 pm by voidsource
Share |
Yafas
General Member
Since: Aug 3, 2010
Posts: 32
Last: Apr 30, 2012
[view latest posts]
Level 2
Category: CoD4 MP Mapping
Posted: Saturday, Apr. 23, 2011 03:06 pm
Appreciated.

Will add ya later today (DIY calling unfortunatley)

The link decided to not work, but I am always online so the online version will suffice ;-)

Cheers

Yafas
Share |
Restricted Access Topic is Locked 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

»