RM-Land : le forum
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.



Bienvenue sur RM-Land : Le forum !
Après votre inscription, vous aurez accès à tout le forum : Partage de ressources, de scripts, résolution de vos problèmes, présentations de projets et montage de teams.
 
AccueilLe sitePortailDernières imagesRechercherS'enregistrerConnexion
-39%
Le deal à ne pas rater :
Pack Home Cinéma Magnat Monitor : Ampli DENON AVR-X2800H, Enceinte ...
1190 € 1950 €
Voir le deal

 

 Combat animé

Aller en bas 
2 participants
AuteurMessage
Invité
Invité




Combat animé Empty
MessageSujet: Combat animé   Combat animé Icon_minitimeMer 22 Aoû - 18:36

Script fonctionnel
Auteur:???
Ressources:aucunes

Se script n'est fait que pour les combats, enfait pendant les combats l'écran bouge, je ne peux vous mettre de screen car sa ne servirais à rien^^ à vous de me dire si vous aimez ^^

Utilisation:
Créer un nouveau script au dessus de "main" puis nommez le "New_BattleMove"

Ensuite collez le code si dessous:
Code:
#============================================
# ¡ Game_Battler
#============================================
class Game_Battler
#------------------------------------------
attr_accessor :x_pos # ƒoƒgƒ‹ƒtƒB[ƒ‹ƒh@‰¡@ˆÊ’u(+‚ª‰E@)
attr_accessor :y_pos # ƒoƒgƒ‹ƒtƒB[ƒ‹ƒh ‚‚³ ˆÊ’u(+‚ªã@)
attr_accessor :z_pos # ƒoƒgƒ‹ƒtƒB[ƒ‹ƒh‰œs‚«ˆÊ’u(+‚ªŽè‘O)
attr_accessor :zoom # Œ»Ý‚̃Y[ƒ€”{—¦
end
#============================================
# ¡ Game_Actor
#============================================
class Game_Actor < Game_Battler
#------------------------------------------
attr_reader :actor_in_battlefield # ƒAƒNƒ^[‚àƒtƒB[ƒ‹ƒh‚É
#------------------------------------------
alias xrxs_bp8_setup setup
def setup(actor_id)
xrxs_bp8_setup(actor_id)
# ‹@”"ƒAƒNƒ^[‚àƒtƒB[ƒ‹ƒh‚É"
# true‚ð—Dæ‚·‚é
@actor_in_battlefield = false if @actor_in_battlefield != true
end
end
#============================================
# ¡ Game_Enemy
#============================================
class Game_Enemy < Game_Battler
#------------------------------------------
attr_reader :actor_in_battlefield # ƒAƒNƒ^[‚àƒtƒB[ƒ‹ƒh‚É
#------------------------------------------
alias xrxs_bp8_initialize initialize
def initialize(troop_id, member_index)
@actor_in_battlefield = false
@x_pos = $data_troops[troop_id].members[member_index].x - 320
@y_pos = -($data_troops[troop_id].members[member_index].y - 304)
@field_x_offset = -192
@field_y_offset = -144
@z_pos = 0
@zoom = 1.00
xrxs_bp8_initialize(troop_id, member_index)
end
#------------------------------------------
def screen_x
$xcam_x = 0 if $xcam_x == nil
return 320 - @field_x_offset + (@x_pos.to_i - $xcam_x) * @zoom
end
#------------------------------------------
def screen_y
$xcam_y = 0 if $xcam_y == nil
return 240 - @field_y_offset + (-@y_pos.to_i + 64 + $xcam_y) * @zoom
end
end
#============================================
# ¡ Sprite_Battler
#============================================
class Sprite_Battler < RPG::Sprite
#------------------------------------------
alias xrxs_bp8_update update
def update
# ‰Šú‰»
@z_offset = 0
# –ß‚·
xrxs_bp8_update
# ƒoƒgƒ‰[‚ª nil ‚̏ꍇ–ß‚é
return if @battler == nil
# “G‚݂̂ɃJƒƒ‰‚ª‰e‹¿B
# Œ©•û‚àƒoƒgƒ‹ƒtƒB[ƒ‹ƒh‚É‚¢‚éê‡‚±‚±‚Ì if ‚ðŠO‚·B
if (@battler.is_a?(Game_Actor) and @battler.actor_in_battlefield) or @battler.is_a?(Game_Enemy)
# ƒY[ƒ€—¦
zoom = 1.00 * 185 / (($xcam_z != nil ? $xcam_z : 185) - @z_offset)
self.zoom_x = zoom
self.zoom_y = zoom
@battler.zoom = zoom
# ƒXƒvƒ‰ƒCƒg‚̍À•W‚ðÝ’è
self.x = @battler.screen_x
self.y = @battler.screen_y
self.z = @battler.screen_z
end
end
end
#============================================
# ¡ Spriteset_Battle
#============================================
class Spriteset_Battle
#------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#------------------------------------------
alias xrxs_bp8_initialize initialize
def initialize
# ‰Šú‰»
@now_bg_x = -1
@now_bg_y = -1
@now_bg_z = -1
# ’ʏ펞‚ÌŽÀs
xrxs_bp8_initialize
# ƒrƒ…[ƒ|[ƒg‚ðì¬
@viewport1 = Viewport.new(-192, -144, 1024, 768)
# ƒoƒgƒ‹ƒoƒbƒNƒXƒvƒ‰ƒCƒg‚ðì¬
@battleback_sprite = Sprite.new(@viewport1)
@battleback_name = ""
# ƒGƒlƒ~[ƒXƒvƒ‰ƒCƒg‚ðì¬
@enemy_sprites = []
for enemy in $game_troop.enemies.reverse
@enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
end
# “VŒó‚ðì¬
@weather = RPG::Weather.new(@viewport1)
# ƒtƒŒ[ƒ€XV
update
end
#------------------------------------------
# œ ƒtƒŒ[ƒ€XV
#------------------------------------------
alias xrxs_bp8_update update
def update
# ƒoƒgƒ‹ƒoƒbƒN‚̃tƒ@ƒCƒ‹–¼‚ªŒ»Ý‚Ì‚à‚̂ƈႤê‡
if @battleback_name != $game_temp.battleback_name
@battleback_name = $game_temp.battleback_name
if @battleback_sprite.bitmap != nil
@battleback_sprite.bitmap.dispose
end
bg_bitmap = RPG::Cache.battleback(@battleback_name)
bg_bitmap_stretch = Bitmap.new(1024, 768)
bg_bitmap_stretch.stretch_blt(Rect.new(0, 0, 1024, 768), bg_bitmap, bg_bitmap.rect)
@battleback_sprite.bitmap = bg_bitmap_stretch
end
# ƒJƒƒ‰ˆÊ’u‚ª“®‚¢‚½ê‡
if @now_bg_x != $xcam_x or @now_bg_y != $xcam_y or @now_bg_z != $xcam_z
# ƒY[ƒ€—¦
zoom = 1.00 * 185 / $xcam_z
@battleback_sprite.zoom_x = zoom
@battleback_sprite.zoom_y = zoom
# ƒJƒƒ‰z‚É‚æ‚éˆÊ’u‚̏C³
maximum = 192 * (296 - $xcam_z) / 111
$xcam_x = [[$xcam_x, -maximum].max, maximum].min
# ”wŒiˆÊ’uXV
@battleback_sprite.x = -$xcam_x * zoom - 512 * (zoom - 1)
@battleback_sprite.y = $xcam_y * zoom - 384 * (zoom - 1)
# ’lXV
@now_bg_x = $xcam_x
@now_bg_y = $xcam_y
@now_bg_z = $xcam_z
end
# –ß‚·
xrxs_bp8_update
end
end
#============================================
# ¡ Scene_Battle
#============================================
class Scene_Battle
#------------------------------------------
# œ ƒƒCƒ“ˆ—
#------------------------------------------
alias xrxs_bp8_main main
def main
# ƒJƒƒ‰‰ŠúˆÊ’uŒˆ’è
$xcam_x = 0
$xcam_y = 0
$xcam_z = 295
# ƒJƒƒ‰‚̍ŏ‰‚Ì–Ú“I’l
@xcam_x_destination = 0
@xcam_y_destination = 0
@xcam_z_destination = 185
# ¡A’–Úƒoƒgƒ‰[‚Í–³‚µB
@xcam_watch_battler = nil
# ‰Šú‰»
@wait_count_xcam = 0
# –ß‚·
xrxs_bp8_main
end
#------------------------------------------
# œ ƒtƒŒ[ƒ€XV
#------------------------------------------
alias xrxs_bp8_update update
def update
# ƒJƒƒ‰ˆÊ’u‚̍XVB
if @wait_count_xcam > 0
# ƒEƒFƒCƒgƒJƒEƒ“ƒg‚ðŒ¸‚ç‚·
@wait_count_xcam -= 1
else
# ƒJƒƒ‰: Z À•W
if $xcam_z != @xcam_z_destination
if $xcam_z < @xcam_z_destination
distance = [(@xcam_z_destination - $xcam_z)/8, 1].max
else
distance = [(@xcam_z_destination - $xcam_z)/8, -1].min
end
$xcam_z = [[$xcam_z + distance, 74].max, 296].min
end
# ƒJƒƒ‰: X À•W
if @xcam_watch_battler != nil
if $xcam_x != @xcam_watch_battler.x_pos
if ($xcam_x - @xcam_watch_battler.x_pos).abs < 8
distance = @xcam_watch_battler.x_pos - $xcam_x
elsif $xcam_x < @xcam_watch_battler.x_pos
distance = [(@xcam_watch_battler.x_pos - $xcam_x)/8, 8].max
else
distance = [(@xcam_watch_battler.x_pos - $xcam_x)/8, -8].min
end
maximum = 192 * (296 - $xcam_z) / 111
$xcam_x = [[$xcam_x + distance, -maximum].max, maximum].min
end
elsif $xcam_x != @xcam_x_destination
if ($xcam_x - @xcam_x_destination).abs < 8
distance = @xcam_x_destination - $xcam_x
elsif $xcam_x < @xcam_x_destination
distance = [(@xcam_x_destination - $xcam_x)/8, 8].max
else
distance = [(@xcam_x_destination - $xcam_x)/8, -8].min
end
maximum = 192 * (296 - $xcam_z) / 111
$xcam_x = [[$xcam_x + distance, -maximum].max, maximum].min
end
# ƒJƒƒ‰: Y À•W
if @xcam_watch_battler != nil
y = @xcam_watch_battler.y_pos/2
if $xcam_y != y
if ($xcam_y - y).abs < 8
distance = y - $xcam_y
elsif $xcam_y < y
distance = [(y - $xcam_y)/8, 8].max
else
distance = [(y - $xcam_y)/8, -8].min
end
maximum = 144 * (296 - $xcam_z) / 111
$xcam_y = [[$xcam_y + distance, -maximum].max, maximum].min
end
elsif $xcam_y != @xcam_y_destination
if $xcam_y < @xcam_y_destination
distance = [(@xcam_y_destination - $xcam_y)/8, 1].max
else
distance = [(@xcam_y_destination - $xcam_y)/8, -1].min
end
maximum = 164 * (296 - $xcam_z) / 111
$xcam_y = [[$xcam_y + distance, -maximum].max, maximum].min
end
end
# ’ʏíŽÀs
xrxs_bp8_update
end
#------------------------------------------
# œ ƒp[ƒeƒBƒRƒ}ƒ“ƒhƒtƒF[ƒYŠJŽn
#------------------------------------------
alias xrxs_bp8_start_phase2 start_phase2
def start_phase2
# ƒJƒƒ‰FƒZƒ“ƒ^ƒŠƒ“ƒO
@xcam_watch_battler = nil
@xcam_x_destination = 0
@xcam_z_destination = 185
# –ß‚·
xrxs_bp8_start_phase2
end
#------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒtƒF[ƒY)
#------------------------------------------
alias xrxs_bp8_update_phase3 update_phase3
def update_phase3
# ƒJƒƒ‰‚ðƒLƒƒƒ‰ˆÊ’u‚Ö
if @active_battler != nil and @active_battler.actor_in_battlefield
@xcam_x_destination = @active_battler.x_pos
@xcam_z_destination = 175
end
xrxs_bp8_update_phase3
end
#------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒtƒF[ƒY : ƒGƒlƒ~[‘I‘ð)
#------------------------------------------
alias xrxs_bp8_update_phase3_enemy_select update_phase3_enemy_select
def update_phase3_enemy_select
# ƒJƒƒ‰F“Gƒ^[ƒQƒbƒg‚ðƒY[ƒ€ƒAƒbƒv
@xcam_x_destination = $game_troop.enemies[@enemy_arrow.index].x_pos * $game_troop.enemies[@enemy_arrow.index].zoom
@xcam_z_destination = 175
# –ß‚·
xrxs_bp8_update_phase3_enemy_select
end
#------------------------------------------
# œ ƒGƒlƒ~[‘I‘ðI—¹
#------------------------------------------
alias xrxs_bp8_end_enemy_select end_enemy_select
def end_enemy_select
# ƒJƒƒ‰F’†S‚Ö
@xcam_x_destination = 0
@xcam_z_destination = 185
# –ß‚·
xrxs_bp8_end_enemy_select
end
#------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒƒCƒ“ƒtƒF[ƒY ƒXƒeƒbƒv 2 : ƒAƒNƒVƒ‡ƒ“ŠJŽn)
#------------------------------------------
alias xrxs_bp8_update_phase4_step2 update_phase4_step2
def update_phase4_step2
# –ß‚·
xrxs_bp8_update_phase4_step2
# ƒXƒeƒbƒv 3 ‚Ɉڍs‚·‚éê‡
if @phase4_step == 3
if @active_battler.is_a?(Game_Enemy) or @active_battler.actor_in_battlefield
# ƒJƒƒ‰Fs“®ƒoƒgƒ‰[‚ւ̃Y[ƒ€ƒAƒbƒv‚ð—–ñ
@xcam_x_destination = @active_battler.x_pos * @active_battler.zoom if @active_battler.x_pos != nil
@xcam_z_destination = 175
end
# Å’á 20 ƒtƒŒ[ƒ€‘Ò‚Â
@wait_count = 20
end
end
#------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒƒCƒ“ƒtƒF[ƒY ƒXƒeƒbƒv 3 : s“®‘¤ƒAƒjƒ[ƒVƒ‡ƒ“)
#------------------------------------------
alias xrxs_bp8_update_phase4_step3 update_phase4_step3
def update_phase4_step3
# –ß‚·
xrxs_bp8_update_phase4_step3
if @target_battlers.size > 0 and
(@target_battlers[0].is_a?(Game_Enemy) or @target_battlers[0].actor_in_battlefield)
# ƒJƒƒ‰Fƒ^[ƒQƒbƒg‚ւ̃Y[ƒ€ƒAƒbƒv‚ð—–ñ
@xcam_x_destination = @target_battlers[0].x_pos * @target_battlers[0].zoom if @target_battlers[0] != nil
@xcam_z_destination = 185
# ‚à‚µ‘ΏۃAƒjƒ‚ªuˆÊ’uF‰æ–ʁv‚Ì‚à‚̂̏ꍇ
if @animation2_id > 0 and $data_animations[@animation2_id].position == 3
# ƒJƒƒ‰‚ðƒZƒ“ƒ^ƒŠƒ“ƒO
@xcam_x_destination = 0
# ƒY[ƒ€ƒAƒEƒg‚Ü‚Å‚â‚Á‚¿‚Ⴄ¥w¥
@xcam_z_destination = 222
end
end
# Å’á 20 ƒtƒŒ[ƒ€‘Ò‚Â
@wait_count = 20
end
#------------------------------------------
# œ ƒAƒtƒ^[ƒoƒgƒ‹ƒtƒF[ƒYŠJŽn
#------------------------------------------
alias xrxs_bp8_start_phase5 start_phase5
def start_phase5
@xcam_z_destination = 185
xrxs_bp8_start_phase5
end
end
#============================================
# ž RPG::Ä’è‹`uí“¬’†‚Ì"‰æ–Ê"ƒAƒjƒ‚̈ʒuC³v
#============================================
module RPG
class Sprite < ::Sprite
def animation_set_sprites(sprites, cell_data, position)
for i in 0..15
sprite = sprites[i]
pattern = cell_data[i, 0]
if sprite == nil or pattern == nil or pattern == -1
sprite.visible = false if sprite != nil
next
end
sprite.visible = true
sprite.src_rect.set(pattern % 5 * 192, pattern / 5 * 192, 192, 192)
if position == 3
if self.viewport != nil
if $scene.is_a?(Scene_Battle)
sprite.x = self.viewport.rect.width / 2
sprite.y = 304
else
sprite.x = self.viewport.rect.width / 2
sprite.y = self.viewport.rect.height - 160
end
else
sprite.x = 320
sprite.y = 240
end
else
sprite.x = self.x - self.ox + self.src_rect.width / 2
sprite.y = self.y - self.oy + self.src_rect.height / 2
sprite.y -= self.src_rect.height / 4 if position == 0
sprite.y += self.src_rect.height / 4 if position == 2
end
sprite.x += cell_data[i, 1]
sprite.y += cell_data[i, 2]
sprite.z = 2000
sprite.ox = 96
sprite.oy = 96
sprite.zoom_x = cell_data[i, 3] / 100.0
sprite.zoom_y = cell_data[i, 3] / 100.0
sprite.angle = cell_data[i, 4]
sprite.mirror = (cell_data[i, 5] == 1)
sprite.opacity = cell_data[i, 6] * self.opacity / 255.0
sprite.blend_type = cell_data[i, 7]
end
end
end
end

