damn fucking trigger error

Have questions about CoD2 mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

damn fucking trigger error

Post by waywaaaard » March 22nd, 2007, 4:25 pm

hi i made the move things tutorial for cod by nightmare (in cod2)

when i am doing the platform thinga without an trigger it works fine but when i make a trigger:
brush give it trigger-texture and then rightclick trigger-> use/multiple

the key targetname
and valuve trig_platform

here is my error:

Error during initialization:
script compile error
(see console for details)

so now i dont get anymore wow how useful

scripts:

named platform1.gsc

Code: Select all

main()
{
thread platform1();
}

platform1()
{
platform = getent ("platform1","targetname");
tigger1 = getent ("trig_platform","targetname");
while(1)
{
trigger1 waittill ("trigger");
wait(5);
platform moveY (208,2,0.5,0.5);
wait(5);
platform moveY (-208,2,0.5,0.5);
platform waittill ("movedone"); 
}
}
mp_lev_facilities.gsc

Code: Select all

main() {
		maps\mp\_load::main();
		maps\mp\platform1::main();
		}
so what did i do wrong i dunno that is just frustrating because without the trigger it works fine
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » March 22nd, 2007, 6:28 pm

Code: Select all

tigger1 = getent ("trig_platform","targetname");
spelling error.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Post by waywaaaard » March 22nd, 2007, 7:19 pm

i hate it
omg arg grr mpffhfhdasfkhölskdaf

thanks
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Post by waywaaaard » March 22nd, 2007, 8:14 pm

can anyone make a clear sound on demand tutorial i just dont get it

atm i try this:

a trigger use targetname sound1_trig

a brush -> brushmodel targetname sound1quelle

made csv:

Code: Select all

intro_sound1,,misc/radio1.mp3,1,,,,,150,300,auto,,,nonlooping,,,,,,,,,,

Code: Select all

main() {
		maps\mp\_load::main();
		maps\mp\platform1::main();
		maps\mp\sound1::main();
		ambientPlay("ambient_mp_intro");
		
		thread sound1()
		
		}
		
sound1()
{
sound1_trig = getent ("intro_sound1_trig","targetname");
while(1)
{
sound1_trig waittill ("trigger");
alert = getent ("sound1quelle","targetname");
alert playsound("intro_sound1");
}
}
error:

Code: Select all

******* script compile error *******
bad syntax: (file 'maps/mp/mp_lev_facilities.gsc', line 9)
  }
  *
************************************
writing to: F:\Call of Duty 2\servercache.dat
Error during initialization:
script compile error
(see console for details)
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » March 22nd, 2007, 8:23 pm

you forgot to declare what "alert" was.

Code: Select all

speaker = getent ("sound1quelle","targetname");
few things:
its a script/model not brushmodel
also be sure to make your triggered sounds .wav and ambient .mp3, I don't kno why but it has to be :)
and also, be sure you have your csv looking in the correct path. :D
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Post by waywaaaard » March 22nd, 2007, 9:59 pm

oh i see i declared it in the while loop but i ve got an other question
how does this trigger_radius work i want a trigger which gets activated if someone is in an special area
so just make a new script->model and dont choose a model at the openfiledialog?

and an other problem:

Code: Select all

main()
{
thread trainview();
}

trainview()
{
gate = getent ("trainview1","targetname");
viewtrigger = getent ("trainview1_trig","targetname");
while(1)
{
viewtrigger waittill ("trigger");
wait(1);
gate moveX (1,2,0.5,0.5);
gate moveZ (60,2,0.5,0.5);
wait(15);
gate moveY (-60,2,0.5,0.5);
gate moveX (-1,2,0.5,0.5);
gate waittill ("movedone"); 
}
}
it is a part of a wall brush which should move 1 unit back then up wait down 1 unit to the front

but it show moves 1 back and up and dont gets back o.O?
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

All-Killer
CJ Worshipper
CJ Worshipper
Posts: 383
Joined: December 16th, 2005, 6:38 pm

Post by All-Killer » March 23rd, 2007, 10:03 am

You can use a trigger multiple and place it where you want it. So when someone is in that area with the trigger it gets activated :wink:

And for the problem:

In the first move you use X and Z and in the second one Y and X. So if i understand the prolem (maby type it more detailed next time :wink: ) you need to change the Y to a Z and its done.
Image

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Post by waywaaaard » March 23rd, 2007, 1:55 pm

not that was just test -> didnt changed it back i tried if it works in the y - direction but didnt went back too

can pls someone make a nice tutorial with pictures like the movetut from nightmare for the sound that would be fine i tried to get it to work with the solution of nightmare but i couldnt get it to work
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

All-Killer
CJ Worshipper
CJ Worshipper
Posts: 383
Joined: December 16th, 2005, 6:38 pm

Post by All-Killer » March 23rd, 2007, 6:49 pm

1. Make a script origin. To do this right click on 2d grid script> origin. Sound wil be played from the origin
2. Give it a targetname of sound_lev
3. Make a trigger multiple and give it a targetname of sound_lev_trig
4. Use this code:

Code: Select all

sound_lev()
{
sound_lev = getent ("sound_lev","targetname");
sound_lev_trig  = getent ("sound_lev_trig","targetname");
while (1)
{
sound_lev_trig waittill ("trigger");
sound_lev playsound("soundname"); ///change soundname to the name of youre sound file
wait 16; ///// change this to a value how long it takes to complete the whole music file
}
}
5. Make a csv file with this in it.

