Vai al contenuto


Foto
- - - - -

Il mostro cambia colore


  • Per cortesia connettiti per rispondere
4 risposte a questa discussione

#1 tricker

tricker

    Toy Soldier

  • Members
  • StellettaStellettaStellettaStelletta
  • 368 messaggi

Inviato 04 settembre 2007 - 09:01

Nuova classe sopra Main

CODICE


#????????
#
#???????HP??????????????
#
#2005.4.14 ????
#HP???????????????
#????????????????????

module Momo_Change_Tone
# ????????????
ACTOR_CHANGE_TONE = false
# ???????????
ENEMY_CHANGE_TONE = true
# ??????
TONE_RED = 128
# ??????
TONE_GREEN = 0
# ??????
TONE_BLUE = 0
end

class Game_Battler
attr_accessor :tone_change
alias game_battler_change_color_initialize initialize
def initialize
game_battler_change_color_initialize
# ?????????
@tone_change = false
end
end

class Sprite_Battler < RPG::Sprite
alias sprite_battler_change_color_initialize initialize
def initialize(viewport, battler = nil)
sprite_battler_change_color_initialize(viewport, battler)
@change_tone = Tone.new(0, 0, 0)
end
alias sprite_battler_change_color_update update
def update
sprite_battler_change_color_update
tone_update
end
def tone_update
if @battler != nil
if rest_hp_tone_change?
if @battler.tone_change
rest_hp_tone_change_set
@battler.tone_change = false
end
self.tone = @change_tone
end
end
end
# ??????????
def rest_hp_tone_change?
if (Momo_Change_Tone::ACTOR_CHANGE_TONE and @battler.is_a?(Game_Actor)) or
(Momo_Change_Tone::ENEMY_CHANGE_TONE and @battler.is_a?(Game_Enemy))
return true
end
return false
end
# ??HP?????????
def rest_hp_tone_change_set
hp_rate = (@battler.hp.to_f / @battler.maxhp) * 100
rate = 100 - hp_rate
red = Momo_Change_Tone::TONE_RED * rate / 100
green = Momo_Change_Tone::TONE_GREEN * rate / 100
blue = Momo_Change_Tone::TONE_BLUE * rate / 100
@change_tone.set(red, green, blue)
end
end

class Spriteset_Battle
alias spriteset_battle_change_color_initialize initialize
def initialize
spriteset_battle_change_color_initialize
# ????????????
for sprite in @actor_sprites
if !sprite.battler.nil?
sprite.battler.tone_change = true
sprite.update
end
end
end
end

class Scene_Battle
alias scene_battle_change_color_update_phase4_step5 update_phase4_step5
def update_phase4_step5
scene_battle_change_color_update_phase4_step5
# ?????????????????????
for target in @target_battlers
target.tone_change = true
end
end
end






Da qu
MI TROVATE QUI


My Homie...


Un vero Skater sa quando tentare di chiudere e quando invece

#2 Dogez

Dogez

    Demone Sanguinario

  • Members
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 1306 messaggi

Inviato 05 settembre 2007 - 06:09

molto utile.
mannaggia che mi da sintax error

CODICE
per

Messaggio modificato da Dogeland, 05 settembre 2007 - 06:10


#3 Zen

Zen

    Molosso Infernale

  • Members
  • StellettaStellettaStellettaStellettaStelletta
  • 613 messaggi

Inviato 07 settembre 2007 - 02:38

CODICE
class Scene_Battle
alias scene_battle_change_color_update_phase4_step5 update_phase4_step5
def update_phase4_step5
scene_battle_change_color_update_phase4_step5
# ?????????????????????
for target in @target_battlers
target.tone_change = true
end
end
end

# ??????
TONE_RED = 128
# ??????
TONE_GREEN = 0
# ??????
TONE_BLUE = 0



Correggi la l'ultima parte dello sscript con questo.....


Dalle fiamme rosse e blu compaiono due guerrieri.....Siete pronti per l'eterna lotta fra la fiamma blu e la fiamma rossa????
"T2F"The Two Flames:La leggenda delle due fiammeGioco realizzato per RPGMAKER XP 1.02 con il nuovissimo e unico MBS(Multi-Battle-Sistem)......Prima demo del Bs......
http://lnx.phantomca...?showtopic=2009

#4 Narzush

Narzush

    Omunculus

  • Members
  • StellettaStellettaStelletta
  • 185 messaggi

Inviato 31 marzo 2008 - 05:40

si ora mi f


]

We hold our rebels banners up whit pride , the color crimson and the hammer is the sign!








#5 Zagros

Zagros

    Molosso Infernale

  • Members
  • StellettaStellettaStellettaStellettaStelletta
  • 601 messaggi

Inviato 31 marzo 2008 - 06:53

ma
My band... my soul...

Exexution




0 utente(i) stanno leggendo questa discussione

0 utenti, 0 visitatori, 0 utenti anonimi