Et voilà le script est terminer des commentaires svp^^
Revenir en haut Aller en bas
Sam-rpg
Administrateur
Administrateur
Sam-rpg


Nombre de messages : 2492
Age : 30
Localisation : Bayonne
Date d'inscription : 01/05/2007

Combat animé Empty
MessageSujet: Re: Combat animé   Combat animé Icon_minitimeMer 22 Aoû - 20:41

Je l'avais déjà. Il est vraiment bien. Je pense que je vais le prendre pour Voyage dans le temps.
Ca change du sysème de combat ordinaire, mais sans trop s'en éloigner. Combat animé 770429
Revenir en haut Aller en bas
http://rmland.free.fr
Invité
Invité




Combat animé Empty
MessageSujet: Re: Combat animé   Combat animé Icon_minitimeDim 24 Fév - 6:26

que change t'il, un sceen plz?
Revenir en haut Aller en bas
Shikamaru
Designer
Designer
Shikamaru


Nombre de messages : 1560
Age : 31
Localisation : Tunisie > Mon ordinateur > RM LAND
Date d'inscription : 31/12/2007

Combat animé Empty
MessageSujet: Re: Combat animé   Combat animé Icon_minitimeDim 24 Fév - 13:28

Merci pour ce script c'est assez bon, je l'utiliserai pour mon projet.
Merci silfer
Revenir en haut Aller en bas
Invité
Invité




