djeurissen
19.03.2011, 08:08
Hi, ich bin grad dabei mir ein Schachspiel mit dem Rpg Maker zu erstellen. Da ich es einfacher finde mache ich das ganze noch zussamen mit Ineluky's Key Patch.
Hier das Skript für die erste Figur den Bauern:
--- EVENT ---
Type: Map event
Name: EV0051
Coordinates: (5, 0)
Number of Pages: 1
-- PAGE 1 --
Start conditions:
<None>
Sprite: <Tileset> #0
Facing direction: Down
Animation frame: Center
Transparent: No
Trigger condition: Parallel process
Event level: Below hero
Forbid event overlap: No
Animation type: Non-continuous
Movement type: Stationary
Movement frequency: 3
Movement speed: 3
- SCRIPT -
<> Change Variable: [4981] = X position on map (tiles) of event #14
<> Change Variable: [4982] = Y position on map (tiles) of event #14
<> Change Variable: [4983] = Y position on map (tiles) of event #1
<> Change Variable: [4984] = X position on map (tiles) of event #1
<> Fork Condition: If Variable [4982] == V[4983] then ...
. <> Fork Condition: If Variable [4981] == V[4984] then ...
. . <> Fork Condition: If Variable [1] == 1 then ...
. . . <> Change Switch: [4981] = ON
. . . <> Fork Condition: If Switch [4982] == ON then ...
. . . . <> Change Variable: [4981] = X position on map (tiles) of event #14
. . . . <> Change Variable: [4982] = Y position on map (tiles) of event #14
. . . . <> Change Variable: [5] -= 1
. . . . <> Set Event Location: Event #10 -> (V[4981], V[4982])
. . . . <>
. . . : Else ...
. . . . <>
. . . : End of fork
. . . <> Fork Condition: If Switch [4982] == OFF then ...
. . . . <> Set Event Location: Event #10 -> (8, 4)
. . . . <> Set Event Location: Event #11 -> (9, 4)
. . . . <> Label: 2
. . . . <> Fork Condition: If Switch [4981] == OFF then ...
. . . . . <> Jump To Label: 1
. . . . . <>
. . . . : Else ...
. . . . . <>
. . . . : End of fork
. . . . <> Change Variable: [4981] = X position on map (tiles) of event #14
. . . . <> Change Variable: [4982] = Y position on map (tiles) of event #14
. . . . <> Change Variable: [4983] = Y position on map (tiles) of event #10
. . . . <> Change Variable: [4984] = X position on map (tiles) of event #10
. . . . <> Fork Condition: If Variable [4983] == V[4982] then ...
. . . . . <> Fork Condition: If Variable [4981] == V[4984] then ...
. . . . . . <> Fork Condition: If Variable [1] == 1 then ...
. . . . . . . <> Move Event: Event #0, Frq 8, Pattern: Mv right
. . . . . . . <> Change Switch: [4982] = ON
. . . . . . . <> Wait: 0,1 sec.
. . . . . . . <> Set Event Location: Event #10 -> (7, 15)
. . . . . . . <> Set Event Location: Event #11 -> (8, 15)
. . . . . . . <> Jump To Label: 1
. . . . . . . <>
. . . . . . : Else ...
. . . . . . . <>
. . . . . . : End of fork
. . . . . . <>
. . . . . : Else ...
. . . . . . <>
. . . . . : End of fork
. . . . . <>
. . . . : Else ...
. . . . . <>
. . . . : End of fork
. . . . <> Change Variable: [4983] = Y position on map (tiles) of event #11
. . . . <> Change Variable: [4984] = X position on map (tiles) of event #11
. . . . <> Fork Condition: If Variable [4983] == V[4982] then ...
. . . . . <> Fork Condition: If Variable [4981] == V[4984] then ...
. . . . . . <> Fork Condition: If Variable [1] == 1 then ...
. . . . . . . <> Move Event: Event #0, Frq 8, Pattern: Mv right, Mv right
. . . . . . . <> Change Switch: [4982] = ON
. . . . . . . <> Wait: 0,1 sec.
. . . . . . . <> Set Event Location: Event #10 -> (7, 15)
. . . . . . . <> Set Event Location: Event #11 -> (8, 15)
. . . . . . . <> Jump To Label: 1
. . . . . . . <>
. . . . . . : Else ...
. . . . . . . <>
. . . . . . : End of fork
. . . . . . <>
. . . . . : Else ...
. . . . . . <>
. . . . . : End of fork
. . . . . <>
. . . . : Else ...
. . . . . <>
. . . . : End of fork
. . . . <> Wait: 0,1 sec.
. . . . <> Jump To Label: 2
. . . . <>
. . . : Else ...
. . . . <>
. . . : End of fork
. . . <>
. . : Else ...
. . . <>
. . : End of fork
. . <>
. : Else ...
. . <>
. : End of fork
. <>
: Else ...
. <>
: End of fork
<> Label: 1
<>
Ähm, ich habe noch nicht beachtet das dem Bauern auch andere Figuren im Weg stehen können, aber darum geht es gerade nicht....
Mein Problem ist das es oft vorkommt wenn ich nun mit dem Event welches die X/Y Koordinate 4981/4982 hat auf Event 11/10 steht und ich Enter drücke passiert oft nichts außer ich drücke ganze oft Enter...
Dann ist hier noch die bedeutungen der Tastenpatch Variable:
1=Enter/Leertaste
Und ich poste jetzt nicht das Skript wie ich das Event bewege da ich denke das es daran nicht liegt...
Achja und diese Fork Condition die abfragt ob der Switch 4981 aus ist, ist nur dafür das man das ganze auch wieder abrechen kann...
Ich hoffe mir kann jemand helfen, schonmal danke im Vorraus^^.
Hier das Skript für die erste Figur den Bauern:
--- EVENT ---
Type: Map event
Name: EV0051
Coordinates: (5, 0)
Number of Pages: 1
-- PAGE 1 --
Start conditions:
<None>
Sprite: <Tileset> #0
Facing direction: Down
Animation frame: Center
Transparent: No
Trigger condition: Parallel process
Event level: Below hero
Forbid event overlap: No
Animation type: Non-continuous
Movement type: Stationary
Movement frequency: 3
Movement speed: 3
- SCRIPT -
<> Change Variable: [4981] = X position on map (tiles) of event #14
<> Change Variable: [4982] = Y position on map (tiles) of event #14
<> Change Variable: [4983] = Y position on map (tiles) of event #1
<> Change Variable: [4984] = X position on map (tiles) of event #1
<> Fork Condition: If Variable [4982] == V[4983] then ...
. <> Fork Condition: If Variable [4981] == V[4984] then ...
. . <> Fork Condition: If Variable [1] == 1 then ...
. . . <> Change Switch: [4981] = ON
. . . <> Fork Condition: If Switch [4982] == ON then ...
. . . . <> Change Variable: [4981] = X position on map (tiles) of event #14
. . . . <> Change Variable: [4982] = Y position on map (tiles) of event #14
. . . . <> Change Variable: [5] -= 1
. . . . <> Set Event Location: Event #10 -> (V[4981], V[4982])
. . . . <>
. . . : Else ...
. . . . <>
. . . : End of fork
. . . <> Fork Condition: If Switch [4982] == OFF then ...
. . . . <> Set Event Location: Event #10 -> (8, 4)
. . . . <> Set Event Location: Event #11 -> (9, 4)
. . . . <> Label: 2
. . . . <> Fork Condition: If Switch [4981] == OFF then ...
. . . . . <> Jump To Label: 1
. . . . . <>
. . . . : Else ...
. . . . . <>
. . . . : End of fork
. . . . <> Change Variable: [4981] = X position on map (tiles) of event #14
. . . . <> Change Variable: [4982] = Y position on map (tiles) of event #14
. . . . <> Change Variable: [4983] = Y position on map (tiles) of event #10
. . . . <> Change Variable: [4984] = X position on map (tiles) of event #10
. . . . <> Fork Condition: If Variable [4983] == V[4982] then ...
. . . . . <> Fork Condition: If Variable [4981] == V[4984] then ...
. . . . . . <> Fork Condition: If Variable [1] == 1 then ...
. . . . . . . <> Move Event: Event #0, Frq 8, Pattern: Mv right
. . . . . . . <> Change Switch: [4982] = ON
. . . . . . . <> Wait: 0,1 sec.
. . . . . . . <> Set Event Location: Event #10 -> (7, 15)
. . . . . . . <> Set Event Location: Event #11 -> (8, 15)
. . . . . . . <> Jump To Label: 1
. . . . . . . <>
. . . . . . : Else ...
. . . . . . . <>
. . . . . . : End of fork
. . . . . . <>
. . . . . : Else ...
. . . . . . <>
. . . . . : End of fork
. . . . . <>
. . . . : Else ...
. . . . . <>
. . . . : End of fork
. . . . <> Change Variable: [4983] = Y position on map (tiles) of event #11
. . . . <> Change Variable: [4984] = X position on map (tiles) of event #11
. . . . <> Fork Condition: If Variable [4983] == V[4982] then ...
. . . . . <> Fork Condition: If Variable [4981] == V[4984] then ...
. . . . . . <> Fork Condition: If Variable [1] == 1 then ...
. . . . . . . <> Move Event: Event #0, Frq 8, Pattern: Mv right, Mv right
. . . . . . . <> Change Switch: [4982] = ON
. . . . . . . <> Wait: 0,1 sec.
. . . . . . . <> Set Event Location: Event #10 -> (7, 15)
. . . . . . . <> Set Event Location: Event #11 -> (8, 15)
. . . . . . . <> Jump To Label: 1
. . . . . . . <>
. . . . . . : Else ...
. . . . . . . <>
. . . . . . : End of fork
. . . . . . <>
. . . . . : Else ...
. . . . . . <>
. . . . . : End of fork
. . . . . <>
. . . . : Else ...
. . . . . <>
. . . . : End of fork
. . . . <> Wait: 0,1 sec.
. . . . <> Jump To Label: 2
. . . . <>
. . . : Else ...
. . . . <>
. . . : End of fork
. . . <>
. . : Else ...
. . . <>
. . : End of fork
. . <>
. : Else ...
. . <>
. : End of fork
. <>
: Else ...
. <>
: End of fork
<> Label: 1
<>
Ähm, ich habe noch nicht beachtet das dem Bauern auch andere Figuren im Weg stehen können, aber darum geht es gerade nicht....
Mein Problem ist das es oft vorkommt wenn ich nun mit dem Event welches die X/Y Koordinate 4981/4982 hat auf Event 11/10 steht und ich Enter drücke passiert oft nichts außer ich drücke ganze oft Enter...
Dann ist hier noch die bedeutungen der Tastenpatch Variable:
1=Enter/Leertaste
Und ich poste jetzt nicht das Skript wie ich das Event bewege da ich denke das es daran nicht liegt...
Achja und diese Fork Condition die abfragt ob der Switch 4981 aus ist, ist nur dafür das man das ganze auch wieder abrechen kann...
Ich hoffe mir kann jemand helfen, schonmal danke im Vorraus^^.