Ergebnis 1 bis 6 von 6

Thema: Begleiter soll während dem Laufen blinzeln

  1. #1

    Begleiter soll während dem Laufen blinzeln

    Hey!

    Mir ist aufgefallen dass der Character der dem Helden nachläuft nicht blinzelt sobald man sich bewegt. Ich schätze das liegt daran, dass keine 2 "Set Move Route" Befehle gleichzeitig auf ein Event gestartet werden können, jedoch würde ich trotzdem gerne wissen ob es irgendwie möglich ist dass der Char auch unterm Laufen blinzelt.

    Der Code des Begleiters (Trigger ist "Paralell Process" und im Hintergrund läuft ein Common Event mit demselben Trigger welches die Variable 92 "Begleiter Blinzeln" um 1 alle 0,1 Sekunden erhöht):
    Code:
    @> Set Event Location: This Event, Variable [0096][0095]
    @> Conditional Branch: Player is facing Up
      @> Set Move Route: This Event, Through ON, Turn Up
      @>
     : Else
      @> Conditional Branch: Player is facing Right
        @> Set Move Route: This Event, Through ON, Turn Right
        @>
       : Else
        @> Conditional Branch: Player is facing Down
          @> Set Move Route: This Event, Through ON, Turn Down
          @>
         : Else
          @> Set Move Route: This Event, Through ON, Turn Left
          @>
         : Branch End
        @>
       : Branch End
      @>
     : Branch End
    @> Wait for All Movement
    @> Loop
      @> Conditional Branch: Variable [0092:Begleiter Blinzeln] == 20
        @> Set Move Route: This Event, Change Graphic...
        @>
       : Branch End
      @> Conditional Branch: Variable [0092:Begleiter Blinzeln] == 21
        @> Set Move Route: This Event, Change Graphic...
        @>
       : Branch End
      @> Conditional Branch: Variable [0092:Begleiter Blinzeln] == 23
        @> Set Move Route: This Event, Change Graphic...
        @>
       : Branch End
      @> Conditional Branch: Variable [0092:Begleiter Blinzeln] == 24
        @> Set Move Route: This Event, Change Graphic...
        @>
       : Branch End
      @> Conditional Branch: Variable [0092:Begleiter Blinzeln] == 36
        @> Set Move Route: This Event, Change Graphic...
        @>
       : Branch End
      @> Conditional Branch: Variable [0092:Begleiter Blinzeln] == 37
        @> Set Move Route: This Event, Change Graphic...
        @> Control Variables: [0092:Begleiter Blinzeln] = 0 
        @>
       : Branch End
      @> Control Variables: [0094:B1 Koord X] = This Event's X Coordinate
      @> Control Variables: [0093:B1 Koord Y] = This Event's Y Coordinate
      @> Control Variables: [0094:B1 Koord X] -= Player's X Coordinate
      @> Control Variables: [0093:B1 Koord Y] -= Player's Y Coordinate
      @> Conditional Branch: Variable [0094:B1 Koord X] == 1
        @> Conditional Branch: Variable [0093:B1 Koord Y] == -1
          @> Conditional Branch: Player is facing Down
            @> Set Move Route: This Event, Move Left
            @>
           : Branch End
          @> Conditional Branch: Player is facing Left
            @> Set Move Route: This Event, Move Down
            @>
           : Branch End
          @>
         : Branch End
        @>
       : Branch End
      @> Conditional Branch: Variable [0094:B1 Koord X] == 1
        @> Conditional Branch: Variable [0093:B1 Koord Y] == 1
          @> Conditional Branch: Player is facing Up
            @> Set Move Route: This Event, Move Left
            @>
           : Branch End
          @> Conditional Branch: Player is facing Left
            @> Set Move Route: This Event, Move Up
            @>
           : Branch End
          @>
         : Branch End
        @>
       : Branch End
      @> Conditional Branch: Variable [0094:B1 Koord X] == -1
        @> Conditional Branch: Variable [0093:B1 Koord Y] == 1
          @> Conditional Branch: Player is facing Up
            @> Set Move Route: This Event, Move Right
            @>
           : Branch End
          @> Conditional Branch: Player is facing Right
            @> Set Move Route: This Event, Move Up
            @>
           : Branch End
          @>
         : Branch End
        @>
       : Branch End
      @> Conditional Branch: Variable [0094:B1 Koord X] == -1
        @> Conditional Branch: Variable [0093:B1 Koord Y] == -1
          @> Conditional Branch: Player is facing Down
            @> Set Move Route: This Event, Move Right
            @>
           : Branch End
          @> Conditional Branch: Player is facing Right
            @> Set Move Route: This Event, Move Down
            @>
           : Branch End
          @>
         : Branch End
        @>
       : Branch End
      @> Conditional Branch: Variable [0094:B1 Koord X] == 2
        @> Set Move Route: This Event, Move Left
        @>
       : Branch End
      @> Conditional Branch: Variable [0094:B1 Koord X] == -2
        @> Set Move Route: This Event, Move Right
        @>
       : Branch End
      @> Conditional Branch: Variable [0093:B1 Koord Y] == 2
        @> Set Move Route: This Event, Move Up
        @>
       : Branch End
      @> Conditional Branch: Variable [0093:B1 Koord Y] == -2
        @> Set Move Route: This Event, Move Down
        @>
       : Branch End
      @> Wait: 0.0 seconds
      @>
     : Repeat Above

  2. #2
    Vielleicht kannst du das Blinzeln über Event Pages machen...
    Alternativ könnte man wohl die Befehle synchronisieren, aber das klingt gar nicht mal so einfach.

  3. #3
    Ich glaube, event pages, die über eine Variable-gesteuert werden, wäre tatsächlich die sinnvollste Möglichkeit, ja. Alternativ fiele mir ein, in dem Hinterherlauf-Event eine Abfrage zu machen, ob gerade geblinzelt wird, und abhängig davon eine von zwei Versionen deines Folge-Scripts aufzurufen - einmal mit "Change Graphic" auf das normale Charset und einmal für das blinzelnde.

  4. #4
    Danke euch für die Hilfe!

    Mit der Eventpage würde es theoretisch funktionieren, jedoch "refresht" der Begleiter jedes mal wenn das Blinzeln abgeschlossen wurde und somit wird er wieder auf die X/Y Koordinaten des Helden teleportiert. Nun könnte ich natürlich die X/Y Koordinaten Variablen des Helden so manipulieren dass der Begleiter immer hinter den Helden refresht, ich denke das ist mir aber zu viel Aufwand, speziell wenn ein zweiter oder dritter Begleiter dazukommen.

    @Brei
    Denkst du es wäre möglich wenn beide "Set Move Route" Befehle gleichzeitig geschehen? Aber mal unabhängig davon ob es geht oder nicht, versuchen würde ich das sowieso wahrscheinlich nicht, das wäre dann doch zu viel des Guten für so einen kleinen Bug :P

    @BDraw
    Meinst du über Common Events? Das könnte ich versuchen! Jedoch weiß ich nicht wie es sich in den Common Events mit "Set Move Route" Befehlen verhält die nicht auf den Player anzuwenden sind, genügt es wenn ich jedem Begleiter Event auf jeder Map den gleichen Namen gebe und den Befehl dann auf dieses eine Event anwede?

    Ich muss noch sehr viel lernen also nehmt es mir bitte nicht übel wenn ich etwas falsch verstehe

  5. #5
    Move Befehle "gleichzeitig" auszuführen wird wohl nicht gehen. Aber du könntest sowas machen (achtung, pseudocode!):
    ---
    if(blinzelnNotwendig): moveEvent(change charset -> move left)
    else: moveEvent(move left)
    ---
    Damit überschreiben sich die Befehle nicht mehr. Ansonsten funktioniert die Page-Sache, wenn du den Code von oben in einem anderen (ggf common-)Event hast.

  6. #6
    Danke euch Beiden!

    Es funktioniert endlich! Jetzt blinkt der Begleiter beim Laufen und beim Stehen! Der Code sieht jetzt wie folgt aus (beim "if Switch B1 blinzeln is ON" wird auf das Charset mit den geschlossenen Augen gewechselt und beim "else" wird auf das mit den geöffneten gewechselt):

    Code:
    @> Set Event Location: This Event, Variable [0096][0095]
    @> Conditional Branch: Player is facing Up
      @> Set Move Route: This Event, Through ON, Turn Up
      @>
     : Else
      @> Conditional Branch: Player is facing Right
        @> Set Move Route: This Event, Through ON, Turn Right
        @>
       : Else
        @> Conditional Branch: Player is facing Down
          @> Set Move Route: This Event, Through ON, Turn Down
          @>
         : Else
          @> Set Move Route: This Event, Through ON, Turn Left
          @>
         : Branch End
        @>
       : Branch End
      @>
     : Branch End
    @> Wait for All Movement
    @> Loop
      @> Conditional Branch: Variable [0092:Begleiter Blinzeln] == 20
        @> Set Move Route: This Event, Change Graphic...
        @> Control Switches: [0077:B1 blinzelt] = ON
        @>
       : Branch End
      @> Conditional Branch: Variable [0092:Begleiter Blinzeln] == 21
        @> Set Move Route: This Event, Change Graphic...
        @> Control Switches: [0077:B1 blinzelt] = OFF
        @>
       : Branch End
      @> Conditional Branch: Variable [0092:Begleiter Blinzeln] == 23
        @> Set Move Route: This Event, Change Graphic...
        @> Control Switches: [0077:B1 blinzelt] = ON
        @>
       : Branch End
      @> Conditional Branch: Variable [0092:Begleiter Blinzeln] == 24
        @> Set Move Route: This Event, Change Graphic...
        @> Control Switches: [0077:B1 blinzelt] = OFF
        @>
       : Branch End
      @> Conditional Branch: Variable [0092:Begleiter Blinzeln] == 36
        @> Set Move Route: This Event, Change Graphic...
        @> Control Switches: [0077:B1 blinzelt] = ON
        @>
       : Branch End
      @> Conditional Branch: Variable [0092:Begleiter Blinzeln] == 37
        @> Set Move Route: This Event, Change Graphic...
        @> Control Switches: [0077:B1 blinzelt] = OFF
        @>
       : Branch End
      @> Conditional Branch: Variable [0092:Begleiter Blinzeln] == 49
        @> Set Move Route: This Event, Change Graphic...
        @> Control Switches: [0077:B1 blinzelt] = ON
        @>
       : Branch End
      @> Conditional Branch: Variable [0092:Begleiter Blinzeln] == 50
        @> Set Move Route: This Event, Change Graphic...
        @> Control Switches: [0077:B1 blinzelt] = OFF
        @>
       : Branch End
      @> Control Variables: [0094:B1 Koord X] = This Event's X Coordinate
      @> Control Variables: [0093:B1 Koord Y] = This Event's Y Coordinate
      @> Control Variables: [0094:B1 Koord X] -= Player's X Coordinate
      @> Control Variables: [0093:B1 Koord Y] -= Player's Y Coordinate
      @> Conditional Branch: Variable [0094:B1 Koord X] == 1
        @> Conditional Branch: Variable [0093:B1 Koord Y] == -1
          @> Conditional Branch: Player is facing Down
            @> Conditional Branch: Switch [0077:B1 blinzelt] is ON
              @> Set Move Route: This Event, Change Graphic..., Move Left
              @>
             : Else
              @> Set Move Route: This Event, Change Graphic..., Move Left
              @>
             : Branch End
            @>
           : Branch End
          @> Conditional Branch: Player is facing Left
            @> Conditional Branch: Switch [0077:B1 blinzelt] is ON
              @> Set Move Route: This Event, Change Graphic..., Move Down
              @>
             : Else
              @> Set Move Route: This Event, Change Graphic..., Move Down
              @>
             : Branch End
            @>
           : Branch End
          @>
         : Branch End
        @>
       : Branch End
      @> Conditional Branch: Variable [0094:B1 Koord X] == 1
        @> Conditional Branch: Variable [0093:B1 Koord Y] == 1
          @> Conditional Branch: Player is facing Up
            @> Conditional Branch: Switch [0077:B1 blinzelt] is ON
              @> Set Move Route: This Event, Change Graphic..., Move Left
              @>
             : Else
              @> Set Move Route: This Event, Change Graphic..., Move Left
              @>
             : Branch End
            @>
           : Branch End
          @> Conditional Branch: Player is facing Left
            @> Conditional Branch: Switch [0077:B1 blinzelt] is ON
              @> Set Move Route: This Event, Change Graphic..., Move Up
              @>
             : Else
              @> Set Move Route: This Event, Change Graphic..., Move Up
              @>
             : Branch End
            @>
           : Branch End
          @>
         : Branch End
        @>
       : Branch End
      @> Conditional Branch: Variable [0094:B1 Koord X] == -1
        @> Conditional Branch: Variable [0093:B1 Koord Y] == 1
          @> Conditional Branch: Player is facing Up
            @> Conditional Branch: Switch [0077:B1 blinzelt] is ON
              @> Set Move Route: This Event, Change Graphic..., Move Right
              @>
             : Else
              @> Set Move Route: This Event, Change Graphic..., Move Right
              @>
             : Branch End
            @>
           : Branch End
          @> Conditional Branch: Player is facing Right
            @> Conditional Branch: Switch [0077:B1 blinzelt] is ON
              @> Set Move Route: This Event, Change Graphic..., Move Up
              @>
             : Else
              @> Set Move Route: This Event, Change Graphic..., Move Up
              @>
             : Branch End
            @>
           : Branch End
          @>
         : Branch End
        @>
       : Branch End
      @> Conditional Branch: Variable [0094:B1 Koord X] == -1
        @> Conditional Branch: Variable [0093:B1 Koord Y] == -1
          @> Conditional Branch: Player is facing Down
            @> Conditional Branch: Switch [0077:B1 blinzelt] is ON
              @> Set Move Route: This Event, Change Graphic..., Move Right
              @>
             : Else
              @> Set Move Route: This Event, Change Graphic..., Move Right
              @>
             : Branch End
            @>
           : Branch End
          @> Conditional Branch: Player is facing Right
            @> Conditional Branch: Switch [0077:B1 blinzelt] is ON
              @> Set Move Route: This Event, Change Graphic..., Move Down
              @>
             : Else
              @> Set Move Route: This Event, Change Graphic..., Move Down
              @>
             : Branch End
            @>
           : Branch End
          @>
         : Branch End
        @>
       : Branch End
      @> Conditional Branch: Variable [0094:B1 Koord X] == 2
        @> Conditional Branch: Switch [0077:B1 blinzelt] is ON
          @> Set Move Route: This Event, Change Graphic..., Move Left
          @>
         : Else
          @> Set Move Route: This Event, Change Graphic..., Move Left
          @>
         : Branch End
        @>
       : Branch End
      @> Conditional Branch: Variable [0094:B1 Koord X] == -2
        @> Conditional Branch: Switch [0077:B1 blinzelt] is ON
          @> Set Move Route: This Event, Change Graphic..., Move Right
          @>
         : Else
          @> Set Move Route: This Event, Change Graphic..., Move Right
          @>
         : Branch End
        @>
       : Branch End
      @> Conditional Branch: Variable [0093:B1 Koord Y] == 2
        @> Conditional Branch: Switch [0077:B1 blinzelt] is ON
          @> Set Move Route: This Event, Change Graphic..., Move Up
          @>
         : Else
          @> Set Move Route: This Event, Change Graphic..., Move Up
          @>
         : Branch End
        @>
       : Branch End
      @> Conditional Branch: Variable [0093:B1 Koord Y] == -2
        @> Conditional Branch: Switch [0077:B1 blinzelt] is ON
          @> Set Move Route: This Event, Change Graphic..., Move Down
          @>
         : Else
          @> Set Move Route: This Event, Change Graphic..., Move Down
          @>
         : Branch End
        @>
       : Branch End
      @> Wait: 0.0 seconds
      @>
     : Repeat Above
    Danke nochmals!

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •