Jump to content


Photo
- - - - -

Il mostro cambia colore


  • Please log in to reply
4 replies to this topic

#1 tricker

tricker

    Toy Soldier

  • Members
  • PipPipPipPip
  • 368 posts

Posted 04 September 2007 - 09:01 PM

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
  • PipPipPipPipPipPip
  • 1,306 posts

Posted 05 September 2007 - 06:09 AM

molto utile.
mannaggia che mi da sintax error

CODICE
per

Edited by Dogeland, 05 September 2007 - 06:10 AM.


#3 Zen

Zen

    Molosso Infernale

  • Members
  • PipPipPipPipPip
  • 613 posts

Posted 07 September 2007 - 02:38 PM

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
  • PipPipPip
  • 185 posts

Posted 31 March 2008 - 05:40 PM

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
  • PipPipPipPipPip
  • 601 posts

Posted 31 March 2008 - 06:53 PM

ma
My band... my soul...

Exexution




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users