Ogłoszenie 

Uwaga! To forum jest w trybie offline.
Wszelką pomoc uzyskasz pod adresem
forum.ultimateam.pl


Administracja Forum


Poprzedni temat «» Następny temat
Zamknięty przez: Nhadala
Wto 02 Mar, 2010 16:19
Tryb Walki
Autor Wiadomość
Firestorm109 



Dołączyła: 28 Lut 2010
Posty: 66
Skąd: Polska a jak :D
Wysłany: Wto 02 Mar, 2010 14:40
Tryb Walki
Witam

zauważyłam w niektórych grach tryb walki zwany "SSVBS"
wygląda on tak :
Spoiler:




oraz na tym filmie : http://www.youtube.com/watch?v=k37iol3u8sg

chciała bym wiedzieć czy ktoś mógłby "podzielić się " wiedzą jak zrobić taki tryb walki ?
w mojej grze chciałam dodać ten tryb walki lecz nie mogę znaleźć nigdzie skryptu ...
czy mógłby ktoś wstawić go tu ?
była bym bardzo wdzięczna :jupi:
Ostatnio zmieniony przez Nhadala Wto 02 Mar, 2010 16:18, w całości zmieniany 1 raz  
 
 
 
Melvin 




Preferowany:
RPG Maker XP

Ranga RM:
1 gra

Pomógł: 35 razy
Dołączył: 23 Paź 2009
Posty: 1063
Wysłany: Wto 02 Mar, 2010 15:22
Umieść ten skrypt nad Main:
Spoiler:

Cytat:
#==============================================================================
# ** Simple Side View Battle System (08-06-2008) by DarkCloud
#------------------------------------------------------------------------------
# * Konfiguracja
#==============================================================================

#===========================================================================
# * Battle arrow
#===========================================================================
CBS_ARROW_X = 50 # Pozycja strzałki w osi X
CBS_ARROW_Y = 45 # Pozycja strzałki w osi Y
#===========================================================================
# * Ustawienia szybkości, klatek animacji, oraz póz battlera
#===========================================================================
CBS_SPEED = 8 # Szybkość animacji
CBS_FRAMES = 4 # Ilość klatek animacji
CBS_POSES = 10 # Ilość póz battlera
#===========================================================================
# * Indywidualne ustawienia
#===========================================================================
CBS_ACTOR_FRAMES = nil # {ID => Liczba klatek animacji} Przykład {1 => 6}
# czyli aktor o ID 1 ma 6 klatek animacji
# Przykład2 {1 => 6, 2 => 8} aktor o ID 1 ma 6 klatek
# animacji, zaś aktor o ID 2 ma 8 klatek animacji

CBS_ENEMY_FRAMES = nil # To co wyżej tyle że dla wroga
CBS_ACTOR_POSES = nil # {ID => Liczba póz battlera}
CBS_ENEMY_POSES = nil
#===========================================================================
# * Ilość klatek animacji dla poszczególnych pozycji
#===========================================================================
CBS_FRAMES_PER_POSE = {} # {NR Pozycji => Liczba klatek animacji}

CBS_ACTOR_FRAMES_PER_POSE = {} # {ID Aktora => {NR Pozycji => Liczba klatek animacji}}
# Przykład {1 => {1 => 6, 2 => 8}} Aktor o ID 1
# ma 6 klatek animacji dla pozycji nr 1, zaś dla
# pozycji nr 2 ma 8.
# Przykład2 {1 => {1 => 6, 2 => 8}, 2 => {4 => 5}}
# Aktor o ID 1 ma 6 klatek animacji dla pozycji
# nr 1, zaś dla pozycji nr 2 ma 8. Aktor o ID 2
# ma 5 klatek animacji dla pozycji 4

CBS_ENEMY_FRAMES_PER_POSE = {} # To co wyżej tyle że dla wroga

#==============================================================================
# ** Game_Battler
#==============================================================================

class Game_Battler
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :sprite
end

#==============================================================================
# ** Game_Actor
#==============================================================================

class Game_Actor
#--------------------------------------------------------------------------
# * Actor X Coordinate
#--------------------------------------------------------------------------
def screen_x
if self.index != nil
return self.index + 550
else
return 0
end
end
#--------------------------------------------------------------------------
# * Actor Y Coordinate
#--------------------------------------------------------------------------
def screen_y
if $game_party.actors.size == 1
return self.index * 40 + 240
end
if $game_party.actors.size == 2
return self.index * 40 + 220
end
if $game_party.actors.size == 3
return self.index * 40 + 200
end
if $game_party.actors.size == 4
return self.index * 40 + 180
end
end
#--------------------------------------------------------------------------
# * Actor Z Coordinate
#--------------------------------------------------------------------------
def screen_z
return screen_y
end
end

#==============================================================================
# ** Sprite_Battler
#==============================================================================

