- Joined
- Nov 3, 2014
- Messages
- 7
- Reaction score
- 1
- First Language
- English
- Primarily Uses
I have a script called in a parallel process event that, whenever triggered, runs in its entirety twice before the game moves on. I have tried changing variables in the middle of the script so that it won't trigger again, but it didn't do anything. The script does exactly what it's supposed to both times, except that it happens twice, and I have no idea why. My only idea is that it might be something to do with how VX Ace handles parallel processes, but I don't know how else I would call it.
Common Event 2 sets variable 4. Common Event 1 shows a few text boxes, plays some sound effects, and transports the player elsewhere before turning on the switch to play the parallel process Common Event 3. Common Event 3 is only ever called once, which means that Common Event 1 and the scripts are being called twice before the game checks the parallel process condition for Common Event 3.
Solutions that didn't work:
Common Event 2 sets variable 4. Common Event 1 shows a few text boxes, plays some sound effects, and transports the player elsewhere before turning on the switch to play the parallel process Common Event 3. Common Event 3 is only ever called once, which means that Common Event 1 and the scripts are being called twice before the game checks the parallel process condition for Common Event 3.
>Call Common Event [2]
>Script: [map_7]
def map_7
@var = $game_variables[4]
case @var
when 17..23
if !$game_switches[ 16 + @var ]
spotted( @var )
end
end
end
def spotted ( var )
mr = RPG::MoveRoute.new
mr.repeat = false
mr.wait = true
mr.list = []
mr.list.push( RPG::MoveCommand.new( 25, []) )
mr.list.push( RPG::MoveCommand.new )
$game_map.events[ @var ].force_move_route( mr )
$game_map.events[ @var ].balloon_id = 1
$game_temp.reserve_common_event( 1 )
end
- Changing $game_variables[4] in the if statement of map_7
- Resetting $game_variables[4] after the script call in the parallel process



