Je me suis amusé a faire un petit labyrinthe de champs de force où d'autre murs viennent apparaitre et disparaitre de façon aléatoire. Et le mieux c'est que ça marche , à peux près
En effet des que choix <=40 ça bug le script s'arrête mais pas dans les autre cas.
Que dois je faire?
voici le script incriminé
Spoiler
begin _SG_sc_ar_piege short Etat1 short Etat2 short Etat3 short Etat4 short etat5 short etat6 short etat7 short DoOnce float Timer float Choix If ("_SG_AR_levier2"->OnActivate==1);desactive tout si le PJ sort return Endif If (OnActivate==1) If (DoOnce==0) "_SG_ar_mur001"->Disable set DoOnce to 1 PlayGroup "Idle2" "_SG_champsdeforcemobile1'"->Disable "_SG_champsdeforcemobile2'"->Disable "_SG_champsdeforcemobile3'"->Disable "_SG_champsdeforcemobile4'"->Disable "_SG_champsdeforcemobile5'"->Disable "_SG_champsdeforcemobile6'"->Disable "_SG_champsdeforcemobile7'"->Disable Endif Endif If (DoOnce=1) Set Timer to (Timer+GetSecondsPassed) If (timer>=5.5) set timer to 0 ElseIf (timer>=2.5) If (timer<=2.6) set Choix to (Random*100) messagebox "%.2f", choix Endif Endif Endif Endif If (choix!=0) If (choix<=40) If (Etat 1==0) "_SG_champsdeforcemobile1"->Disable "_SG_champsdeforcemobile1'"->enable Set Etat1 to 1 Endif ElseIf (choix<=60) If (Etat2==0) "_SG_champsdeforcemobile2"->disable "_SG_champsdeforcemobile2'"->enable Set etat2 to 1 Endif Elseif (choix<=70) If (Etat3==0) "_SG_champsdeforcemobile3"->disable "_SG_champsdeforcemobile3'"->enable Set Etat3 to 1 Endif Elseif (choix<=80) If (etat4==0) "_SG_champsdeforcemobile4"->disable "_SG_champsdeforcemobile4'"->enable Set Etat4 to 1 Endif Endif Endif If (choix!=0) if ( choix<=90) If (etat5==0) "_SG_champsdeforcemobile5"->disable "_SG_champsdeforcemobile5'"->enable set etat5 to 1 Endif Elseif ( choix<=95) If (etat6==0) "_SG_champsdeforcemobile6"->disable "_SG_champsdeforcemobile6'"->enable Set etat6 to 1 Endif Elseif (choix<=100) If (etat7==0) "_SG_champsdeforcemobile7"->disable "_SG_champsdeforcemobile7'"->enable Set etat7 to 1 Endif Endif Endif If (timer>=5.4) If (Etat1=1) If (Choix<=40) "_SG_champsdeforcemobile1"->enable "_SG_champsdeforcemobile1'"->disable set Etat1 to 0 Endif Endif If (Etat2=1) If (Choix<=60) "_SG_champsdeforcemobile2"->enable "_SG_champsdeforcemobile2'"->disable Set Etat2 to 0 Endif Endif If (Etat3=1) If (Choix<=70) "_SG_champsdeforcemobile3"->enable "_SG_champsdeforcemobile3'"->disable Set Etat3 to 0 Endif Endif If (Etat4=1) If (Choix<=80) "_SG_champsdeforcemobile4"->enable "_SG_champsdeforcemobile4'"->disable Set Etat4 to 0 Endif Endif Endif If (timer>=5.4) if (etat5==1) if (choix<=90) "_SG_champsdeforcemobile5"->enable "_SG_champsdeforcemobile5'"->disable Set etat5 to 0 Endif Endif If (etat6==1) If (choix<=95) "_SG_champsdeforcemobile6"->enable "_SG_champsdeforcemobile6'"->disable Set etat6 to 0 Endif Endif If (etat7==1) If (choix<=100) "_SG_champsdeforcemobile7"->enable "_SG_champsdeforcemobile7'"->disable Set etat7 to 0 Endif Endif Endif End
Modifié par Elenwel, 27 février 2006 - 15:55.