{lang: 'de'}
Flashhilfe.de - Flash Community

Brauch Hilfe bei Hütchenspiel [Flash 11]

 


AntwortenRegistrieren Seite1  

Primatus#1
Benutzerbild von Primatus
Beiträge: 2
Registriert: Aug 2013

08.08.2013, 15:30

Hallo,

ich erstelle gerade ein Hütchen Spiel und habe dazu auch schon einen funktionierenden Code im Web gefunden. Allerdings hat das Spiel dort 4 Hüte und ich möchte nur 3. Meine versuche den Code zu adaptieren funktionieren soweit doch leider ist der richtige Hut in manchen Fällen nicht da wo meine Augen ihn hin verfolgt haben. Kann mir einer helfen, dass myBal = 4 richtig zu entfernen?

Pastebin Link

ActionScript:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
onClipEvent (load) {
     stopped = true;
     myCTR = -1;
     w = 0;
}
onClipEvent (enterFrame) {
     if (myCTR<=_parent.ctr && myCTR>=0) {
        if (stopped) {
           w = Math.ceil((random(60)+1)/10);
           if (w == 1) {
              if (myBall == 1) {
                 myBall = 2;
              } else if (myBall == 2) {
                 myBall = 1;
              }
           } else if (w == 2) {
              if (myBall == 3) {
                 myBall = 4;
              } else if (myBall == 4) {
                 myBall = 3;
              }
           } else if (w == 3) {
              if (myBall == 3) {
                 myBall = 2;
              } else if (myBall == 2) {
                 myBall = 3;
              }
           } else if (w == 4) {
              if (myBall == 3) {
                 myBall = 1;
              } else if (myBall == 1) {
                 myBall = 3;
              }
           } else if (w == 5) {
              if (myBall == 2) {
                 myBall = 4;
              } else if (myBall == 4) {
                 myBall = 2;
              }
           } else if (w == 6) {
              w = random(3)+6;
           }
           gotoAndPlay("f"+String(w));
           myCTR++;
           stopped = false;
        }
     } else if (_parent.ctr>4 && myCTR>_parent.ctr) {
        if (_parent._currentframe != 5) {
           if (w == 1) {
              if (myBall == 1) {
                 myBall = 2;
              } else if (myBall == 2) {
                 myBall = 1;
              }
           } else if (w == 2) {
              if (myBall == 3) {
                 myBall = 4;
              } else if (myBall == 4) {
                 myBall = 3;
              }
           } else if (w == 3) {
              if (myBall == 3) {
                 myBall = 2;
              } else if (myBall == 2) {
                 myBall = 3;
              }
           } else if (w == 4) {
              if (myBall == 3) {
                 myBall = 1;
              } else if (myBall == 1) {
                 myBall = 3;
              }
           } else if (w == 5) {
              if (myBall == 2) {
                 myBall = 4;
              } else if (myBall == 4) {
                 myBall = 2;
              }
           }
           _parent.gotoAndStop(5);
           gotoAndStop("guess");
        }
     }
}

AntwortenRegistrieren Seite1  

Schnellantwort

Du musst registriert sein, um diese Funktion nutzen zu können.

 
Ähnliche Beiträge zum Thema
Partner Webseiten: art-and-law.de  Mediengestalter.info   phpwelt.de   Scubacube.de  
Haftungsausschluss   Datenschutzerklärung   Impressum
© 1999-2024 Sebastian Wichmann - Flashhilfe.de