- Joined
- Jul 25, 2013
- Messages
- 18
- Reaction score
- 3
- First Language
- English
- Primarily Uses
Don't mind the title, it's just me trying to be witty and make a joke out of the problem I'm currently having.
This'll be a long post, so I hope you have some time to spare! (This is also my first post outside of my Introductory thread, woo!)
I have a dungeon, which consists of three parts so far. After the player completes the first part and when they move on they will find themselves here:
This part challenges the player to move as quickly as possible to the exit without touching the fire geysers that will spew beneath them when the walk atop an event on the darkened tiles. (Only one fire geyser event exists in the corridor for testing.)
In order to start it, the player must read the sign by activating the event directly above the Player Start event. (Which is there solely for testing purposes.)
If the player decides he is ready by selecting the Yes option, he will be teleported in the corridor, which is above the red sphere event northeast of the Player Start event. A countdown will begin and prompt the player to run. As the player runs over the fire geyser events, they will pop up in a few frames. If the player manages to make contact with a fire geyser event, they will be teleported back to the room where the sign is located, adding +1 to a variable "TimesBurned".
The player will then have an option to retry the trial by talking to the sign again. If the player selects Yes, he will be teleported back into the corridor to try the challenge again.
That is what is supposed to happen.
However, by playtesting, I realized that, while the first attempt works fine, if and when the player fails, the second and subsequent retries will fail to work or even start.
Here is how I set up my events,
When the player initially starts the challenge for the first time by talking to the sign, this is the event:
When the player is teleported after selecting Yes, this is the event that handles the countdown:
The event commands that are cut off are
-Play SE: 'Gun1', 100, 85
-Play BGM: 'Battle8', 100, 120
-Self-Switch Operation: A = ON
Branch End
(There are no event commands on Event Page 2, with only the condition 'Self-Switch A is On'.)
This is what the Fire Geyser event looks like:
The script present in Event Page 2 for the Conditional Branch is
$game_player.x == $game_map.events[@event_id].x and $game_player.y == $game_map.events[@event_id].yWhich is made possible from a script I added below Materials called "Shaz's Remember Event Position"
When the player fails and comes in contact with a fire geyser, this is the event that handles the little cutscene that follows:
(There are no event commands on Event Page 2, with only the condition 'Self-Switch A is On'.)
And when the player speaks to the sign again, which is the same event as the first sign I've told you about, this is the second event page:
To reiterate the problem again, whenever the player retries the challenge if the player has failed before, the countdown and fire geysers will simply not work.
I've tried a few methods to try and see if anything else works when reattempting the course, such as using variables instead, a condensed structure using conditional branches, and adding a new switch called "GD-Trial2OFF" to go along with the other switch, but all these methods proved to not work either.
I may be blind to the answer and it may just be a simple logic error, but it's driving me nuts!
Thanks in advance to those that help out!
This'll be a long post, so I hope you have some time to spare! (This is also my first post outside of my Introductory thread, woo!)
I have a dungeon, which consists of three parts so far. After the player completes the first part and when they move on they will find themselves here:
In order to start it, the player must read the sign by activating the event directly above the Player Start event. (Which is there solely for testing purposes.)
If the player decides he is ready by selecting the Yes option, he will be teleported in the corridor, which is above the red sphere event northeast of the Player Start event. A countdown will begin and prompt the player to run. As the player runs over the fire geyser events, they will pop up in a few frames. If the player manages to make contact with a fire geyser event, they will be teleported back to the room where the sign is located, adding +1 to a variable "TimesBurned".
The player will then have an option to retry the trial by talking to the sign again. If the player selects Yes, he will be teleported back into the corridor to try the challenge again.
That is what is supposed to happen.
However, by playtesting, I realized that, while the first attempt works fine, if and when the player fails, the second and subsequent retries will fail to work or even start.
Here is how I set up my events,
When the player initially starts the challenge for the first time by talking to the sign, this is the event:
The event commands that are cut off are
-Play SE: 'Gun1', 100, 85
-Play BGM: 'Battle8', 100, 120
-Self-Switch Operation: A = ON
Branch End
(There are no event commands on Event Page 2, with only the condition 'Self-Switch A is On'.)
$game_player.x == $game_map.events[@event_id].x and $game_player.y == $game_map.events[@event_id].yWhich is made possible from a script I added below Materials called "Shaz's Remember Event Position"
#--------------------------------------------------# Remember Event Position 1.0#--------------------------------------------------## Author: Shaz## Description: This script lets you set the position and direction# where an event will appear next time the map is# loaded. Events will appear in this new position# rather than the place they were put during design.##--------------------------------------------------## Installation: Copy into a new script slot in the Materials section##--------------------------------------------------## Use:## To tell an event to move to its current position the next time# the map is loaded, execute the following in a script call:# $game_map.events[event_id].save_pos()## To tell an event to move to a particular position (not its# current position) the next time the map is loaded,# execute the following in a script call:# $game_map.events[event_id].save_pos(1, 2, 8)# - the above will move the event to x=1, y=2, facing up## To tell an event to forget its previously remembered position# and go back to its default position the next time time map# is loaded, execute the following in a script call:# $game_map.events[event_id].forget_pos()#--------------------------------------------------class Game_System alias shaz_mem_position_gs_init initialize attr_accessor :event_positions def initialize shaz_mem_position_gs_init @event_positions = {} endendclass Game_CharacterBase attr_accessorendclass Game_Event alias shaz_mem_position_gcb_init initialize def initialize(map_id, event) shaz_mem_position_gcb_init(map_id, event) if $game_system.event_positions.has_key?([map_id, @id]) mvx, mvy, mvdir = $game_system.event_positions[[map_id, @id]] moveto(mvx, mvy) if mvdir != nil set_direction(mvdir) end @stop_count = 0 refresh end end def save_pos(x = @x, y = @y, dir = @direction) $game_system.event_positions[[@map_id, @id]] = [x, y, dir] end def forget_pos $game_system.event_positions.delete([@map_id, @id]) endend
I've tried a few methods to try and see if anything else works when reattempting the course, such as using variables instead, a condensed structure using conditional branches, and adding a new switch called "GD-Trial2OFF" to go along with the other switch, but all these methods proved to not work either.
I may be blind to the answer and it may just be a simple logic error, but it's driving me nuts!
Thanks in advance to those that help out!


