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

Members Online

»
0 Active | 68 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 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Door Scripting
Harpattack
General Member
Since: Aug 14, 2007
Posts: 32
Last: Mar 24, 2012
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Friday, Feb. 1, 2008 07:10 am
I cant get any door to open I am laying the door textures out correctly, The origin and the trigger....But still no open....could someone please look at my gsc and tell what the heck is going on....9 hrs I spent on one door....ARGH...


main()
{
// maps\mp\misslecommand_fx::main();
maps\mp\misslecommand::main();
maps\mp\_load::main();

// setExpFog(0.0001, 0.55, 0.6, 0.55, 0);
// setCullFog(0, 16500, 0.55, 0.6, 0.55, 0);
ambientPlay("ambient_mp_misslecommand");

game["allies"] = "american";
game["axis"] = "german";
game["attackers"] = "allies";
game["defenders"] = "axis";
game["american_soldiertype"] = "normandy";
game["german_soldiertype"] = "normandy";

// Set some cvars
setcvar("r_glowbloomintensity0","1");
setcvar("r_glowbloomintensity1","1");
setcvar("r_glowskybleedintensity0",".5");
}
{
main() {
maps\mp\_load::main();

thread door1_rotate();
}


door1_rotate()
{
door1 = getent("door1", "targetname");
trig = getent("door1", "targetname");
while (1)
{
trig waittill("trigger");
door1 rotateYaw(90, 1.5, 0.7, 0.7);
//door1 playsound ("dooropen");

door1 waittill("rotatedone");
wait (3);
door1 rotateYaw(-90, 1.5, 0.7, 0.7);
//door1 playsound ("doorclose");
door1
waittill("rotatedone");
}
}

Share |
Bloodlust
General Member
Since: Apr 7, 2004
Posts: 101
Last: Jan 14, 2015
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Friday, Feb. 1, 2008 07:18 am
I would be willing to bet that you are getting an error saying that getEnt was used on more than one entity...

your door and your trigger both have the same exact name.
you cant do that unless you are going to use them in an array.

try naming your door1 trigger targetname to:
door1_trigger

the rest of the script should be ok.
Share |
Harpattack
General Member
Since: Aug 14, 2007
Posts: 32
Last: Mar 24, 2012
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Friday, Feb. 1, 2008 07:22 am
Actuly that was a typing error on my part here it does say that in the .gsc
Share |
Bloodlust
General Member
Since: Apr 7, 2004
Posts: 101
Last: Jan 14, 2015
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, Feb. 2, 2008 01:24 am
is the trigger a trigger_use?
Share |
Harpattack
General Member
Since: Aug 14, 2007
Posts: 32
Last: Mar 24, 2012
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Saturday, Feb. 2, 2008 01:41 am
use_touch
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

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

»