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

Members Online

»
0 Active | 15 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 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
Page
Previous Page Next Page
subscribe
Author Topic: coded keypad door
_INSANE_
General Member
Since: Nov 7, 2008
Posts: 352
Last: Jul 10, 2011
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Friday, Jan. 16, 2009 06:36 pm
Well we almost had it. You said the first keypad worked. And when you added the second keypad, neither of them worked. Correct?

Sounds to me like the scripts are conflicting with eachother.
So i renamed every word in the second keypad inside the threads just to be 100 percent sure this wouldn't pose a problem.

I guess try these two files.
Here

If that doesnt work... uh... I haven't done alot of mapping.. So just make sure your triggers in your map are the right name, and at the right location.. etc. If that sounds silly, its cuz i dont know what i'm talking about[lol]

If they don't work. Try the first one alone.. If that works, try the second one alone. If it doesn't work on the second one.. Then thats where our problem lies, and we need to work on that.

Other than that, good luck. I hope it works[thumbs_up]
Share |
Pedro699
General Member
Since: Jun 19, 2006
Posts: 781
Last: Dec 18, 2010
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Friday, Jan. 16, 2009 07:30 pm
The scripts posted in my last post are completely separate - they will only conflict if you try and merge them into one file.

Looking at your map:

- You need a skybox as currently the map leaks - check the compiler for details
- a DM spawn would help testing and is always good to include incase all else fails.
- Less lights in the bit room with the ramps and circle thing - just increase the radius.

------------------

Ok I did get it working.

Not quite sure what the exact cause was. The three keys 3, 6 and 9 were not working on the first keypad.

I:

1. Recreated these triggers from scratch
2. Moved the trigger multiple inwards slightly - not sure if this was a problem
3. Created a caulk skybox

One or more of these may have fixed the second keypad, but that worked straight away for me. For some quirky reason I suspect it was the lack of skybox. Scripts are both fine. If you want to check that a button is being triggered add a debug line to the script
Code:
while(1)
   {
      if(isDefined(level.buttonPressed))
      {
         iprintln("found a button " + level.buttonPressed); // Add this line
         if(level.buttonPressed == nextButton)
         {
            entryPosition++;


For the keypad2.gsc change the level.buttonPressed to level.buttonPressed2 on the iprintln line.

--------------

As a sidenote your arena file has a double extension - it should be 'mp_treehouse3.arena' not 'mp_treehouse3.arena.arena'

edited on Jan. 16, 2009 02:33 pm by Pedro699
Share |
_INSANE_
General Member
Since: Nov 7, 2008
Posts: 352
Last: Jul 10, 2011
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Friday, Jan. 16, 2009 07:46 pm
Lol. Yeah, pretty much like Pedro said.[biggrin]
Share |
NotDeadYet
General Member
Since: Jan 5, 2009
Posts: 52
Last: Jul 28, 2009
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Friday, Jan. 16, 2009 08:06 pm
how do i fix the triggers then?
Share |
Pedro699
General Member
Since: Jun 19, 2006
Posts: 781
Last: Dec 18, 2010
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Friday, Jan. 16, 2009 08:43 pm
Well first try creating a skybox - caulk will do. If that doesn't help rebuild the triggers.

If you are really struggling, remove your keypads (save them as a prefab) and insert the keypad from my download as they definitely work.
Share |
NotDeadYet
General Member
Since: Jan 5, 2009
Posts: 52
Last: Jul 28, 2009
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Friday, Jan. 16, 2009 08:55 pm
sry for double post :| but this might actually be good.

i fixed the leak thing like you said, but now i get an fx error which i will rewrite. i think this is good though, cause the leak file might have been messing up my scripts so if u can help me fix this, everything else might work.

Error:

********* SCRIPT RUNTIME ERROR***********
type undefined is not an int: (file '/maps/mp/_fx.gsc', line 189)

looper = playLoopedFX (level._effect[FXiD], ent.delay, ent.org, dist);

started from:
(file 'maps/mp/_fx.gsc', line 152)
wait .05 //wait frame
*
******************************************

Share |
Pedro699
General Member
Since: Jun 19, 2006
Posts: 781
Last: Dec 18, 2010
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Friday, Jan. 16, 2009 09:49 pm
Looking now at your mp_treehouse3_fx.gsc file you are trying to run a non-existent effect.

Code:
precacheFX()
{
	level._effect["mp_treehouse_bubbles"] = loadfx ("fx/mp_treehouse_bubbles.efx");
	level._effect["mp_treehouse_mist"] = loadfx ("fx/misc/fogbank_small_duhoc.efx");
}

ambientFX()
{
		maps\mp\_fx::loopfx("watertutorialbubbles", (408, -328, -160), 0.9);
		maps\mp\_fx::loopfx("watertutorialbubbles", (448, -64, -168), 0.9);
		maps\mp\_fx::loopfx("watertutorialmist", (432, -224, -190), 0.7);
}


You load the bubbles effect with the fxid 'mp_treehouse_bubbles' but you are trying to play an effect called 'watertutorialbubbles'. The same problem is happening with the mist.

Give this a go - try and see how the fx file works.
Code:
precacheFX()
{
	level._effect["mp_treehouse_bubbles"] = loadfx ("fx/mp_treehouse_bubbles.efx");
	level._effect["mp_treehouse_mist"] = loadfx ("fx/misc/fogbank_small_duhoc.efx");
}

ambientFX()
{
		maps\mp\_fx::loopfx("mp_treehouse_bubbles", (408, -328, -160), 0.9);
		maps\mp\_fx::loopfx("mp_treehouse_bubbles", (448, -64, -168), 0.9);
		maps\mp\_fx::loopfx("mp_treehouse_mist", (432, -224, -190), 0.7);
}


I'm not sure why the stock fx creation file is generating an error as it should be checking all the function arguments. If that doesn't work then we'll look again ;-)

I'm surprised that the error is saying that a variable is undefined and should be an int as fxid should be a string :-S
Share |
NotDeadYet
General Member
Since: Jan 5, 2009
Posts: 52
Last: Jul 28, 2009
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Monday, Jan. 19, 2009 06:44 pm
that fixed the fx error thanks, and now the second elevator keypad one is working. but i cant get the first one to work, i have remade the triggers multiple times, but still nothing works. i looked at your mp_keypad2, but couldnt find a keypad or anything so i will keep trying to recreat the triggers using different methods. any more suggestions?
Share |
_INSANE_
General Member
Since: Nov 7, 2008
Posts: 352
Last: Jul 10, 2011
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Monday, Jan. 19, 2009 06:52 pm
Quote:
2. Moved the trigger multiple inwards slightly - not sure if this was a problem


Did you try this, Notdeadyet ?
Share |
NotDeadYet
General Member
Since: Jan 5, 2009
Posts: 52
Last: Jul 28, 2009
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Monday, Jan. 19, 2009 07:24 pm
what trigger multiple??? i am using all damage triggers. :|

edited on Jan. 19, 2009 02:25 pm by NotDeadYet
Share |
Restricted Access Topic is Locked
Page
Previous Page Next Page
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

»