Recently i've been trying to cut down on the amount of unnecessary objects in my game and one that i've been trying to cut down on is my teleporter objects. I want to make a single teleporter object where each instance of the object will have a "warpID" variable that's set in the room editor. If...
Hi Everyone!
I was wondering if anyone had some insight into how I could go about creating a script that returns the id of an object at a point in 3D space. I guess this means I'm essentially looking for a 3D equivalent of instance_place(), if such a thing is possible. I attempted to make a...
Hey guys ^^
I need help with my game.
I'll put a simple example here:
I am making an item system in which when the player selects an item he verifies some information about it.
global.item_select = (ob_item_sword_01);
atk = global.item_select.atk;
lv = global.item_select.lv;
The problem...
I need an object to be able to determine the specific ids of all instances that are touching its instance.
Currently, I use instance_place to tell me if there is a specific type of object below me, but I've found nothing so far that tells me the id of a touching or colliding instance.
Anyone...
Game Maker 1.4
I'm working on a side scrolling shooter and I'm creating a dreadnought that has turrets that the player must destroy. Upon doing so, the dreadnought is then destroyed as well.
The only way I can think of doing this is to store the instance ID's of the turrets after they're...
Trying to get to grips with instance id, but struggling a bit...
How can I instantly destroy my player (oRay) from this collision event? At the moment it doesn't get destroyed until after the alarm that destroys the dead player (oRaydead). Can I call oRay_id ? Everything I've tried so far has...
I need the guide point for the pedestrians in my GTA 2 styled game to find the nearest direction object so they can start the loop of walking along sidewalks. Long story short, I want them to get the nearest ped direction object, using a variable called resetPoint. This is the code I used...
Dear smart people, pls help me to figured out how I can achieve this chainbolt script.
By chainbolt I mean an object that hits the neares instance of a certain type (I'll refert to this as "target"), interacts with it and then goes for the next one.
My Problem here is that instance_nearest...
If you continually create and destroy many instances quickly (meaning there's never too many at once), what happens if this is done for a very long time in one room? Do higher and higher id numbers cause any performance hit, or crash over hours? Does the id number eventually wrap around? Are...
I am currently working with moving platforms, however several issues have occurred. For this code, I check the instance id of the platform I am stepping on to then execute the code.
ID=instance_place(x,y+16,platform_1way)
if place_meeting(x,y+vsp/2,platform_dy_h){
if ID!=-4 &&...
Hey hi,
my question is pretty straight forward: how would I go about if I wanted to access a certain instance without knowing its position?
For example, I try to create a level selection screen. One obj_level represents a level and between some of those, there are connections. Just like...
EDIT: With a little more digging, it looks like this only happens when I change rooms after creating the ds_list. Is there a way to mark a ds_list as persistent?
EDIT2: Duh! The objects IN the ds_list weren't persistent, so they were getting destroyed when the room changed. The ds_list still...
I have a hitbox I create in an attack state for the player. Here is my code:
bodyHitbox = instance_create_layer(x + 450, y, layer, obj_body_hitbox);
object_set_solid(bodyHitbox, true);
bodyHitbox.mask_index = spr_player_attack_1_body_hitbox...
hi everybody
I'm trying to make a dynamic object by object id name that you can change in room editor
...
my instances have different behavior by name that I set in room editor by myself.
...
so how can I access to string name like "inst_2D986839"...?
I have to read it as a string
I'm getting a weird error and I can't figure out why.
My game uses a system of electric doors that have a locked and an unlocked state which can be toggled using a computer terminal. This is by use of an in-game menu that calls a script which holds a switch statement. The terminal communicates...
I was wondering if it was possible to set a mask and store an object id in the same 2D array entry. I'm still relatively new to bitmasking in general, so any corrections are appreciated.
In a nutshell, I have a GameGrid[x,y] which starts empty. Then, I set specific tiles to hold certain...
I'm using collision_line to see whether or not a line-of-sight is obstructed in a turn-based strategy game.
When there's a character object and its id != the character that's looking, the obstructed variable is set to true, else set to false. So all of that works fine and dandy but the issue...
I have already have a system that saves strings in a text file and loads from that file at game startup, but as far as I understand, instance IDs are set once the game compiles. So their IDs will be different each time the game starts up?
How can I refer to instances based on an ID that was...
Hello!
I'm trying to reproduce something i saw on a cool website (check it out anotalk.hu to understand(it's the background)) So I made a few dots (like 200) and gave them random direction and speed. Now to connect them i used a collision circle but collision circle is dumb and picks 1 instance...
[SOLVED]
I have a 20 position array storing the id of 20 instances.
//this is the code I want to run
if center_id = global.position_order[o]{ do this }
so, object1 is stored in global.position_order[0] object2 in global.position_order[1] etc...
center_id = the id of the instance clicked on...