• Anmelden

1

Samstag, 22. September 2007, 20:38

Suche Wassereflektionsskript!

Ich such einen Script für Wasserreflektionen. Am Besten sollte es einfach zu konfigurieren sein, da ich nicht so der RGSS-Profi bin!
Bild

2

Samstag, 22. September 2007, 21:06

Das hier ist ganz einfach ^^ .

Wollte es sowieso im Scriptteil reinstellen.
Ist von der Seite http://rpgmakerxp-factory.net, also nicht von mir (Autor ist Fulmens).

Einfach über Main einfügen (Rechtsklick auf Main und dann auf "Insert").

Spoiler

Quellcode

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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
#==============================================================================
# ■ Sprite_Reflection
# Based on Sprite_Mirror, Modified By: JmsPlDnl, rewritten entirely by Rataime
#==============================================================================
CATERPILLAR_COMPATIBLE = true
 
class Game_Party
 attr_reader :characters
end
 
class Sprite_Reflection < RPG::Sprite
 
attr_accessor :character
 
def initialize(viewport=nil, character=nil,self_angle = 180)
  super(viewport)
  @character = character
  @self_angle=self_angle
  self.opacity=0
  @reflected=false
  @former=false
  @moving=false
  if $game_map.terrain_tag(@character.real_x/128,@character.real_y/128+1)==7
    @reflected=true
    @former=true
  end
  update
end
 
def update
  super
  if @tile_id != @character.tile_id or
     @character_name != @character.character_name or
     @character_hue != @character.character_hue
    @tile_id = @character.tile_id
    @character_name = @character.character_name
    @character_hue = @character.character_hue
    if @tile_id >= 384
      self.bitmap = RPG::Cache.tile($game_map.tileset_name,
        @tile_id, @character.character_hue)
      self.src_rect.set(0, 0, 32, 32)
      self.ox = 16
      self.oy = 32
    else
      self.bitmap = RPG::Cache.character(@character.character_name,
        @character.character_hue)
      @cw = bitmap.width / 4
      @ch = bitmap.height / 4
      self.ox = @cw / 2
      self.oy = @ch
    end
  end
 
  self.visible = (not @character.transparent)
  if @tile_id == 0
    sx = (@character.pattern) * @cw
    sy = (@character.direction - 2) / 2 * @ch
    if @character.direction== 6
          sy = ( 4- 2) / 2 * @ch
    end
    if @character.direction== 4
          sy = ( 6- 2) / 2 * @ch
   end
   if @character.direction != 4 and @character.direction != 6
         sy = (@character.direction - 2) / 2 * @ch
   end
  end
 
  self.x = @character.screen_x
  self.y = @character.screen_y-5
  @moving=!(@character.real_x%128==0 and @character.real_y%128==0)
  @d=@character.direction
  @rect=[sx, sy, @cw, @ch]
  if !(@moving)
    if $game_map.terrain_tag(@character.real_x/128,@character.real_y/128+1)==7
      @reflected=true
      @former=true
    else
      @reflected=false  
      @former=false
    end
 
  else
      case @d
 
      when 2
      if $game_map.terrain_tag(@character.real_x/128,@character.real_y/128+2)==7
        @reflected=true
        if @former==false
          @offset = (@character.screen_y%32)*@ch/32
          @rect=[sx, sy, @cw, @offset]
          self.y=@character.screen_y-5
        end
      else
        @reflected=false  
      end
 
      when 4
      if $game_map.terrain_tag(@character.real_x/128,@character.real_y/128+1)!=7
        @offset = ((@character.screen_x-@cw/2)%32)*@cw/32
        @rect=[sx, sy, @offset, @ch]
        self.x=@character.screen_x
      else
        @reflected=true
        if @former==false
          @offset = ((@character.screen_x-@cw/2)%32)*@cw/32
          @rect=[sx+@offset, sy, @cw-@offset, @ch]
          self.x=@character.screen_x-@offset
        end
      end
 
      when 6
      if $game_map.terrain_tag(@character.real_x/128+1,@character.real_y/128+1)!=7
        @offset = ((@character.screen_x-@cw/2)%32)*@cw/32
        @rect=[sx+@offset, sy, @cw-@offset, @ch]
        self.x=@character.screen_x-@offset
      else
        @reflected=true
        if @former==false
          @offset = ((@character.screen_x-@cw/2)%32)*@cw/32
          @rect=[sx, sy, @offset, @ch]
          self.x=@character.screen_x
        end
      end
 
      when 8
      if $game_map.terrain_tag(@character.real_x/128,@character.real_y/128+2)==7
        @reflected=true
        if $game_map.terrain_tag(@character.real_x/128,@character.real_y/128+1)!=7
          @offset = (@character.screen_y%32)*@ch/32
          @rect=[sx, sy, @cw, @offset]
          self.y=@character.screen_y-5
        end
      else
        @reflected=false  
      end
 
      end
 
  end
  if @reflected
    self.opacity=128
  else
   @rect=[sx, sy, @cw, @ch]
   self.opacity=0
  end
 
  if $game_map.terrain_tag((@character.real_x+64)/128,@character.real_y/128+2)!=7
    if $game_map.terrain_tag((@character.real_x+64)/128,@character.real_y/128+2)!=7
      @rect[1]= @rect[1]+@ch/2
      @rect[3]= @rect[3]/2
      self.y = self.y - @ch/2
    else
      @reflected=false
    end
  end
 
  self.src_rect.set(@rect[0],@rect[1],@rect[2],@rect[3])
 
  @character.is_a:Sprite
 alias reflect_initialize initialize
 
 def initialize(viewport, character = nil)
   @character = character
   @reflection = []
   super(viewport)
   if (character.is_a?(Game_Event) and character.list!=nil and character.list[0].code == 108 and character.list[0].parameters == ["r"])
    @reflection.push(Sprite_Reflection.new(viewport,@character))
   end
   if (character.is_a?(Game_Event) and character.list!=nil and character.list[0].code == 108 and character.list[0].parameters == ["hero_r"])
    @reflection.push(Sprite_Reflection.new(viewport,$game_player))
