Thanks, Exhydra.
I'm an idiot sometimes!
I was actually going to call the variable lm_index by the name number at first. But then I thought it might cause problems with the pictures, as they have a variable called number already, which I believe corresponds to the viewport. Anyway, when I changed it over, I must have forgotten to change that one over along with the others.
In positive news, it finally read through the script and sent me into the scene map when the call was created.
Now, that's about all the positive news. As now I've got a black screen staring at me. So, I'll just break this down and tell you what my thought process was behind the script, maybe that way, what I'm doing wrong will be more apparent.
After initialize, we go to a method called "create_map_back"
Here, I just want it to call the image from the module "WORLD_MAP_IMAGE"
I used self.picture because as far as I know, that's how you display a picture in script. It calls for an array which includes (viewport, filename). Therefor, I want the image to be displayed on viewport 1, so it is behind all the other pictures which will be displayed. Then, i call "Map_Script::WORLD_MAP_IMAGE" because I wanted to retrieve the image from the module. So, it looks like this. Just one command.
def create_mapback
self.picture(1, Map_Script::WORLD_MAP_IMAGE)
end
Next I go to the second part, which is where I want the scene to display the landmark images from the module. This needs to iterate through the when parts of the world_map_data(id) searching each one for a switch which is on. I thought I'd have problems with this one when I created it. Because, I assumed that the statement 'if $game_switches[Map_Script::id::found_switch] would do the iterating for me. After all, This statement says, look for a game switch whose id is found through the module Map_Script, in the id section, in the found_switch variable.
That said, I had to create the appropriate images if the switch was on, so I created super(), saying I would be creating an array with the following variables and they would adopt all the information from the given class. With self.picture(lm_index, image) I was trying to do just as I did in the first part, creating a picture by offering arguments of viewport and filename, in this situation, they would be found in the lm_index and image variables. Once that was achieved, I utilized the self.x and self.y statements to tell the program I wanted the said picture set at x equal to the landmark_x variable and y to the landmark_y variable. Once again, these are common picture functions. Lastly, I want to display text near the landmark, so I use self.draw_text and follow it up with its arguments of (string variable, position x, and position y). In this case, lm_name, x-20, y+20.
The code below shows my work for doing the paragraphs above:
def set_landmarks
if $game_switches[Map_Script::id::found_switch]
super()
self.picture(lm_index, image)
self.x = landmark_x
self.y = landmark_y
self.draw_text(lm_name, x - 20, y + 20)
end
end
Finally, I want to display the player's position. I do this by using prinicples I've explained above.
def set_player_position
super()
self.picture(1, Map_Script::CURRENT_POSITION)
self.x = $game_variables[WORLD_MAP_X]
self.y = $game_variables[WORLD_MAP_Y]
end
end
So that's my thought process and how it would have conceivably worked.