Ergebnis 1 bis 16 von 16

Thema: Verfolgen

Hybrid-Darstellung

Vorheriger Beitrag Vorheriger Beitrag   Nächster Beitrag Nächster Beitrag
  1. #1
    [QUOTE=Dhan;2658102]Das kannst du wie folgt realisieren:

    1 PP-Event, das prüft, ob der Held seine Position verändert hat und wenn ja das mit Facing-Veränderung als neues Ziel des Verfolgers setzt:
    Variable X1 = Hero X Coords
    Variable Y1 = Hero Y Coords
    wait 0.1
    Variable X2 = Hero X Coords
    Variable Y2 = Hero Y Coords
    fork (X1 != X2) { Switch Moved ON }
    else { fork (Y1 != Y2) { Switch Moved ON }}
    fork (Moved ON) {
    __Variable ZielX = X2
    __Variable ZielY = Y2
    __fork (Hero Face Dir North) {ZielY +=1}
    __fork (Hero Face Dir South) {ZielY -=1}
    __fork (Hero Face Dir Left) {ZielX +=1}
    __fork (Hero Face Dir Right) {ZielX -=1}
    __Switch Moved OFF
    }


    ich check durch den script einfach nich durch...
    kann ich diesen script auch gleich ins folgen kommando reinhauen? (also da wo varis abgefragt werden und der member halt folgt)

    Geändert von RandyTheZeldaFan (30.08.2010 um 16:49 Uhr)

  2. #2
    Prinzipiell schon, aber ich trenn gerne Move Event-Code und anderen Code, insbesondere wenn dieser waits benötigt wie hier

  3. #3
    könntest du mir den script nochmals aufschreiben? ich komm damit net klar und kapiers net...

  4. #4
    Ich habs so gemacht, wie ich dein script verstehe...es klappt einfach net der switch bleibt OFF

    Zitat Zitat von EasyEventExporter
    - SCRIPT -
    <> Change Variable: [1] = X position on map (tiles) of hero
    <> Change Variable: [2] = Y position on map (tiles) of hero
    <> Wait: 0,1 sec.
    <> Change Variable: [3] = X position on map (tiles) of hero
    <> Change Variable: [4] = Y position on map (tiles) of hero
    <> Fork Condition: If Variable [2] != V[4] then ...
    . <> Change Switch: [2] = ON
    . <>
    : End of fork
    <> Fork Condition: If Variable [1] != V[3] then ...
    . <> Change Switch: [2] = ON
    . <>
    : Else ...
    . <>
    : End of fork
    <> Fork Condition: If Switch [2] == ON then ...
    . <> Change Variable: [5] = V[3]
    . <> Change Variable: [6] = V[4]
    . <> Fork Condition: If Hero is facing up then ...
    . . <> Change Variable: [6] += 1
    . . <>
    . : End of fork
    . <> Fork Condition: If Hero is facing right then ...
    . . <> Change Variable: [6] -= 1
    . . <>
    . : End of fork
    . <> Fork Condition: If Hero is facing down then ...
    . . <> Change Variable: [6] -= 1
    . . <>
    . : End of fork
    . <> Fork Condition: If Hero is facing left then ...
    . . <> Change Variable: [6] += 1
    . . <>
    . : End of fork
    . <> Change Switch: [2] = OFF
    . <>
    : End of fork

    Und auf dem Event der Folger, Parallel Process:

    Zitat Zitat von EasyEventExporter
    - SCRIPT -
    <> Change Variable: [1] = X position on map (tiles) of hero
    <> Change Variable: [2] = Y position on map (tiles) of hero
    <> Set Event Location: This event -> (V[1], V[2])
    <> Loop
    . <> Change Variable: [7] = X position on map (tiles) of this event
    . <> Change Variable: [8] = Y position on map (tiles) of this event
    . <> Fork Condition: If Switch [2] == ON then ...
    . . <> Fork Condition: If Variable [8] > V[6] then ...
    . . . <> Move Event: This event, Frq 8, Pattern: Mv down
    . . . <>
    . . : End of fork
    . . <> Fork Condition: If Variable [8] < V[6] then ...
    . . . <> Move Event: This event, Frq 8, Pattern: Mv up
    . . . <>
    . . : End of fork
    . . <> Fork Condition: If Variable [7] > V[5] then ...
    . . . <> Move Event: This event, Frq 8, Pattern: Mv right
    . . . <>
    . . : End of fork
    . . <> Fork Condition: If Variable [7] < V[5] then ...
    . . . <> Move Event: This event, Frq 8, Pattern: Mv left
    . . . <>
    . . : End of fork
    . . <>
    . : Else ...
    . . <>
    . : End of fork
    . <> Wait: 0,1 sec.
    . <>
    : End of loop

  5. #5
    was is an meinem skript falsch?

Berechtigungen

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