#===================================================
# ● Compatibility with fukuyama's caterpillar scrîpt
#===================================================
if CATERPILLAR_COMPATIBLE and $game_party.characters!=nil
 
 for member in $game_party.characters
   @reflection.push(Sprite_Reflection.new(viewport,member))
 end
 
end
#===================================================
# ● End of the compatibility
#===================================================
   end
   reflect_initialize(viewport, @character)
 end
 
 alias reflect_update update
 
 def update
  reflect_update
  if @reflection!=nil
    for reflect in @reflection
      reflect.update
    end
  end
 end
 
end
zum Lesen den Text mit der Maus markieren



So, jetzt fragst du dich wahrscheinlich, wie das ganze funzt. Ganz einfach: Wenn ein Autotile oder ein Tile reflektieren soll, dann gibst du ihm den Terrain-Tag 7 (Unter Database -> Tiles).
Soll der Held reflektieren, dann machst du ein Event mit dem Kommentar "hero_r" .
Soll ein Event reflektieren, dann muss der erste Befehl der Kommentar "r" sein.

Viel Spaß ^^ .

  • Links :arrow:

    Bild
    All meine Tutorials und Informationen zu meinen Projekten

    Bild
    Meine Videotutorials und Tests

    rpgmaker-reloaded.de
  • Wichtige Tutorials :exclamation:

    Bild
    Alles zur Planung, Organisation und Durchführung eines Projekts

    Bild
    Wie gestalte ich eine Projektvorstellung?
  • Meine Projekte :rmvx:

    Bild
    Titel: Dawn of the Black Wizard Genre: Adventure

    Bild
    Titel: Egaea Genre: Klassisches RPG

    Bild
    Titel: Deceptive Dreams Genre: Adventure


3

Samstag, 22. September 2007, 21:40

Ah, vielen Dank! Verträgt sich das auch mit dem Netplay Plus?
Bild

4

Sonntag, 23. September 2007, 20:17

Weiß ich nicht...versuch es einfach mal ^^ .

Ich hab das Script selber noch nicht genutzt....werd es aber noch testen.

  • Links :arrow:

    Bild
    All meine Tutorials und Informationen zu meinen Projekten

    Bild
    Meine Videotutorials und Tests

    rpgmaker-reloaded.de
  • Wichtige Tutorials :exclamation:

    Bild
    Alles zur Planung, Organisation und Durchführung eines Projekts

    Bild
    Wie gestalte ich eine Projektvorstellung?
  • Meine Projekte :rmvx:

    Bild
    Titel: Dawn of the Black Wizard Genre: Adventure

    Bild
    Titel: Egaea Genre: Klassisches RPG

    Bild
    Titel: Deceptive Dreams Genre: Adventure


5

Sonntag, 23. September 2007, 20:40

Es funzt bei mir wie viele Sachen net... da ist bei mir immer ein Fehler in der letzen Zeile, Syntax-Error (erst bei end)... warum?^^

6

Dienstag, 25. September 2007, 18:59

hmmm,....
also ich habe das script jetzt,
terrain Tag 7,ein Event mit dem Kommentar hero_r.
aber da ist nix.

7

Dienstag, 25. September 2007, 19:51

Hm...das gab es ja jetzt schön öfters mit den französischen Scripten...ich mach eine Demo und teste es.

  • Links :arrow:

    Bild
    All meine Tutorials und Informationen zu meinen Projekten

    Bild
    Meine Videotutorials und Tests

    rpgmaker-reloaded.de
  • Wichtige Tutorials :exclamation:

    Bild
    Alles zur Planung, Organisation und Durchführung eines Projekts

    Bild
    Wie gestalte ich eine Projektvorstellung?
  • Meine Projekte :rmvx:

    Bild
    Titel: Dawn of the Black Wizard Genre: Adventure

    Bild
    Titel: Egaea Genre: Klassisches RPG

    Bild
    Titel: Deceptive Dreams Genre: Adventure


8

Donnerstag, 4. Oktober 2007, 17:59

Man muss am Ende noch ein end einfügen, damit es funzt! Aber bei mir wird nichts reflektiert! Obwohl ich dem Wasser den Tag 7 gegeben hab.
Bild

9

Donnerstag, 4. Oktober 2007, 18:05

Das hier ist ganz einfach ^^ .

Wollte es sowieso im Scriptteil reinstellen.
Ist von der Seite http://rpgmakerxp-factory.net, also nicht von mir (Autor ist Fulmens).


Das Skript ist nicht von Fulmens, sondern wie man auch im Skript selber sehen kann von rataime.

greetz

Social Bookmarks