Script error -1 reply

Please wait...

jk3editor

Retard Hungarian Modder

50 XP

21st August 2008

0 Uploads

1,520 Posts

0 Threads

#1 10 years ago

[COLOR=Navy]Hi, I made a script, it's working well, except one thing: Tha camera fade in, but don't fade back in:(

Spoiler: Show
wait ( 1500.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 1.000, 250 ); wait ( 250.000 ); set ( /*@SET_TYPES*/ "SET_PLAYER_LOCKED", /*@BOOL_TYPES*/ "true" ); affect ( "player", /*@AFFECT_TYPE*/ INSERT ) { set ( /*@SET_TYPES*/ "SET_ORIGIN", < -52392.000 3240.000 -40.000 > ); set ( /*@SET_TYPES*/ "SET_ANGLES", < 0.000 180.000 0.000 > ); } remove ( "train" ); remove ( "button" ); remove ( "train2" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/weapons/explosions/explosion_huge1.mp3" ); wait ( 1500.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 1.000, < 0.000 0.000 0.000 >, 0.000, 750 ); wait ( 750.000 );
If you know why, tell me please;) [/COLOR]



lassev

Degenerate scripter

50 XP

21st June 2004

0 Uploads

847 Posts

0 Threads

#2 10 years ago

Hmm... What does the script monitor say? You should check to see if the script indeed plays all the way to the second fade command.

I don't think I've ever used the set_angles command on an NPC (or the player entity), but naturally I can't say either it wouldn't work. I just haven't used it on anything but brush entities and such.




jk3editor

Retard Hungarian Modder

50 XP

21st August 2008

0 Uploads

1,520 Posts

0 Threads

#3 10 years ago

[COLOR=Navy]I used the angle on player in an other script, and it worked ;)[/COLOR]

