Benutzerinformationen überspringen
Motto: Wer anderen eine Bratwurst brät, der hat ein Bratwurstbratgerät.
|
|
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 |
class Sprite_Battler # Duration between Frames Animated_Battlers_Wait = 4 # Animated_Battlers = {Original Battler Name => [Frame 1, Frame 2, Frame 3, ...], ...} Animated_Battlers = {"001-Fighter01" => ["001-Fighter01", "002-Fighter02", "001-Fighter01"], "010-Lancer02" => ["011-Lancer03"]} alias_method :nb_alias_script_sprite_battler_initialize_animated_battlers, :initialize def initialize(*args) @animated_battler_index = 0 nb_alias_script_sprite_battler_initialize_animated_battlers(*args) end alias_method :nb_alias_script_sprite_battler_update_animated_battlers, :update def update nb_alias_script_sprite_battler_update_animated_battlers update_animated_battlers end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super # If battler is nil if @battler == nil self.bitmap = nil loop_animation(nil) return end if Animated_Battlers.has_key?(@battler.battler_name) update_animated_battlers else # If file name or hue are different than current ones if @battler.battler_name != @battler_name or @battler.battler_hue != @battler_hue # Get and set bitmap @battler_name = @battler.battler_name @battler_hue = @battler.battler_hue self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue) @width = bitmap.width @height = bitmap.height self.ox = @width / 2 self.oy = @height end end # Change opacity level to 0 when dead or hidden if @battler.dead? or @battler.hidden self.opacity = 0 end # If animation ID is different than current one if @battler.damage == nil and @battler.state_animation_id != @state_animation_id @state_animation_id = @battler.state_animation_id loop_animation($data_animations[@state_animation_id]) end # If actor which should be displayed if @battler.is_a?(Game_Actor) and @battler_visible # Bring opacity level down a bit when not in main phase if $game_temp.battle_main_phase self.opacity += 3 if self.opacity < 255 else self.opacity -= 3 if self.opacity > 207 end end # Blink if @battler.blink blink_on else blink_off end # If invisible unless @battler_visible # Appear if not @battler.hidden and not @battler.dead? and (@battler.damage == nil or @battler.damage_pop) appear @battler_visible = true end end # If visible if @battler_visible # Escape if @battler.hidden $game_system.se_play($data_system.escape_se) escape @battler_visible = false end # White flash if @battler.white_flash whiten @battler.white_flash = false end # Animation if @battler.animation_id != 0 animation = $data_animations[@battler.animation_id] animation(animation, @battler.animation_hit) @battler.animation_id = 0 end # Damage if @battler.damage_pop damage(@battler.damage, @battler.critical) @battler.damage = nil @battler.critical = false @battler.damage_pop = false end # Collapse if @battler.damage == nil and @battler.dead? if @battler.is_a?(Game_Enemy) $game_system.se_play($data_system.enemy_collapse_se) else $game_system.se_play($data_system.actor_collapse_se) end collapse @battler_visible = false end end # Set sprite coordinates self.x = @battler.screen_x self.y = @battler.screen_y self.z = @battler.screen_z end def update_animated_battlers battlers = Animated_Battlers[@battler.battler_name] @animated_battler_index += (1.0/Animated_Battlers_Wait) @animated_battler_index %= battlers.size filename = battlers[@animated_battler_index.to_i] if filename != @battler_name @battler_name = filename @battler_hue = @battler.battler_hue self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue) end @width = bitmap.width @height = bitmap.height self.ox = @width / 2 self.oy = @height end end |
Benutzerinformationen überspringen
Motto: Wer anderen eine Bratwurst brät, der hat ein Bratwurstbratgerät.
Aus meinem Skripteditor/Kopf
Zitat
Wäre aber net wenn du uns ncoh sagen würdest wo du den her hast
Zitat
eher gesagt, wie er funktioniert.
Das ausfüllen.
Zitat
![]()
Ruby Quellcode
1 2 3 4 5 6 # Duration between Frames Animated_Battlers_Wait = 4 # Animated_Battlers = {Original Battler Name => [Frame 1, Frame 2, Frame 3, ...], ...} Animated_Battlers = {"001-Fighter01" => ["001-Fighter01", "002-Fighter02", "001-Fighter01"], "010-Lancer02" => ["011-Lancer03"]}
|
|
Ruby Quellcode |
1 2 3 |
# Animated_Battlers = {Original Battler Name => [Frame 1, Frame 2, Frame 3, ...], ...} Animated_Battlers = {"001-Fighter01" => ["001-Fighter01", "002-Fighter02", "001-Fighter01"], "010-Lancer02" => ["011-Lancer03"]} |
Dieser Code verwirrt mich irgendwie...
sagen wir mal, wir haben 4 Battler, wie machen wir das wenn jeder Battler 4Frames hat?
Und kann man dazu noch die Animationen der Gegner einstellen?
Irgendwie ist das etwas unübersichtlich aufgebaut für Leute die nicht viel ahnung von RGSS haben.
Benutzerinformationen überspringen
Motto: Wer anderen eine Bratwurst brät, der hat ein Bratwurstbratgerät.
Ich hab doch ein Beispiel gemacht. Wenn du immer noch nicht alles verstehst, musst du genauer fragen.
Re:
Das ist nur ein Vorschlag.Wenn Ihr beide Euch für ein Sideview KS entscheiden solltest,zb.
Das Cybersam CBS 2.5 oder das Enu SBS Tanketai XP,würde ich Euch gerne die Animierten Battler machen oder bzw. die Charsets von Euren vorhandenen Sprites.
Das CBS funktioniert mit Animierten Battler das Enu SBS Tanketai mit Charset als Battler.
Ich würde Euch auch bei der bearbeitung der Scripts helfen sofern es mir möglich ist.
Wie gesagt.Nur ein Vorschlag.
MFG
Wir wollten einfach kein KS was aus den Charsets aufbaut.
Wir haben unsere eigenen Battler gepixelt die die unterschiedlichsten größen haben.
@ Neo-Bahamut
Kann man beliebig viele animierte Battler mit dem Script erstellen?
Können wir so die Gegner ebenfalls animieren?
Benutzerinformationen überspringen
Motto: Wer anderen eine Bratwurst brät, der hat ein Bratwurstbratgerät.
Ja
Zitat
Kann man beliebig viele animierte Battler mit dem Script erstellen?
Können wir so die Gegner ebenfalls animieren?
Ja
Und der ist vollgender maßen.
ICh habe jetzt einen Battler animiert und habe einen Kampf gestartet um zu shen wie es im Kampf aussiht.
Es klappt aber dann wenn ich einen Gegner angreife, kann es passieren dass auf einmal die target animation sowohl das Battle bild des gegners unsichtbar wird.
Und dass passiert immer anch dem Angeriff der 2 Runde.
Ich habe ein Video aufgenommen und hochgeladen.
Es liegt in der Zip.
Hoffentlich kannst du sagen wo das proplem ist.
Vielen Dank im Vorraus.
es liegt als dateianhang bei.
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Dimitri Wright« (2. November 2009, 19:27)
Benutzerinformationen überspringen
Motto: Wer anderen eine Bratwurst brät, der hat ein Bratwurstbratgerät.
Benutzerinformationen überspringen
Motto: Wer anderen eine Bratwurst brät, der hat ein Bratwurstbratgerät.
Das einzigste was verädnert wurde ist das die Battler auf den Battleback stehen.
Und wenn sie angreifen werden sie dursch die Animation und der Aktion hiddentarget ersetzt ;D
Das ist kein Script xD
Das ist nur mit aniamtionen gemacht das sie sich bewegen.
Wenn sie loslaufen und das 30 frames besitzt und am gegne rsind udn das auch 30 frames besitzt mache ich ab den ersten frame der Attacker animation eine Aktion also Hiddentarget und das dan 60 frames lang.
Also es ist nu das stinknormale KS.
Also kannst du bitte schauen ob du eine lösung hinbekommst?
Da muss es einen fehler geben dass sie immer wenn sie sterben bei dem Angriff unsichtbar werden.
Animierte Battler
kann es ein refreshfehler oder so sein?
Ich hab leider nicht viel ahnung davon xD
Benutzerinformationen überspringen
Motto: Wer anderen eine Bratwurst brät, der hat ein Bratwurstbratgerät.
So sollte es klappen:
|
|
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 |
class Sprite_Battler # Duration between Frames Animated_Battlers_Wait = 4 # Animated_Battlers = {Original Battler Name => [Frame 1, Frame 2, Frame 3, ...], ...} Animated_Battlers = {"001-Fighter01" => ["001-Fighter01", "002-Fighter02", "001-Fighter01"], "010-Lancer02" => ["011-Lancer03"]} alias_method :nb_alias_script_sprite_battler_initialize_animated_battlers, :initialize def initialize(*args) @animated_battler_index = 0 nb_alias_script_sprite_battler_initialize_animated_battlers(*args) end alias_method :nb_alias_script_sprite_battler_update_animated_battlers, :update def update nb_alias_script_sprite_battler_update_animated_battlers update_animated_battlers end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super # If battler is nil if @battler == nil self.bitmap = nil loop_animation(nil) return end if Animated_Battlers.has_key?(@battler.battler_name) update_animated_battlers else # If file name or hue are different than current ones if @battler.battler_name != @battler_name or @battler.battler_hue != @battler_hue # Get and set bitmap @battler_name = @battler.battler_name @battler_hue = @battler.battler_hue self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue) @width = bitmap.width @height = bitmap.height self.ox = @width / 2 self.oy = @height end end if @battler.battler_name != @battler_name or @battler.battler_hue != @battler_hue # Change opacity level to 0 when dead or hidden if @battler.dead? or @battler.hidden self.opacity = 0 end end # If animation ID is different than current one if @battler.damage == nil and @battler.state_animation_id != @state_animation_id @state_animation_id = @battler.state_animation_id loop_animation($data_animations[@state_animation_id]) end # If actor which should be displayed if @battler.is_a?(Game_Actor) and @battler_visible # Bring opacity level down a bit when not in main phase if $game_temp.battle_main_phase self.opacity += 3 if self.opacity < 255 else self.opacity -= 3 if self.opacity > 207 end end # Blink if @battler.blink blink_on else blink_off end # If invisible unless @battler_visible # Appear if not @battler.hidden and not @battler.dead? and (@battler.damage == nil or @battler.damage_pop) appear @battler_visible = true end end # If visible if @battler_visible # Escape if @battler.hidden $game_system.se_play($data_system.escape_se) escape @battler_visible = false end # White flash if @battler.white_flash whiten @battler.white_flash = false end # Animation if @battler.animation_id != 0 animation = $data_animations[@battler.animation_id] animation(animation, @battler.animation_hit) @battler.animation_id = 0 end # Damage if @battler.damage_pop damage(@battler.damage, @battler.critical) @battler.damage = nil @battler.critical = false @battler.damage_pop = false end # Collapse if @battler.damage == nil and @battler.dead? if @battler.is_a?(Game_Enemy) $game_system.se_play($data_system.enemy_collapse_se) else $game_system.se_play($data_system.actor_collapse_se) end collapse @battler_visible = false end end # Set sprite coordinates self.x = @battler.screen_x self.y = @battler.screen_y self.z = @battler.screen_z end def update_animated_battlers battlers = Animated_Battlers[@battler.battler_name] @animated_battler_index += (1.0/Animated_Battlers_Wait) @animated_battler_index %= battlers.size filename = battlers[@animated_battler_index.to_i] if filename != @battler_name @battler_name = filename @battler_hue = @battler.battler_hue self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue) end @width = bitmap.width @height = bitmap.height self.ox = @width / 2 self.oy = @height end end |
Ich mach es anders, ich lade das Pojekt hoch,habe es verkleinert und schicke es dir per pm, damit du es dir ansehen kannst
wäre das so in ordnung?
p.s habe es dir per pm geschickt, aber eien stark gekürzte Version
Benutzerinformationen überspringen
Motto: Wer anderen eine Bratwurst brät, der hat ein Bratwurstbratgerät.
@ Dimitri:
|
|
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 |
class Sprite_Battler # Duration between Frames Animated_Battlers_Wait = 6 # Animated_Battlers = {Original Battler Name => [Frame 1, Frame 2, Frame 3, ...], ...} Animated_Battlers = {"s1" => ["s2","s3","s4","s5"], "käfer1" => ["käfer2","käfer3","käfer4","käfer5","käfer1","käfer1"], "Amy1" => ["Amy2","Amy3","Amy4","Amy5","Amy4","Amy3"],} alias_method :nb_alias_script_sprite_battler_initialize_animated_battlers, :initialize def initialize(*args) @animated_battler_index = 0 nb_alias_script_sprite_battler_initialize_animated_battlers(*args) end alias_method :nb_alias_script_sprite_battler_update_animated_battlers, :update def update nb_alias_script_sprite_battler_update_animated_battlers update_animated_battlers end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super # If battler is nil if @battler == nil self.bitmap = nil loop_animation(nil) return end if Animated_Battlers.has_key?(@battler.battler_name) and !(@battler.dead? or @battler.hidden) update_animated_battlers else # If file name or hue are different than current ones if @battler.battler_name != @battler_name or @battler.battler_hue != @battler_hue # Get and set bitmap @battler_name = @battler.battler_name @battler_hue = @battler.battler_hue self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue) @width = bitmap.width @height = bitmap.height self.ox = @width / 2 self.oy = @height end end if (@battler.battler_name != @battler_name or @battler.battler_hue != @battler_hue) and (@battler.dead? or @battler.hidden) self.opacity = 0 end # If animation ID is different than current one if @battler.damage == nil and @battler.state_animation_id != @state_animation_id @state_animation_id = @battler.state_animation_id loop_animation($data_animations[@state_animation_id]) end # If actor which should be displayed if @battler.is_a?(Game_Actor) and @battler_visible # Bring opacity level down a bit when not in main phase if $game_temp.battle_main_phase self.opacity += 3 if self.opacity < 255 else self.opacity -= 3 if self.opacity > 207 end end # Blink if @battler.blink blink_on else blink_off end # If invisible unless @battler_visible # Appear if not @battler.hidden and not @battler.dead? and (@battler.damage == nil or @battler.damage_pop) appear @battler_visible = true end end # If visible if @battler_visible # Escape if @battler.hidden $game_system.se_play($data_system.escape_se) escape @battler_visible = false end # White flash if @battler.white_flash whiten @battler.white_flash = false end # Animation if @battler.animation_id != 0 animation = $data_animations[@battler.animation_id] animation(animation, @battler.animation_hit) @battler.animation_id = 0 end # Damage if @battler.damage_pop damage(@battler.damage, @battler.critical) @battler.damage = nil @battler.critical = false @battler.damage_pop = false end # Collapse if @battler.damage == nil and @battler.dead? if @battler.is_a?(Game_Enemy) $game_system.se_play($data_system.enemy_collapse_se) else $game_system.se_play($data_system.actor_collapse_se) end collapse @battler_visible = false end end # Set sprite coordinates self.x = @battler.screen_x self.y = @battler.screen_y self.z = @battler.screen_z end def update_animated_battlers battlers = Animated_Battlers[@battler.battler_name] @animated_battler_index += (1.0/Animated_Battlers_Wait) @animated_battler_index %= battlers.size filename = battlers[@animated_battler_index.to_i] if filename != @battler_name @battler_name = filename @battler_hue = @battler.battler_hue self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue) end @width = bitmap.width @height = bitmap.height self.ox = @width / 2 self.oy = @height end end |
Ähnliche Themen
-
Archiv Spielvorstellungen »-
RmXP_Party Vol.1 [für Mario Party Fans]
(23. März 2006, 22:09)

