Kafou, le 15 octobre 2010 - 18:19, dit :
PS : au lieu de dire "ça marche pas", tu pourrais dire ce qu'il se passe ? Ca aiderait beaucoup.
Oui, désolé, c'pas très précis
Ben disons que rien ne s'activait. Je cliquais sur l'activator principal mais les murs ne bougeaient pas. :/
Merci nerwal, je pense que ça commence à rentrer.
Edit: Tenez, voici le script qui ne marche pas :
Begin THO_labyrinthe_middle_01
float timer
float timer01
short ActivateMe
short ActivateMe01
short DoOnce
If ( "THO_laby_myst_acti00"-> onactivate == 1 )
Set ActivateMe to 1
Endif
If ( ActivateMe == 1 )
Set timer to ( timer + GetSecondsPassed )
If ( timer >= 11 )
Set ActivateMe to 0
Set timer to 0
Set DoOnce to 0
Elseif ( timer >= 10 )
If ( DoOnce == 1 )
PlaySound "Door Stone Open"
set DoOnce to 2
endif
"in_THO_labyrinthe_vwall03"->Move x, -200
"in_THO_labyrinthe_vwall01"->Move x, -200
"in_THO_labyrinthe_vwall02"->Move x, -200
"in_THO_labyrinthe_vwall04"->Move x, -200
Elseif ( timer <= 1 )
If ( DoOnce == 0 )
PlaySound "Door Stone Open"
set DoOnce to 1
Endif
"in_THO_labyrinthe_vwall03"->Move x, 200
"in_THO_labyrinthe_vwall01"->Move x, 200
"in_THO_labyrinthe_vwall02"->Move x, 200
"in_THO_labyrinthe_vwall04"->Move x, 200
Endif
Endif
If ( "THO_laby_myst_acti01"-> OnActivate == 1 )
Set ActivateMe01 to 1
Endif
If ( ActivateMe01 == 1 )
Set timer01 to ( timer01 + GetSecondsPassed )
If ( timer01 >= 11 )
Set ActivateMe01 to 0
Set timer01 to 0
Elseif ( timer01 >= 10 )
"in_THO_labyrinthe_vwall01"->Move x, -200
Elseif ( timer01 <= 1 )
"in_THO_labyrinthe_vwall01"->Move x, 200
Endif
Endif
End
Re-Edit: J'ai réussi, grâce aux scripts de ce sujet, à créer plusieurs scripts permettant de faire un "ascenseur". En fait, quelqu'un se place sur static, active un activator, un mur se déplace pour cacher l'endroit ou le vide devrait être apparent, ensuite l'activator, le static et le mur se déplacent jusqu'à l'endroit en question, le mur se redéplace et on est arrivé au bon endroit.
En soit, il marche, et j'en suis d'ailleurs assez fier. Le problème, c'est que il y a quelque fois un petit écart montrant un petit bout de vide entre le static qui se déplace et son point d'arrivée ; pourtant, j'ai tout bien vérifié, les calculs sont bons.
J'ai fait trois scripts "ascenseur", et ils ont tous ce problème. Le premier et le deuxième sont similaires, et le troisième un peu plus complexe (et avec un plus grand écart donnant sur le vide) car il ne se déplace pas que de haut en bas, mais aussi sur les côtés.
Voici le deuxième script :
Begin THO_labyrinthe_ascen02
short ActivateMe
short DoOnce
short Cadenas
float timer
If ( MenuMode == 1 )
Return
Endif
If ( "THO_laby_myst_acti06"-> OnActivate == 1 )
If ( Cadenas == 0 )
Set ActivateMe to 1
Endif
If ( Cadenas == 1 )
Set ActivateMe to 2
Endif
Endif
If ( ActivateMe == 1 )
Set timer to ( timer + GetSecondsPassed )
If ( timer >= 9 )
set ActivateMe to 0
set timer to 0
set DoOnce to 0
set Cadenas to 1
Elseif ( timer >= 8 )
If ( DoOnce == 1 )
PlaySound "SothaDoorClose"
set DoOnce to 2
Endif
"THO_laby_myst_acti06"-> Rotate, x, -180
"in_THO_labyrinthe_vwall06"-> Move x, 192
"in_THO_labyrinthe_vwall06b"-> Move x, -256
Elseif (timer >= 2 )
"in_THO_labyrinthe_vwall06"-> Move z, 128
"in_THO_laby_myst_cap_06"-> Move z, 128
"THO_laby_myst_acti06"-> Move z, -128
Elseif ( timer <= 1 )
If ( DoOnce == 0 )
PlaySound "SothaDoorOpen"
Set DoOnce to 1
Endif
"THO_laby_myst_acti06"-> Rotate, x, 180
"in_THO_labyrinthe_vwall06"-> Move x, -192
"in_THO_labyrinthe_vwall06a"-> Move x, 256
Endif
Endif
If ( ActivateMe == 2 )
Set timer to ( timer + GetSecondsPassed )
If ( timer >= 9 )
set ActivateMe to 0
set timer to 0
set DoOnce to 0
set Cadenas to 0
Elseif ( timer >= 8 )
If ( DoOnce == 1 )
PlaySound "SothaDoorClose"
set DoOnce to 2
Endif
"THO_laby_myst_acti06"-> Rotate, x, -180
"in_THO_labyrinthe_vwall06"-> Move x, 192
"in_THO_labyrinthe_vwall06a"-> Move x, -256
Elseif (timer >= 2 )
"in_THO_labyrinthe_vwall06"-> Move z, -128
"in_THO_laby_myst_cap_06"-> Move z, -128
"THO_laby_myst_acti06"-> Move z, 128
Elseif ( timer <= 1 )
If ( DoOnce == 0 )
PlaySound "SothaDoorOpen"
Set DoOnce to 1
Endif
"THO_laby_myst_acti06"-> Rotate, x, 180
"in_THO_labyrinthe_vwall06"-> Move x, -192
"in_THO_labyrinthe_vwall06b"-> Move x, 256
Endif
Endif
End
Et voici le troisième :
Begin THO_labyrinthe_ascen03
short ActivateMe
short DoOnce
short Cadenas
float timer
If ( MenuMode == 1 )
Return
Endif
If ( "THO_laby_myst_acti07"-> OnActivate == 1 )
If ( Cadenas == 0 )
Set ActivateMe to 1
Endif
If ( Cadenas == 1 )
Set ActivateMe to 2
Endif
Endif
If ( ActivateMe == 1 )
Set timer to ( timer + GetSecondsPassed )
If ( timer >= 29 )
set ActivateMe to 0
set timer to 0
set DoOnce to 0
set Cadenas to 1
Elseif ( timer >= 28 )
If ( DoOnce == 1 )
PlaySound "SothaDoorClose"
set DoOnce to 2
Endif
"THO_laby_myst_acti07"-> Rotate, x, -180
"in_THO_labyrinthe_vwall07"-> Move x, 192
"in_THO_labyrinthe_vwall07b"-> Move x, -256
Elseif ( timer >= 22 )
"in_THO_labyrinthe_vwall07"-> Move y, -128
"in_THO_laby_myst_cap_07"-> Move y, -128
"THO_laby_myst_acti07"-> Move x, -128
Elseif ( timer >= 12 )
"in_THO_labyrinthe_vwall07"-> Move z, 128
"in_THO_laby_myst_cap_07"-> Move z, 128
"THO_laby_myst_acti07"-> Move z, -128
Elseif ( timer >= 8 )
"in_THO_labyrinthe_vwall07"-> Move x, -128
"in_THO_laby_myst_cap_07"-> Move x, -128
"THO_laby_myst_acti07"-> Move y, -128
Elseif (timer >= 2 )
"in_THO_labyrinthe_vwall07"-> Move y, 128
"in_THO_laby_myst_cap_07"-> Move y, 128
"THO_laby_myst_acti07"-> Move x, 128
Elseif ( timer <= 1 )
If ( DoOnce == 0 )
PlaySound "SothaDoorOpen"
Set DoOnce to 1
Endif
"THO_laby_myst_acti07"-> Rotate, x, 180
"in_THO_labyrinthe_vwall07"-> Move x, -192
"in_THO_labyrinthe_vwall07a"-> Move x, 256
Endif
Endif
If ( ActivateMe == 2 )
Set timer to ( timer + GetSecondsPassed )
If ( timer >= 29 )
set ActivateMe to 0
set timer to 0
set DoOnce to 0
set Cadenas to 0
Elseif ( timer >= 28 )
If ( DoOnce == 1 )
PlaySound "SothaDoorClose"
set DoOnce to 2
Endif
"THO_laby_myst_acti07"-> Rotate, x, -180
"in_THO_labyrinthe_vwall07"-> Move x, 192
"in_THO_labyrinthe_vwall07a"-> Move x, -256
Elseif ( timer >= 22 )
"in_THO_labyrinthe_vwall07"-> Move y, 128
"in_THO_laby_myst_cap_07"-> Move y, 128
"THO_laby_myst_acti07"-> Move x, 128
Elseif ( timer >= 12 )
"in_THO_labyrinthe_vwall07"-> Move z, -128
"in_THO_laby_myst_cap_07"-> Move z, -128
"THO_laby_myst_acti07"-> Move z, 128
Elseif (timer >= 8 )
"in_THO_labyrinthe_vwall07"-> Move x, 128
"in_THO_laby_myst_cap_07"-> Move x, 128
"THO_laby_myst_acti07"-> Move y, 128
Elseif (timer >= 2 )
"in_THO_labyrinthe_vwall07"-> Move y, -128
"in_THO_laby_myst_cap_07"-> Move y, -128
"THO_laby_myst_acti07"-> Move x, -128
Elseif ( timer <= 1 )
If ( DoOnce == 0 )
PlaySound "SothaDoorOpen"
Set DoOnce to 1
Endif
"THO_laby_myst_acti07"-> Rotate, x, 180
"in_THO_labyrinthe_vwall07"-> Move x, -192
"in_THO_labyrinthe_vwall07b"-> Move x, 256
Endif
Endif
End
Merci d'avance !
Modifié par Duc Moquette, 16 octobre 2010 - 13:58.