class Sprite_Battler < RPG::Sprite
#--------------------------------------------------------------------------
# * Initialize
#--------------------------------------------------------------------------
alias tsot_initialize initialize
def initialize(viewport, battler = nil)
@frame, @pose, @last_time, @last_move_time = 0, 0, 0, 0
tsot_initialize(viewport, battler)
viewport.z = 99
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
alias tsot_update update
def update
return unless @battler
tsot_update
pose_temp = {}
unless @started
if @battler.is_a?(Game_Enemy)
@width = @width / cell_divider(CBS_ENEMY_FRAMES, CBS_FRAMES)
@height = @height / cell_divider(CBS_ENEMY_POSES, CBS_POSES)
else
@width = @width / cell_divider(CBS_ACTOR_FRAMES, CBS_FRAMES)
@height = @height / cell_divider(CBS_ACTOR_POSES, CBS_POSES)
end
@display_x = @battler.screen_x
@display_y = @battler.screen_y
@destination_x = @display_x
@destination_y = @display_y
end
self.src_rect.set(@width * @frame, @height * @pose, @width, @height)
self.mirror = @battler.is_a?(Game_Enemy) unless @started
self.x = @display_x
self.y = @display_y
self.z = @display_y
self.ox = @width / 2
self.oy = @height
poseframe = CBS_FRAMES
if @battler.is_a?(Game_Actor)
poseframe = cell_divider(CBS_ACTOR_FRAMES, CBS_FRAMES) if cell_divider(CBS_ACTOR_FRAMES, CBS_FRAMES) != nil
else
poseframe = cell_divider(CBS_ENEMY_FRAMES, CBS_FRAMES) if cell_divider(CBS_ENEMY_FRAMES, CBS_FRAMES) != nil
end
pose_chk = 0
pose_chk = @pose+1 if @pose != nil
poseframe = CBS_FRAMES_PER_POSE[pose_chk] if CBS_FRAMES_PER_POSE.include?(pose_chk)
if @battler.is_a?(Game_Actor)
pose_temp = CBS_ACTOR_FRAMES_PER_POSE[@battler.id] if CBS_ACTOR_FRAMES_PER_POSE.include?(@battler.id)
poseframe = pose_temp[pose_chk] if pose_temp.include?(pose_chk)
end
if @battler.is_a?(Game_Enemy)
pose_temp = CBS_ENEMY_FRAMES_PER_POSE[@battler.id] if CBS_ENEMY_FRAMES_PER_POSE.include?(@battler.id)
poseframe = pose_temp[pose_chk] if pose_temp.include?(pose_chk)
end
unless @battler.dead?
self.visible = true if @pose == 0
@freeze = false
end
time = Graphics.frame_count / (Graphics.frame_rate / CBS_SPEED)
if @last_time < time
@frame = (@frame + 1) % poseframe
if @frame == 0 or @reload
if @freeze
@frame = poseframe - 1
return
end
@pose = state
end
end
@last_time = time
move if moving
@started = true
end
#--------------------------------------------------------------------------
# * Current State
#--------------------------------------------------------------------------
def state
# Damage State
if [nil,{}].include?(@battler.damage)
# Fine
@state = 0
# Wounded
@state = 2 if @battler.hp < @battler.maxhp / 4
# Dead
@state = 9 if @battler.dead?
@freeze = true if @battler.dead?
end
# Guarding
@state = 3 if @battler.guarding?
# Moving
if moving
if @battler.is_a?(Game_Enemy)
@state = 5 if moving.eql?(0)
@state = 4 if moving.eql?(1)
else
@state = 4 if moving.eql?(0)
@state = 5 if moving.eql?(1)
end
end
return @state
end
#--------------------------------------------------------------------------
# * Move
#--------------------------------------------------------------------------
def move
time = Graphics.frame_count / (Graphics.frame_rate.to_f / (CBS_SPEED * 5))
if @last_move_time < time
return if @pose != state
difference_x = (@display_x - @destination_x).abs
difference_y = (@display_y - @destination_y).abs
if [difference_x, difference_y].max.between?(0, 8)
@display_x = @destination_x
@display_y = @destination_y
@pose = state
return
end
increment_x = increment_y = 1
if difference_x < difference_y
increment_x = 1.0 / (difference_y.to_f / difference_x)
elsif difference_y < difference_x
increment_y = 1.0 / (difference_x.to_f / difference_y)
end
multiplier_x = (@destination_x - @display_x > 0 ? 8 : -8)
multiplier_y = (@destination_y - @display_y > 0 ? 8 : -8)
@display_x += (increment_x * multiplier_x).to_i
@display_y += (increment_y * multiplier_y).to_i
end
@last_move_time = time
end
#--------------------------------------------------------------------------
# * Set Movement
#--------------------------------------------------------------------------
def setmove(destination_x, destination_y)
@original_x = @display_x
@original_y = @display_y
@destination_x = destination_x
@destination_y = destination_y
end
#--------------------------------------------------------------------------
# * Movement Check
#--------------------------------------------------------------------------
def moving
if (@display_x != @destination_x and @display_y != @destination_y)
return (@display_x > @destination_x ? 0 : 1)
end
end
#--------------------------------------------------------------------------
# * Set Pose
#--------------------------------------------------------------------------
def pose=(pose)
@pose = pose
@frame = 0
end
#--------------------------------------------------------------------------
# * Freeze
#--------------------------------------------------------------------------
def freeze
@freeze = true
end
#--------------------------------------------------------------------------
# * Cell Divider
# divider_check : array to divide cells by custom actor or enemy
# divider_standard : standard number to divide by
#--------------------------------------------------------------------------
def cell_divider(divider_check, divider_standard)
dcheck = {}
divided_cell = divider_standard
dcheck = divider_check
if dcheck != nil
if dcheck.include?(@battler.id)
divided_cell = dcheck[@battler.id] if dcheck[@battler.id] != nil
end
end
return divided_cell
end
#--------------------------------------------------------------------------
# * Fallen Pose
#--------------------------------------------------------------------------
alias tsot_collapse collapse
def collapse
if @battler.is_a?(Game_Enemy)
return
end
tsot_collapse
end
end

