Archiv verlassen und diese Seite im Standarddesign anzeigen : Soul´s Problemsammel-Thread...
So, damit ich nicht 100 Threads aufmachen muss, hier mal ein Großer^^
Also, ich werde hier meine Probleme zum XP oder zu Ruby posten und hoffe auf Hilfe :)
Also fangen wir gleich an^^
Ich habe gerade ein Problem. Wie kann ich die MPs nach rechts verschieben?
Die Geld, Zeit und Fortschritts-Anzeige war nciht schwer, aber die Mps kann ich irgendwie nicht verschieben.
Geht das überhaupt?
Hier noch ein Bild mit dem Problem was ich habe:
http://www.imagesload.net/img/189.png
Kannst du ein "MP" vielleicht näher definieren?
MP = Menüpunkt
MPs = Menüpunkte
Ich möchte die MP anzeige nach Rechts verschieben, krieg es aber nicht hin :/
Ich gehe davon aus, dass du das normale Menü des RPG-Maker XP verwendest.
In dem Fall solltest du in der "Scene_Menu" in der Funktion "main" irgendwo die Erstellung eines Command-Fensters sehen.
Dieses Fenster sollte in der Variable "@command_window" gespeichert sein.
Alles was du tun must ist die X-Koordinate dieses Fensters zu verändern, zum Beispiel wie folgt:
@command_window.x = 640 - @command_window.width
Gibts nciht, zumindestens find ich den da nicht :/
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs menu screen processing.
#==============================================================================
class Scene_Menu
#--------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Make command window
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = "Status"
s5 = "Speichern"
s6 = "Beenden"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
@command_window.index = @menu_index
# If number of party members is 0
if $game_party.actors.size == 0
# Disable items, skills, equipment, and status
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
# If save is forbidden
if $game_system.save_disabled
# Disable save
@command_window.disable_item(4)
end
# Make play time window
@playtime_window = Window_PlayTime.new
@playtime_window.x = 480
@playtime_window.y = 224
# Make steps window
@steps_window = Window_Steps.new
@steps_window.x = 480
@steps_window.y = 320
# Make gold window
@gold_window = Window_Gold.new
@gold_window.x = 480
@gold_window.y = 416
# Make status window
@status_window = Window_MenuStatus.new
@status_window.x = 0
@status_window.y = 0
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of windows
@command_window.dispose
@playtime_window.dispose
@steps_window.dispose
@gold_window.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update windows
@command_window.update
@playtime_window.update
@steps_window.update
@gold_window.update
@status_window.update
# If command window is active: call update_command
if @command_window.active
update_command
return
end
# If status window is active: call update_status
if @status_window.active
update_status
return
end
end
#--------------------------------------------------------------------------
# * Frame Update (when command window is active)
#--------------------------------------------------------------------------
def update_command
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to map screen
$scene = Scene_Map.new
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# If command other than save or end game, and party members = 0
if $game_party.actors.size == 0 and @command_window.index < 4
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Branch by command window cursor position
case @command_window.index
when 0 # item
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to item screen
$scene = Scene_Item.new
when 1 # skill
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Make status window active
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 2 # equipment
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Make status window active
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 3 # status
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Make status window active
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 4 # save
# If saving is forbidden
if $game_system.save_disabled
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to save screen
$scene = Scene_Save.new
when 5 # end game
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to end game screen
$scene = Scene_End.new
end
return
end
end
#--------------------------------------------------------------------------
# * Frame Update (when status window is active)
#--------------------------------------------------------------------------
def update_status
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Make command window active
@command_window.active = true
@status_window.active = false
@status_window.index = -1
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 1 # skill
# If this actor's action limit is 2 or more
if $game_party.actors[@status_window.index].restriction >= 2
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to skill screen
$scene = Scene_Skill.new(@status_window.index)
when 2 # equipment
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to equipment screen
$scene = Scene_Equip.new(@status_window.index)
when 3 # status
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to status screen
$scene = Scene_Status.new(@status_window.index)
end
return
end
end
end
Ich sehe es schon.
Direkt in der achten Zeile der Main-Funktion.
Das macht aber nur den Cursor lang ziehen :/
Das hatte ich ja auch schon probiert :/
Es sollte den Cursor überhaupt nicht beeinflussen wenn du die X-Koordinate setzt.
Darf ich den von dir veränderten Code einmal sehen bei welchem lediglich der Cursor verändert wird?
Ich habe es gerade selbst getestet und es funktioniert einwandfrei.
Die 8Zeile von main ist doch das:
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
Und wenn ich das erhöhe, wird nur der Cursor in die Länger gezogen.
Oder meintest du jetzt was anderes? Sry, bin relativ neu im Gebeit Ruby :/
Eigentlich solltest du in der zehnten Zeile, also nachdem das Fenster in der achten Zeile erstellt worden ist, lediglich folgenden Code einfügen welchen ich oben bereits beschrieben habe:
@command_window.x = 640 - @command_window.width
Achso, deshalb hab ich das nicht gefunden xD
Ja, okay danke :)
So, nun hab ich ein Problem bei dem ich hilfe gebrauchen kann :/
Also ich möchte LEs durch Pictures bzw. einem Pixture anzeigen lassen. Dazu hab ich mir das Skriopt welches ich im 2k3 benutzt habe kopiert und XP kompatibel gemacht. Nun noch das Skript von KD geholt, welches es erlaubt Bidler zu fixieren.
So weit so gut. Nur hab ich jetzt ein Problem. Wenn ich ohne den Skript-Befehl "picture_move_with_map(Picture ID)" das event mit dem Skript starte, ist das Pic an der richtigen Stelle, aber bewegt sich halt mit dem Char mit :/
Mach ich den Skript-Befehl "picture_move_with_map(Picture ID)" in das Event einbauen, ist das Pic nicht mehr an der Richtigen stelle :/
Hier mal 4 Bilder und das Skript von KD natürlich auch^^) die verdeutlichen sollen, was ich meine:
http://www.imagesload.net/img/191.png
http://www.imagesload.net/img/412.png
http://www.imagesload.net/img/238.png
http://www.imagesload.net/img/322.png
#----------------
# Map-Lock
#----------------
# Von KD
#----------------
#Map Lock Script
#Hab hier mal ein solches Script geschrieben.
#Du musst nur den Scripteditor öffnen (F11), mit der rechten Maustaste auf Main klicken und dann auf Insert (es wird ein leeres Script eingefügt) und in das neue,
#leere Script den Code reinkopieren.
#Funktionen
#Danach kannst du die "Move with Map" Funktion bei Pictures einstellen.
#Es gibt zwei Funktionen:
#picture_move_with_map(id_des_pictures)
#lässt ein Picture fixieren.
#picture_move_with_screen(id_des_pictures)
#lässt ein Picture mit dem Helden mitbewegen (Standardeinstellung).
#Du musst diese Funktionen nur in den "Script"-Befehl eingeben.
#Beispiel
#picture_move_with_map(3)
#Lässt das Picture mit der ID 3 fixieren.
class Game_Picture
MAP = true
SCREEN = false
def move_with=(value)
@move_with = value
end
def x
if @move_with then (@x - $game_map.display_x) / 4 else @x end
end
def y
if @move_with then (@y - $game_map.display_y) / 4 else @y end
end
alias show_move_with show
def show(*a)
@move_with = SCREEN
show_move_with(*a)
end
end
class Interpreter
def picture_move_with_map(id, v=Game_Picture::MAP)
$game_screen.pictures[id].move_with = v if $game_screen.pictures[id]
true
end
def picture_move_with_screen(id)
picture_move_with_map(id,Game_Picture::SCREEN)
end
end
EDIT:
Hat sich erledigt :)
Powered by vBulletin® Version 4.2.3 Copyright ©2025 Adduco Digital e.K. und vBulletin Solutions, Inc. Alle Rechte vorbehalten.