Bunktown207
Member
Is there any way I can get a constant Hue change in effect with one of my characters? I tried it with the slider, it looks like hes glowing its cool.
Thanks
Thanks
attr_accessor :character_hue # character hue
$game_player.character_hue += 1
$game_player.character_hue %= 360
$game_map.events[event_id].character_hue += 1
$game_map.events[event_id].character_hue %= 360
class Game_Character
alias_method :seph_charactercyclehue_gmchr_up, :update
def cycle_hue_forward
@cycle_hue_forward = true
@cycle_hue_backward = false
end
def cycle_hue_backward
@cycle_hue_backward = true
@cycle_hue_forward = false
end
def stop_cycle_hue(finish_hue = nil)
@cycle_hue_stop = true
@cycle_finish_hue = finish_hue
end
def update
if @cycle_hue_stop && (@cycle_finish_hue == nil || @cycle_finish_hue == @character_hue)
@cycle_hue_forward = false
@cycle_hue_backward = false
@cycle_hue_stop = false
@cycle_finish_hue = nil
end
if @cycle_hue_forward
@character_hue += 1
@character_hue %= 360
elsif @cycle_hue_backward
@character_hue -= 1
@character_hue = 360 if @character_hue == 0
end
seph_charactercyclehue_gmchr_up
end
end
# Cycle Player Hue Forward
$game_player.cycle_hue_forward
# Cycle Player Hue Backward
$game_player.cycle_hue_
# Cycle Event Hue Forward
$game_map.events[event_id].cycle_hue_forward
# Cycle Event Hue Backward
$game_map.events[event_id].cycle_hue_backward
# Stop Player Cycler
$game_player.stop_cycle_hue(finish)
# Stop Event
$game_map.events[event_id].stop_cycle_hue(finish)
# When finish is nil, it stops the hue changer wherever it is at
# When finish is a number between 0 and 360, it continues to change hues until it is that hue, then stops.
$game_player.character_hue += 1
$game_player.character_hue %= 360
class Game_Character
alias_method :seph_charactercyclehue_gmchr_up, :update
def cycle_hue_forward(speed = 5)
@cycle_hue_forward = true
@cycle_hue_backward = false
@cycle_hue_speed = speed
end
def cycle_hue_backward(speed = 5)
@cycle_hue_backward = true
@cycle_hue_forward = false
@cycle_hue_speed = speed
end
def stop_cycle_hue(finish_hue = nil)
@cycle_hue_stop = true
@cycle_finish_hue = finish_hue
end
def update
update_cycle_hue
seph_charactercyclehue_gmchr_up
end
def update_cycle_hue
back = @cycle_hue_backward
forw = @cycle_hue_forward
stop = @cycle_hue_stop
spd = @cycle_hue_speed
fnsh = @cycle_finish_hue
if stop && (fnsh == nil ||
(back && @character_hue.between?(fnsh, fnsh + spd)) ||
(forw && @character_hue.between?(fhsn, fnsh - spd)))
if fnsh != nil
@character_hue = fnsh
end
@cycle_hue_backward = false
@cycle_hue_forward = false
@cycle_hue_stop = false
@cycle_finish_hue = nil
end
if @cycle_hue_forward
@character_hue += @cycle_hue_speed
@character_hue %= 360
elsif @cycle_hue_backward
@cycle_hue_speed += 360 - @cycle_hue_speed
@cycle_hue_speed %= 360
end
end
end
class Game_Character
alias_method :seph_charactercyclehue_gmchr_up, :update
def cycle_hue_forward(speed = 5)
@cycle_hue_forward = true
@cycle_hue_backward = false
@cycle_hue_speed = speed
end
def cycle_hue_backward(speed = 5)
@cycle_hue_backward = true
@cycle_hue_forward = false
@cycle_hue_speed = speed
end
def stop_cycle_hue(finish_hue = nil)
@cycle_hue_stop = true
@cycle_finish_hue = finish_hue
end
def update
update_cycle_hue
seph_charactercyclehue_gmchr_up
end
def update_cycle_hue
back = @cycle_hue_backward
forw = @cycle_hue_forward
stop = @cycle_hue_stop
spd = @cycle_hue_speed
fnsh = @cycle_finish_hue
if stop &&
(fnsh == nil || (back && @character_hue.between?(fnsh, fnsh + spd)) ||
(forw && @character_hue.between?(fnsh - spd, fnsh )))
if fnsh != nil
@character_hue = fnsh
end
@cycle_hue_backward = false
@cycle_hue_forward = false
@cycle_hue_stop = false
@cycle_finish_hue = nil
end
if @cycle_hue_forward
@character_hue += @cycle_hue_speed
@character_hue %= 360
elsif @cycle_hue_backward
@cycle_hue_speed += 360 - @cycle_hue_speed
@cycle_hue_speed %= 360
end
end
end