Combat animé Empty
MessageSujet: Re: Combat animé   Combat animé Icon_minitimeMar 26 Fév - 15:21

Ses un bon script Combat animé 770429 Je vais peut être le prendre et le tester et si il est vraiment bien je le prendrait pour mon projet Combat animé 312738
Revenir en haut Aller en bas
Invité
Invité




Combat animé Empty
MessageSujet: Re: Combat animé   Combat animé Icon_minitimeMar 26 Fév - 16:02

Pour pokemon ca peut donner bien...A tester.
Revenir en haut Aller en bas
Invité
Invité




Combat animé Empty
MessageSujet: Re: Combat animé   Combat animé Icon_minitimeMar 26 Fév - 20:20

Un petit screen pour tout le monde serais bien^^

(j'en dit pas plus pour l'instant!)
Revenir en haut Aller en bas
Invité
Invité




Combat animé Empty
MessageSujet: Re: Combat animé   Combat animé Icon_minitimeMar 26 Fév - 20:32

Roro02,t'as tout bien lu?C'est l'ecran qui tremble,un screen n sert a rien.
Revenir en haut Aller en bas
Invité
Invité




Combat animé Empty
MessageSujet: Re: Combat animé   Combat animé Icon_minitimeMar 26 Fév - 20:36

Ah oui exctement...désoler^^


Bin sinon cela ne sert pas vraiment ...mais quand même Super!
Revenir en haut Aller en bas
Invité
Invité




Combat animé Empty
MessageSujet: Re: Combat animé   Combat animé Icon_minitimeMar 26 Fév - 20:36

Ca peux servir pour certains style de combat.
Revenir en haut Aller en bas
Invité
Invité




Combat animé Empty
MessageSujet: Re: Combat animé   Combat animé Icon_minitimeMar 27 Mai - 2:59

SCREEN ! ... s.v.p.
Revenir en haut Aller en bas
Invité
Invité




Combat animé Empty
MessageSujet: Re: Combat animé   Combat animé Icon_minitimeMar 27 Mai - 16:31

je l'aurais bien utiliser si je n'utilsait pas le a-rpg
Revenir en haut Aller en bas
Contenu sponsorisé





Combat animé Empty
MessageSujet: Re: Combat animé   Combat animé Icon_minitime

Revenir en haut Aller en bas
 
Combat animé
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» Blog plein d'anime
» [Demande] Script combat
» Bilan d'un combat
» Liste de scripts
» [Combat]- Japonais - CBS à la tales of

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
RM-Land : le forum :: Quartier des makers :: Bibliothèque-
Sauter vers: