S
Stratos
Guest
Hello all, Its been years since I have posted on the GMC forums. Anyways, I have been slowly making a game on and off in game maker 8.1. Earlier today, I kept getting errors when trying to do things which actually happens once every few days so i saved it and closed it. When reopening it, it said that it and the backup were corrupt and could not be opened. The files open fine on Game Maker Studio, so I thought now is as good as any other time to transfer it over, as GM: Studio is just better.
So the issue is three lines of code in my game that are all pretty important, that I have no idea what to do about. Any help would be appreciated. Ive tried google searching but its all very vague answers that just says "use arrays" or something like that. Im not looking for someone to give me something to copy paste, just something solid to point me in the right direction.
Code Segment One: execute_string()
The code for room switching, which is when you intersect borders the variables mapX and mapY change accordingly. The room order doesnt matter this way making it dynamic and open world, and the old code used to look very simple. a room name would be something like rm_5_5; and now this code does not work. I have no idea how to keep my room naming system the way it is, as theres 30+ rooms all coded in and mentioned in different parts of code so i would really rather not redo this whole system.
execute_string("room = rm_"+string( mapX )+"_"+string( mapY )+";");
Code Segment Two: screen_redraw()
The game I am making is a large 2D zelda fan project, and this is only used in the text boxes being generated. Im not sure why its in the code(someone else wrote the text box example) and it is not something i fully understand. I feel as if there should be a similar command to this one, I just cannot find anything like it in the manual or google.
Code Segment Three: sound_add()
This is sort of a weird one. My game is getting large. Very large. And i want to minimise things so i dont have 6000 sprites sounds objects etc. One way I had that in GM8.1 was having a folder of all of the sounds and then loading them in and saving them as variables to save on loading time. There is a large script loading in all of my sounds similar to the code below.
global.FireSound = sound_add(working_directory + "\Sounds\FireNoise.wav",0,0)
Any help on these issues would be appreciated, as I do not really understand Game Maker Studio, why the commands were called obsolete or if there is an easy fix for these. Thank you for your time,
-Richard
So the issue is three lines of code in my game that are all pretty important, that I have no idea what to do about. Any help would be appreciated. Ive tried google searching but its all very vague answers that just says "use arrays" or something like that. Im not looking for someone to give me something to copy paste, just something solid to point me in the right direction.
Code Segment One: execute_string()
The code for room switching, which is when you intersect borders the variables mapX and mapY change accordingly. The room order doesnt matter this way making it dynamic and open world, and the old code used to look very simple. a room name would be something like rm_5_5; and now this code does not work. I have no idea how to keep my room naming system the way it is, as theres 30+ rooms all coded in and mentioned in different parts of code so i would really rather not redo this whole system.
execute_string("room = rm_"+string( mapX )+"_"+string( mapY )+";");
Code Segment Two: screen_redraw()
The game I am making is a large 2D zelda fan project, and this is only used in the text boxes being generated. Im not sure why its in the code(someone else wrote the text box example) and it is not something i fully understand. I feel as if there should be a similar command to this one, I just cannot find anything like it in the manual or google.
Code Segment Three: sound_add()
This is sort of a weird one. My game is getting large. Very large. And i want to minimise things so i dont have 6000 sprites sounds objects etc. One way I had that in GM8.1 was having a folder of all of the sounds and then loading them in and saving them as variables to save on loading time. There is a large script loading in all of my sounds similar to the code below.
global.FireSound = sound_add(working_directory + "\Sounds\FireNoise.wav",0,0)
Any help on these issues would be appreciated, as I do not really understand Game Maker Studio, why the commands were called obsolete or if there is an easy fix for these. Thank you for your time,
-Richard