I'm trying to change the keys that have to be pressed to change between single/all and enemy/ally.
I already did the single/all part:
I need help to change the enemy/ally part like this (hope I can explain):
- I want to switch between enemies and allies pressing LEFT or RIGHT (left for allies and right for enemies) but only when the cursor is at the first actor and at the last enemy. I know I have to mess with actors and allies index but I don't have any idea how to change it to work like that.
This is the script I'm trying to modify:
http://www.rmxp.org/forums/showthread.php?t=8633
Can anyone know what to modify to make it work? Thanks in advance.
I already did the single/all part:
Code:
update_l if @scope.single_all?
#...
#--------------------------------------------------------------------------
# * Update L Button
#--------------------------------------------------------------------------
def update_l
# Return if Key is not triggered
return if not Input.repeat?(Input::L)
# Save Type
old_type = @type
# If Single All
if @scope.single_all?
# Set to New Type
case @type
when 'all_actors'
@type = 'actor'
when 'actor'
@type = 'all_actors'
when 'enemy'
@type = 'all_enemies'
when 'all_enemies'
@type = 'enemy'
end
end
# Return if not type Changed
return if old_type == @type
# Play se
$game_system.se_play($data_system.cursor_se)
# Setup index
setup_index
# Set Visible Arrows
set_visibility
end
- I want to switch between enemies and allies pressing LEFT or RIGHT (left for allies and right for enemies) but only when the cursor is at the first actor and at the last enemy. I know I have to mess with actors and allies index but I don't have any idea how to change it to work like that.
This is the script I'm trying to modify:
http://www.rmxp.org/forums/showthread.php?t=8633
Can anyone know what to modify to make it work? Thanks in advance.