I am having trouble updating data when switching what is being selected(think of items in a store and when you click different items, it gives different data for each item). This is determined by the object's index/id when clicked. I noticed that the parent and first child of said parent has the...
So I have a sprite with 10 images, all different coloured cursors.
Here is my code:
if (room != rMenu) and (room != rControls) and (room != rUpdatesAndNotes) and (room != rShop) and (room != rEnding) and (room != rCredits)
cursor_sprite = sCursorGun;
This is probably not a big deal, but is there a solution to avoiding resource conflicts when updating a launched game other than: once a game has been released never change the order of resources and if adding to the game only add at the tail of the tree? I guess, maybe saving the string name...
I see there's script_get_name(scr), but that requires the input of the script index. Is there anyway to get the name of the script the code is in without knowing the index?
For example, objects have the "self" and "id" keywords to reference themselves. I'm looking for a programmatic way to...
Hello! I am using DND, but understand a bit a coding/gamemaker language.
I am making a game similar to Doodle jump. As the player sprite leaves the top of any room it moves to the next room and if it hits the bottom of any room it goes to the previous room - simulating an endless sky.
Do you have a special method or tip on how to solve "index out of bounds" errors? Do you know a neat trick on cutting your investigation time? Please post your GMS2 list and grid access tricks!
I have been getting this bug with my DS_grids that seems random when it shouldn't be and I highly suspect it is a bug on game maker's side.
at the start of the game I have this object creating global ds_grid's in Game start event
global.invT = ds_grid_create(0,3) //item id, modifier, upgrades...
So i just bought gms2 and started a new project.
as i started inserting animations i noticed something. Unlike in gm1 if i set sprite_index = 0 it just locks on set index
now here is my draw event:
show_debug_message("image_index = "+ string(image_index));
if hsp_ == 0
I recently ran into an issue using arrays that I don't remember experiencing in Game Maker 8.
Basically, I am trying to initialize values to be stored in a persistent object that basically tracks my game data, and is responsible for saving to files and loading data back from...
GM Version: Studio
Target Platform: All
It bothers me that the string functions start at id 1 and not 0, because it means you have to add offsets sometimes. So I wrote some pass-through scripts that fix it. Further reading.
All scripts are ready to drag straight...
FATAL ERROR in
action number 1
of Create Event
for object data_structure_grid:
global variable name 'purple1' index (100007) not set before reading it.
at gml_Object_data_structure_grid_Create_0 (line 14) - global.purple1 = 1
This is the actual code:
//variables for tracking
global.red1 = 1...
Hello Friends,Let's Contextualize...
I'm doing a phase selection map where you plot the route to it, it works like this: you're on a planet and now you want to go to another, you plot a route to the other planet, creating points, obeying the amount of fuel that you have.
Then you play the...
Hi, i'm having this issue without a clue on how to solve it.
In my character selection room y have an object which will set the frame (sub-image) of the player and CPU, and also the preview.
for this In my object (arrows) I'm using "image_index -= 1 (for the back) and image_index += 1 (for the...
Hey boys and girls, how are you all doing?Hope well!
I have got this problem that i've seen solved in some threads but i couldnt really solve myselfe (probably just because im bad at programming ahah)
first and foremost here is my lil' bit o' code
if (atk1 == true)
I've made an elaborate system of room generation but it works by checking the room name instead of room index. It's not working because room_exists checks for the index. How do I make it check for the name instead?
I want to read out the value of the array sx at the position xc_old and yc_old. I want to write this value into the variable xc. For this I use the following simple code:
xc = sx[xc_old,yc_old]
But I get the error: "trying to index a variable which is not an array"
However, I don't want the xc...