[COLOR=Navy]Everything are working before the fade, so I don't know what's the problem with this:( Here is the all script, if that can help (but in this everything are working too...except the fade out):

Spoiler: Show
use ( "nojump" ); affect ( "train", /*@AFFECT_TYPE*/ INSERT ) { move ( $tag( "train_nav", ORIGIN)$, < 0.000 0.000 0.000 >, 50000.000 ); } wait ( 2250.000 ); use ( "door1" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/empire/activate_door1.wav" ); wait ( 1200.000 ); use ( "door1" ); wait ( 4350.000 ); use ( "door2" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/empire/activate_door2.wav" ); wait ( 1200.000 ); use ( "door2" ); wait ( 4500.000 ); use ( "door3" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/empire/activate_door3.wav" ); wait ( 1200.000 ); use ( "door3" ); wait ( 5250.000 ); use ( "door4" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/empire/activate_door4.wav" ); wait ( 1200.000 ); use ( "door4" ); wait ( 6000.000 ); use ( "door5" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/empire/activate_door5.wav" ); wait ( 500.000 ); use ( "train2" ); wait ( 1500.000 ); use ( "door5" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/empire/horn.wav" ); wait ( 1500.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 1.000, 250 ); wait ( 250.000 ); set ( /*@SET_TYPES*/ "SET_PLAYER_LOCKED", /*@BOOL_TYPES*/ "true" ); affect ( "player", /*@AFFECT_TYPE*/ INSERT ) { set ( /*@SET_TYPES*/ "SET_ORIGIN", < -52392.000 3240.000 -40.000 > ); set ( /*@SET_TYPES*/ "SET_ANGLES", < 0.000 180.000 0.000 > ); } remove ( "train" ); remove ( "button" ); remove ( "train2" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/weapons/explosions/explosion_huge1.mp3" ); wait ( 1500.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 1.000, < 0.000 0.000 0.000 >, 0.000, 750 ); wait ( 750.000 );
[/COLOR]



jk3editor

Retard Hungarian Modder

50 XP

21st August 2008

0 Uploads

1,520 Posts

0 Threads

#4 10 years ago

[COLOR=Navy]I've just checked, and if I delete everythink betweenthe two fade, then it's working well, but if I delete only one (ie the sound), then it isn't working...so I tried this script too, but it didn't worked:

Spoiler: Show
use ( "door1" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/empire/activate_door1.wav" ); wait ( 1200.000 ); use ( "door1" ); wait ( 4350.000 ); use ( "door2" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/empire/activate_door2.wav" ); wait ( 1200.000 ); use ( "door2" ); wait ( 4500.000 ); use ( "door3" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/empire/activate_door3.wav" ); wait ( 1200.000 ); use ( "door3" ); wait ( 5250.000 ); use ( "door4" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/empire/activate_door4.wav" ); wait ( 1200.000 ); use ( "door4" ); wait ( 6000.000 ); use ( "door5" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/empire/activate_door5.wav" ); wait ( 500.000 ); use ( "train2" ); wait ( 1500.000 ); use ( "door5" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/empire/horn.wav" ); wait ( 1500.000 ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/weapons/explosions/explosion_huge1.mp3" ); set ( /*@SET_TYPES*/ "SET_PLAYER_LOCKED", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_HUD", /*@BOOL_TYPES*/ "false" ); remove ( "nojump" ); remove ( "nojump_trigger" ); remove ( "train2" ); remove ( "button" ); remove ( "train" ); affect ( "player", /*@AFFECT_TYPE*/ INSERT ) { set ( /*@SET_TYPES*/ "SET_ORIGIN", < -52392.000 3240.000 -32.000 > ); set ( /*@SET_TYPES*/ "SET_ANGLES", < 0.000 180.000 0.000 > ); wait ( 2000.000 ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_GETUP1" ); wait ( 2000.000 ); set ( /*@SET_TYPES*/ "SET_PLAYER_LOCKED", /*@BOOL_TYPES*/ "false" ); set ( /*@SET_TYPES*/ "SET_HUD", /*@BOOL_TYPES*/ "true" ); } wait ( 1.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 1.000, 0 ); wait ( 1500.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 0.000, 750 );
Has anybody idea, why isn't this script working?:( Here must to be fade effect... Please help... [/COLOR]



lassev

Degenerate scripter

50 XP

21st June 2004

0 Uploads

847 Posts

0 Threads

#5 10 years ago

I say again: Enable the script monitor and see where the script terminates before the latter fade. The faulty command should produce an error message. The fades obviously work in theory so the mistake is elsewhere.

The monitor can be enabled with, for example, g_icarusdebug 5 in the console.




jk3editor

Retard Hungarian Modder

50 XP

21st August 2008

0 Uploads

1,520 Posts

0 Threads

#6 10 years ago

[COLOR=Navy]It's the report:

Spoiler: Show
bug.bmp
It's the script:
Spoiler: Show
use ( "nojump" ); affect ( "train", /*@AFFECT_TYPE*/ INSERT ) { move ( $tag( "train_nav", ORIGIN)$, < 0.000 0.000 0.000 >, 50000.000 ); } wait ( 2250.000 ); use ( "door1" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/empire/activate_door1.wav" ); wait ( 1200.000 ); use ( "door1" ); wait ( 4350.000 ); use ( "door2" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/empire/activate_door2.wav" ); wait ( 1200.000 ); use ( "door2" ); wait ( 4500.000 ); use ( "door3" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/empire/activate_door3.wav" ); wait ( 1200.000 ); use ( "door3" ); wait ( 5250.000 ); use ( "door4" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/empire/activate_door4.wav" ); wait ( 1200.000 ); use ( "door4" ); wait ( 6000.000 ); use ( "door5" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/empire/activate_door5.wav" ); wait ( 500.000 ); use ( "train2" ); wait ( 1500.000 ); use ( "door5" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/empire/horn.wav" ); wait ( 1500.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 1.000, 0 ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/weapons/explosions/explosion_huge1.mp3" ); set ( /*@SET_TYPES*/ "SET_PLAYER_LOCKED", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_HUD", /*@BOOL_TYPES*/ "false" ); remove ( "nojump" ); remove ( "nojump_trigger" ); remove ( "train2" ); remove ( "button" ); remove ( "train" ); affect ( "player", /*@AFFECT_TYPE*/ INSERT ) { set ( /*@SET_TYPES*/ "SET_ORIGIN", < -52392.000 3240.000 -32.000 > ); set ( /*@SET_TYPES*/ "SET_ANGLES", < 0.000 180.000 0.000 > ); wait ( 2000.000 ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_GETUP1" ); } wait ( 1500.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 0.000, 750 ); wait ( 1000.000 ); set ( /*@SET_TYPES*/ "SET_HUD", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_PLAYER_LOCKED", /*@BOOL_TYPES*/ "false" );
Hmm...it looks, it don't play the end of the script...why?:( [/COLOR]



lassev

Degenerate scripter

50 XP

21st June 2004

0 Uploads

847 Posts

0 Threads

#7 10 years ago

SET_ANIM is always followed by the SET_ANIM_HOLDTIME, though I didn't think omitting it would halt the script.

Oh... Tell me something, this script isn't run by the same button you remove in the script with the remove("button") command? That might very well terminate subsequent script flow. Although the Affect("player") still seems to function...




jk3editor

Retard Hungarian Modder

50 XP

21st August 2008

0 Uploads

1,520 Posts

0 Threads

#8 10 years ago

[COLOR=Navy]Thanks very much, the error was that, to I deleted the "button". Thanks:bows::bows::bows: [/COLOR]