Du könntest eine Transparente Textbox oben erscheinen lassen
ganz viele Leerzeichen einfügen und dann: \V[VariablenID eintragen] in die Textbox einfügen.
Dadurch wird in der Textbox der Variablenwert dieser Variable angezeigt. Du kannst dich in der zeit aber nicht bewegen.
Man könnte wenn man ganz viele Bilder hat die Variable anhand von Bildern anzeigen.
(Dafür brauch man als charset die Zahlen von 0 bis 9)
Es soll auch einen Skriptbefehl geben, den kenne ich aber leider nicht.
(Das wäre wohl die einfachste Lösung)
Gruß Bex
ganz viele Leerzeichen einfügen und dann: \V[VariablenID eintragen] in die Textbox einfügen.
Dadurch wird in der Textbox der Variablenwert dieser Variable angezeigt. Du kannst dich in der zeit aber nicht bewegen.
Man könnte wenn man ganz viele Bilder hat die Variable anhand von Bildern anzeigen.
(Dafür brauch man als charset die Zahlen von 0 bis 9)
Es soll auch einen Skriptbefehl geben, den kenne ich aber leider nicht.
(Das wäre wohl die einfachste Lösung)
Gruß Bex
es gibt keinen direkten Scriptbefehl um eine Variable anzuzeigen, bzw. es wäre mir neu wenn es dafür einen geben würde oO
Einzig allein gibts die Möglichkeit dafür extra ein Window zu erstellen, welches dann permanent angezeigt wird, welches man auch mit nem Switch abschalten kann.
dazu gibts dieses Script hier:
lg flipy
Einzig allein gibts die Möglichkeit dafür extra ein Window zu erstellen, welches dann permanent angezeigt wird, welches man auch mit nem Switch abschalten kann.
dazu gibts dieses Script hier:
|
|
Ruby 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 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 |
#=============================================================================== # # Shanghai Simple Script - Variable Map Window # Last Date Updated: 2010.05.17 # Level: Normal # # This script allows for multiple variables and automatically updates itself # when the variables themselves change. #=============================================================================== # Instructions # ----------------------------------------------------------------------------- # To install this script, open up your script editor and copy/paste this script # to an open slot below ▼ Materials but above ▼ Main. Remember to save. # # To use this variable window, use these event calls. Works on map only. # # variable_window_clear # - Clears all of the variable window and closes it. # # variable_window_open # - Opens the variable window, but only if it has variables. # # variable_window_close # - Closes the variable window. # # variable_window_add(variable_id) # - Adds the variable_id to the variable window. # # variable_window_remove(variable_id) # - Removes the variable_id from the variable window. # # variable_window_upper_left # variable_window_upper_right # variable_window_lower_left # variable_window_lower_right # - Moves the variable window to that location. # # variable_window_width(x) # - Changes the variable window's width to x. #=============================================================================== $imported = {} if $imported == nil $imported["VariableMapWindow"] = true #============================================================================== # ** Game_System #============================================================================== class Game_System #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :shown_variables attr_accessor :variable_window_open attr_accessor :variable_corner attr_accessor :variable_width end #============================================================================== # ** Game_Interpreter #============================================================================== class Game_Interpreter #-------------------------------------------------------------------------- # * Variable Window Clear #-------------------------------------------------------------------------- def variable_window_clear return unless $scene.is_a?(Scene_Map) $scene.variable_window.data = [] $scene.variable_window.refresh $scene.variable_window.close end #-------------------------------------------------------------------------- # * Variable Window Open #-------------------------------------------------------------------------- def variable_window_open return unless $scene.is_a?(Scene_Map) $scene.variable_window.open if $scene.variable_window.data != [] $game_system.variable_window_open = true end #-------------------------------------------------------------------------- # * Variable Window Close #-------------------------------------------------------------------------- def variable_window_close return unless $scene.is_a?(Scene_Map) $scene.variable_window.close $game_system.variable_window_open = false end #-------------------------------------------------------------------------- # * Variable Window Add #-------------------------------------------------------------------------- def variable_window_add(variable_id) return unless $scene.is_a?(Scene_Map) return unless variable_id.is_a?(Integer) return if $game_variables[variable_id].nil? return if $game_system.shown_variables.include?(variable_id) $game_system.shown_variables.push(variable_id) $scene.variable_window.refresh end #-------------------------------------------------------------------------- # * Variable Window Remove #-------------------------------------------------------------------------- def variable_window_remove(variable_id) return unless $scene.is_a?(Scene_Map) return unless $game_system.shown_variables.include?(variable_id) $game_system.shown_variables.delete(variable_id) $scene.variable_window.refresh end #-------------------------------------------------------------------------- # * Variable Window Upper Left #-------------------------------------------------------------------------- def variable_window_upper_left return unless $scene.is_a?(Scene_Map) $game_system.variable_corner = 0 end #-------------------------------------------------------------------------- # * Variable Window Upper Right #-------------------------------------------------------------------------- def variable_window_upper_right return unless $scene.is_a?(Scene_Map) $game_system.variable_corner = 1 end #-------------------------------------------------------------------------- # * Variable Window Lower Left #-------------------------------------------------------------------------- def variable_window_lower_left return unless $scene.is_a?(Scene_Map) $game_system.variable_corner = 2 end #-------------------------------------------------------------------------- # * Variable Window Lower Right #-------------------------------------------------------------------------- def variable_window_lower_right return unless $scene.is_a?(Scene_Map) $game_system.variable_corner = 3 end #-------------------------------------------------------------------------- # * Variable Window Width #-------------------------------------------------------------------------- def variable_window_width(value) return unless $scene.is_a?(Scene_Map) $game_system.variable_width = [160, value].max $scene.variable_window.refresh end end #============================================================================== # ** Window_Variable #============================================================================== class Window_Variable < Window_Selectable #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :data #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize $game_system.shown_variables = [] if $game_system.shown_variables.nil? super(0, 0, 160, 56) self.openness = 0 if $game_system.shown_variables.empty? self.openness = 0 unless $game_system.variable_window_open refresh update_corner end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh $game_system.variable_width = 160 if $game_system.variable_width.nil? self.width = $game_system.variable_width @data = $game_system.shown_variables @value = [] if @value.nil? for variable in @data next if $game_variables[variable].nil? @value[variable] = $game_variables[variable] end @item_max = @data.size self.height = [@item_max, 1].max * 24 + 32 create_contents for i in 0...@item_max draw_item(i) end update_corner end #-------------------------------------------------------------------------- # * Update #-------------------------------------------------------------------------- def update super refresh if @data != $game_system.shown_variables for variable in @data.compact next if variable == nil next if $game_variables[variable].nil? next if @value[variable] == $game_variables[variable] draw_item(@data.index(variable)) end update_corner end #-------------------------------------------------------------------------- # * Update Corner #-------------------------------------------------------------------------- def update_corner $game_system.variable_corner = 0 if $game_system.variable_corner.nil? case $game_system.variable_corner when 0 self.x = 0 self.y = 0 when 1 self.x = Graphics.width - self.width self.y = 0 when 2 self.x = 0 self.y = Graphics.height - self.height when 3 self.x = Graphics.width - self.width self.y = Graphics.height - self.height end end #-------------------------------------------------------------------------- # * Draw Item #-------------------------------------------------------------------------- def draw_item(index) rect = item_rect(index) self.contents.clear_rect(rect) current_id = @data[index] return if $game_variables[current_id].nil? name = sprintf("%s:", $data_system.variables[current_id]) amount = $game_variables[current_id] self.contents.font.color = system_color self.contents.draw_text(rect, name, 0) self.contents.font.color = normal_color self.contents.draw_text(rect, amount, 2) end end #============================================================================== # ** Scene_Map #============================================================================== class Scene_Map < Scene_Base #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :variable_window #-------------------------------------------------------------------------- # * Start processing #-------------------------------------------------------------------------- alias start_sss_variable_map_window start unless $@ def start start_sss_variable_map_window @variable_window = Window_Variable.new end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- alias terminate_sss_variable_map_window terminate unless $@ def terminate @variable_window.dispose unless @variable_window.nil? @variable_window = nil terminate_sss_variable_map_window end #-------------------------------------------------------------------------- # * Basic Update Processing #-------------------------------------------------------------------------- alias update_basic_sss_variable_map_window update_basic unless $@ def update_basic update_basic_sss_variable_map_window @variable_window.update unless @variable_window.nil? end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- alias update_sss_variable_map_window update unless $@ def update update_sss_variable_map_window @variable_window.update unless @variable_window.nil? end end #=============================================================================== # # END OF FILE # #=============================================================================== |
zum Lesen den Text mit der Maus markieren
lg flipy
Ähnliche Themen
-
Skript-Anfragen »-
RPGXP - Bilder vor dem Spiel/Intro vor dem Spiel
(23. Dezember 2012, 17:41)
-
Einsteigerhilfe »-
Switch zusatand ausgeben
(16. März 2010, 13:25)
-
RGSS 1 Probleme & Talk »-
variable in window anzeigen
(14. September 2008, 12:45)
-
Einsteigerhilfe »-
Bilder mit Variablen einfügen.
(9. Dezember 2007, 17:47)
-
RGSS 1 Probleme & Talk »-
Schadenssprite / Zahl anzeigen
(13. November 2007, 20:43)
