Just copy and paste this script into a new section anywhere above Main.
You can change numbers in REPEAT_WAIT = 6 and REPEAT_START_WAIT = 24 to alter the speed of the repeat.
[rgss]module Input
# Frames to wait between each repeat
REPEAT_WAIT = 6
# Frames to wait from the first repeat to the following repeats
REPEAT_START_WAIT = 24
KEYS = [DOWN, LEFT, RIGHT, UP,
A, B, C, X, Y, Z, L, R,
SHIFT, CTRL, ALT,
F5, F6, F7, F8, F9]
class << self
unless method_defined?
zeriab_repeat_change_update)
alias zeriab_repeat_change_update update
end
def update
zeriab_repeat_change_update
# Create button state hash if needed
if @button_states.nil?
@button_states = {}
for key in KEYS
@button_states[key] = 0
end
end
# Check for press
for key in KEYS
if press?(key)
@button_states[key] += 1
else
@button_states[key] = 0
end
end
end
def repeat?(id)
if @button_states[id] <= 0
return false
elsif @button_states[id] == 1
return true
elsif @button_states[id] > REPEAT_START_WAIT
return @button_states[id] % REPEAT_WAIT == 1
end
end
end
end
[/rgss]
*hugs*
- Zeriab