Code: Select all

"# If the text in the first column of a row starts with a # character, the row is ignored",,"If the first column for a row is blank, then the row is ignored"
,"If the first column for a row is blank, then the row is ignored",
# The first non-comment line of a sound alias file specifies the key name for all values appearing in this column.,,
"# This means it is safe to swap entire columns around, though you should never swap partial columns.",,
"# You can invent new keys, but the game will ignore them if it doesn't know about them.",,
"# You can leave out keys, but the ""name"" and ""file"" keys must always be present.",,

,name,name of the alias that is used to play this sound (required)
,sequence,"used to uniquely identify alias entries when more than one sound goes to an alias, used only to catch unwanted duplicates (default = 0)"
,file,the name of the file that contains the sound data (required)
,vol_min,"0 is silent, 1 is full volume (default = 1)"
,vol_max,"0 is silent, 1 is full volume (default = same as vol_min)"
,vol_mod,"blank causes no effect on vol_min and vol_max, otherwise the string must match a string in the volumemodgroups.def file and the value in that file corresponding to that string will be used to adjust vol_min and vol_max, clamped to the valid range"
,pitch_min,"1 is normal playback, 2 is twice as fast, 0.5 is half as fast (default = 1)"
,pitch_max,"1 is normal playback, 2 is twice as fast, 0.5 is half as fast (default = same as pitch_min)"
,dist_min,"within this distance in inches, the sound is always full volume (default = 120)"
,dist_max,"outside this distance in inches, the sound is not started.  If left blank or set to 0, the sound will play from any distance.  This does not affect sound volume falloff.",,,,,,,,,,,,,,,,,,,,,
,channel,"auto, menu, weapon, voice, item, body, local, music, announcer (default = auto)",,,,,,,,,,,,,,,,,,,,,
,type,primed (a streamed sound which gets primed on some platforms) / streamed / loaded (default = loaded),,,,,,,,,,,,,,,,,,,,,
,probability,weight to use for the weighted probability of playing this sound instead of another sound (default = 1),,,,,,,,,,,,,,,,,,,,,
,loop,"whether this sound is ""looping"" or ""nonlooping"" (default = ""nonlooping"")",,,,,,,,,,,,,,,,,,,,,
,masterslave,"if ""master"", this is a master sound.  If a number, then this sound's volume will be multiplied by that number (a percentage between 0 and 1) any master sound is playing.  If blank, then neither master nor slave.",,,,,,,,,,,,,,,,,,,,,
,loadspec,"space-separated list of which maps should use this alias; eg, ""burnville dawnville"".  If blank, the alias is used on all maps.",,,,,,,,,,,,,,,,,,,,,
,compression,"a string corresponding to an entry in ""XMAUpdate.tbl"" which is used to determine compression by XMAUpdate.exe",,,,,,,,,,,,,,,,,,,,,
,secondaryaliasname,"defined the name of an additional sound alias to play in addition to the current alias being played. Note that it is an error for the secondaryalias to also define a secondaryaliasname (eg, if B is a secondaryalias of A, B is not allowed to have its own secondaryalias).",,,,,,,,,,,,,,,,,,,,,
,volumefalloffcurve,if blank uses the linear curve which can not be changed. A string 'XXXX' corresponds to the curve defined by the file 'soundaliases/XXXX.vfcurve',,,,,,,,,,,,,,,,,,,,,
,startdelay,defaults to no delay. The value is the number of milliseconds to delay starting the sound by,,,,,,,,,,,,,,,,,,,,,
,speakermap,if blank uses the default speakermappings which cannot be changed. A string 'XXXX' corresponds to the speakermap defined by the file 'soundaliases/XXXX.spkrmap'. ,,,,,,,,,,,,,,,,,,,,,
,reverb,"blank means the alias is affected normally by wet and dry levels, ""fulldrylevel"" forces the alias to use a full drylevel (ignoring the global drylevel), ""nowetlevel"" forces the alias to use no wetlevel (ignoring the global wetlevel)",,,,,,,,,,,,,,,,,,,,,
,lfe percentage,this determines what percentage of the highest calculated spatialized speaker volume should be passed to the LFE. blank means no LFE for the sound,,,,,,,,,,,,,,,,,,,,,

name,sequence,file,vol_min,vol_max,vol_mod,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle,compression,secondaryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage

null,,null.wav,,,,,,,,,,,

soundname,,mapname/soundname.wav,,,,,,600,800,auto,streamed,,nonlooping
By sound name add the same name as in the GSC and by mapname youre mapname ofcourse.
6. Now make those folders

iwd: soundaliases --> place here you csv.
sound/mapname (same as in the csv) and place in the mapname folder the sound with the correct name ofcourse.
7. Make a iwd and youre good to go.

Please let me know if you managed to make it

:wink:
Image

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » March 24th, 2007, 5:29 am

Dont use that complicated tut. I will try and make one just for you. :)

Expect something in the next 30 mins.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » March 24th, 2007, 6:44 am

and behold!

http://codjumper.com/forums/viewtopic.php?t=4774

edit: Made in 15 minutes :D
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Post by waywaaaard » March 24th, 2007, 1:55 pm

thanks to you both now i can work on my map ;-)
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

Post Reply

Who is online

Users browsing this forum: No registered users and 31 guests