#==============================================================================
# ** Spriteset_Battle
#------------------------------------------------------------------------------
# This class brings together battle screen sprites. It's used within
# the Scene_Battle class.
#==============================================================================

class Spriteset_Battle
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias tsot_initialize initialize
def initialize
tsot_initialize
# Make enemy sprites
@enemy_sprites = []
for enemy in $game_troop.enemies.reverse
enemy.sprite = Sprite_Battler.new(@viewport2, enemy)
@enemy_sprites.push(enemy.sprite)
end
# Make actor sprites
@actor_sprites = []
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
alias tsot_update update
def update
tsot_update
for sprite in @actor_sprites
if sprite.battler
sprite.battler.sprite = sprite
end
end
end
end

#==============================================================================
# ** Arrow_Base
#------------------------------------------------------------------------------
# This sprite is used as an arrow cursor for the battle screen. This class
# is used as a superclass for the Arrow_Enemy and Arrow_Actor classes.
#==============================================================================

class Arrow_Base < Sprite
#--------------------------------------------------------------------------
# * Object Initialization
# viewport : viewport
#--------------------------------------------------------------------------
alias tsot_initialize initialize
def initialize(viewport)
tsot_initialize(viewport)
self.ox = CBS_ARROW_X
self.oy = CBS_ARROW_Y
end
end

#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
# This class performs battle screen processing.
#==============================================================================

class Scene_Battle
#--------------------------------------------------------------------------
# * Action Animation, Movement
#--------------------------------------------------------------------------
alias tsot_update_phase4_step3 update_phase4_step3
def update_phase4_step3(battler = @active_battler)
target = @target_battlers[0]
@moved = {} unless @moved
return if battler.sprite.moving
case battler.current_action.kind
when 0 # Attack
if not (@moved[battler] or battler.guarding?)
offset = (battler.is_a?(Game_Actor) ? 40 : -40)
battler.sprite.setmove(target.screen_x + offset, target.screen_y)
@moved[battler] = true
return
elsif not battler.guarding?
battler.sprite.pose = 6
battler.sprite.setmove(battler.screen_x, battler.screen_y)
end
when 1 # Skill
battler.sprite.pose = 8
when 2 # Item
battler.sprite.pose = 7
end
@moved[battler] = false
tsot_update_phase4_step3
end
#--------------------------------------------------------------------------
# * Hit Anim
#--------------------------------------------------------------------------
alias tsot_update_phase4_step4 update_phase4_step4
def update_phase4_step4(battler = @active_battler)
for target in @target_battlers
if target.damage.is_a?(Numeric) and target.damage > 0
target.sprite.pose = 1
end
end
tsot_update_phase4_step4
end
#--------------------------------------------------------------------------
# * Victory
#--------------------------------------------------------------------------
alias tsot_start_phase5 start_phase5
def start_phase5
for actor in $game_party.actors
return if actor.sprite.moving
end
tsot_start_phase5
end
#--------------------------------------------------------------------------
# * Arrow Viewport
#--------------------------------------------------------------------------
alias tsot_start_enemy_select start_enemy_select
def start_enemy_select
tsot_start_enemy_select
@enemy_arrow.dispose
@enemy_arrow = Arrow_Enemy.new(@spriteset.viewport2)
@enemy_arrow.help_window = @help_window
end
end

________________________
MelvinClass:
Spoiler:

 
 
Firestorm109 



Dołączyła: 28 Lut 2010
Posty: 66
Skąd: Polska a jak :D
Wysłany: Wto 02 Mar, 2010 15:26
Działa :jupi: wszyściutko działa .... wielki thx :)
 
 
 
Wyświetl posty z ostatnich:   
Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Nie możesz załączać plików na tym forum
Możesz ściągać załączniki na tym forum
Dodaj temat do Ulubionych
Wersja do druku

Skocz do:  

Powered by phpBB modified by Przemo © 2003 phpBB Group | Template Klam by Ayene