I have an instance A in which I store a reference to another instance B. When I call instance_deactivate_object(A) and then subsequently instance_activate_object(A) the reference to B is invalidated, maybe garbage collected(?) (ActiveCharacter is B):
Does anyone know why this is? I really...
Question: Has anyone found a good reference guide for typical steps per minute (or frames per cycle) for various types of movement?
Googling this inevitably leads to exercise advice, but I'm looking for typical step counts, not ideal ones. I'm also looking for speed ranges for things besides...
Trying to find out what problems arise in the following scenario:
Object1
Object2.pointing = Object1
instance_destroy(Object1)
So what is in Object2.pointing now?
Quick Question Guys.
In my current project I have written a text file translator that turns text file code into real code.
Now the problem is, in the program, I have a bunch of enums, one in particular describing material. And of course I want to tell the textfile, which material it should...
Hi all!
In my game, the enemies cannot see the player through solid walls (OBJ_Solid) but should be able to see through OBJ_Platform's.
I use this to detect the player:
if !collision_line(x+4,y-4,Player.x,Player.y,OBJ_Solid,false,true) {//do something}
My problem is that OBJ_Platform is a...
What's the best way for an instance/object to reference the instance that created it and then store that as a variable, but without doing it via checking for a collision or which one is nearest?
I have an enemy instance which creates an instance of a hit object and I want it to follow the enemy...
Hello. I need to make a DS list of all the "obj_object" objects currently in my room so that I can reference them all individually in my code. How would I go about doing this? This is so that they can reference each other. Also when the object dies it also needs to get off the list. Is this...
Long time lurker, first time thread creator.
I ask this with great hesitation because it sounds so stupid, but I've been wondering about this for a while and the core question I have is:
Is there any disadvantage to declaring all or most object/instance variables as an array of length 1...
Hey! I already submited a bug report for this, but I haven't got a response in a while (I think?) so I'm trying my luck here.
After updating to the last GMS2 version this message started appearing while compiling, which says: "Reference to object isn't stablished as an instance of an object"...
Hi everyone !
I post here, because I've a big and mysterious issue!
I want to change a sprite for a blood effect, according to my player orientation (left, right, up, down).
I have my sprites in arrays, because it changes according to ennemies.
So I tried two ways :
- I put my sprite attack...
Is there a way to store a reference to a variable inside an array?
something like:
b = 1;
a[0] = reference(b);
get_referenced_var(a[0]) += 1; //now b=2
is it possible in gm:s2?
I truly do miss some features of OOP languages. I'm having a problem implementing a modular upgrade system for my game in Game Maker.
I have a GUI object "+", and I want to be able to upgrade several aspects of my tower. Ex: max hit points ( soul ), damage, etc.
The problem is, I want to...
Pointer is highly conceptual - please only download and use it for testing- and playing-around-purposes in it's current state. However, I'm happy about feedback, bug reports and suggestions! Please use this thread in the GM:S Forum.
Create pointer_vars for a whole new level of dynamic coding...
In essense, im trying to free arrays through a script.
something like:
var array; //array would actually be created through another script.
array[2] = 50;
array[1] = 10;
array[0] = 9;
//do stuff with array.
free(array);
free(array):
argument0 = 0; //obviously doesnt work :'(
I know an array can...