Feedback would be greatly appreciated.begin SG_Scr_Depart
short DoOnce
short unefois
short Done
if ( menumode == 1 )
return
endif
if ( "SG_Glo_EtatPorte" == 0 )
return
endif
if ( "SG_Glo_EtatPorte" != 2 )
if ( "SG_Glo_EtatPorte" != 0 )
if ( GetDistance player <= 64 )
set GameHour to ( "GameHour" - 12 )
set Year to ( "Year" - 50 )
endif
endif
endif
if ( "SG_Glo_EtatPorte" == 2 )
if ( GetDistance "player" <= 64 )
Set "SG_Glo_PorteTamriel" to 0
playsound3D "shock cast"
Set DoOnce to 0
if ( "SG_Glo_Code" == 1908654 )
if ( "SG_Glo_jesuisderetour" >= 10 )
journal "SG_TrouverPorte" 87
endif
Set "SG_Glo_Ohs_retour" to 1
player->PositionCell, 5006.922, 7429.094, 7630.367, 90 " Ohszaj "
return
endif
if ( "SG_Glo_Code" == 2275196 )
player->PositionCell, 1437.569, 5707.314, 299.984, 90 " Virgo "
return
endif
if ( "SG_Glo_Code" == 7749684 )
player->PositionCell, -3174.689, 7338.875, 423.735, 90 " Jaffa-Lager "
return
endif
if ( "SG_Glo_Code" == 7342088 )
player->PositionCell, 3268.640, 6028.042, 448.053, 90 " Geh'lo'nah "
return
endif
if ( "SG_Glo_Code" == 3888289 )
player->PositionCell, 784, 4314, 12103, 90 " Aanlyundra, Place Dakara "
return
endif
if ( "SG_Glo_Code" == 919108 )
player->PositionCell, 3384.667, 1274.124, 1578.134, 90 " Nueronuh "
return
endif
if ( "SG_Glo_Code" == 1505931 )
player->PositionCell, 3163.257, -5196.989, 322.039, 90 " Corlaris "
return
endif
if ( "SG_Glo_Code" == 2264861 )
player->PositionCell -2988, 697, 780, 90 " Sunticah "
return
endif
if ( "SG_Glo_Code" == 813817 )
player->PositionCell, 2899, 5273, 7286, 90 " Asundrys "
return
endif
if ( "SG_Glo_Code" == 2325558 )
player->PositionCell, -12542.677, -72668.914, 267.666, 90 "Seyda Neen"
return
endif
if ( "SG_Glo_Code" == 2325572 )
player->PositionCell, -24097.725, -15707.491, 732.244, 90 "Balmora"
return
endif
if ( "SG_Glo_Code" == 6036986 )
player->PositionCell, 4223.046, 3973.804, 12366.477, 90 " Destiny "
return
endif
if ( "SG_Glo_Code" == 1613472 )
player->PositionCell, 4090.027, 3847.497, 12383.958, 90 " Hatak2 "
return
endif
if ( "SG_Glo_Code" == 773205 )
player->PositionCell, 4090.027, 3847.497, 12383.958, 90 " Hatak1 "
return
endif
if ( "SG_Glo_Code" == 7079626 )
player->PositionCell, -2290.743, 954.445, 334.575, 90 " Lee'kienvah "
return
endif
if ( "SG_Glo_Code" == 1883825 )
player->PositionCell, 4172, 4032, 1126, 90 " Mezhchanus "
return
endif
if ( "SG_Glo_Code" == 1862302 )
player->PositionCell, 16270, -6737, 100, 270 " Qila' el-dabba "
return
endif
set "SG_Glo_EtatPorte" to 3
set "SG_Glo_magie_retire" to 1
PlayBink "SG_wormhole.bik" 1
endif
endif
if ( "SG_Glo_EtatPorte" == 2 )
if ( GetDistance "player" <= 64 )
Set "SG_Glo_PorteTamriel" to 0
playsound3D "shock cast"
Set DoOnce to 0
if ( "SG_Glo_Code" == 1477550 )
player->PositionCell, 4219.202, 3955.644, 12524.789, 90 " P3X-118 "
endif
set "SG_Glo_EtatPorte" to 3
set "SG_Glo_magie_retire" to 1
PlayBink "SG_wormhole.bik" 1
endif
endif
if ( "SG_Glo_EtatPorte" == 3 )
if ( DoOnce == 0 )
playsound "SG_Msc_Musique2"
Set DoOnce to 1
endif
endif
if ( "SG_Glo_EtatPorte" == 5 )
set "SG_Glo_EtatPorte" to 0
endif
end
Scripting help needed
-
Redchurch_Mastr
- Layman

- Posts: 3
- Joined: Fri Apr 24, 2009 5:51 pm
Scripting help needed
Hi, I am helping a developer with a certain script. The script is attached on a Stargate and it is supposed to teleport the player character to somewhere, which depends on a global variable. Unfortunately, the script crashes the game. I honestly tried all possible methods (and I have 2 released mods with heavy use of scripting) but I cannot get the script to work.
- Caz
- Warder

- Posts: 564
- Joined: Sat Mar 29, 2008 3:04 pm
- ES Games: Arena, Morrowind GOTY, Oblivion GOTY, Skyrim
- Platform: PC
Re: Scripting help needed
We do have a thread for scripting and questions, but since this looks more complicated I'll leave it here.
I am afraid to say we have no really experienced scripting members on these forums, so I'm not sure if we can help you at all. Looking over your script, I can't really see any reason why it should not work. Only two things come to mind though:
1. I have heard that scripts can sometimes make the game crash if you attach it to the wrong thing. I don't think this is the case here though, I don't see how it's a problem.
2. I only know a few scripting basics, so I have a question about this part here:Can you really embed if-statements in each other like that?
I am afraid to say we have no really experienced scripting members on these forums, so I'm not sure if we can help you at all. Looking over your script, I can't really see any reason why it should not work. Only two things come to mind though:
1. I have heard that scripts can sometimes make the game crash if you attach it to the wrong thing. I don't think this is the case here though, I don't see how it's a problem.
2. I only know a few scripting basics, so I have a question about this part here:
Code: Select all
if ( "SG_Glo_EtatPorte" == 2 )
if ( GetDistance "player" <= 64 )
Set "SG_Glo_PorteTamriel" to 0
playsound3D "shock cast"
Set DoOnce to 0
if ( "SG_Glo_Code" == 1477550 )
player->PositionCell, 4219.202, 3955.644, 12524.789, 90 " P3X-118 "
endif
set "SG_Glo_EtatPorte" to 3
set "SG_Glo_magie_retire" to 1
PlayBink "SG_wormhole.bik" 1
endif
endifNord wisdom:
You don't know a woman until you've had a strong drink and a fist fight with her.
You don't know a woman until you've had a strong drink and a fist fight with her.
-
Redchurch_Mastr
- Layman

- Posts: 3
- Joined: Fri Apr 24, 2009 5:51 pm
Re: Scripting help needed
Thank you, Caz. I forwarded your reply to the developer. I will just say that I cannot help him.