So someone asked a question on reddit about instances following the individual object that creates them.
If you look at the posted solution, it works perfectly but I don't understand why. Here's what they wrote:
Haven't been programming for long so I don't understand the "inst.creator"...
Bit of an odd problem here. I have it so that when my player land on top of an enemy the enemy gets destroyed - sort of similar to how the Mario games work.
The issue is that the "with" command is completely destroying the wrong instances, in fact it's destroying every instance of a type of...
How can I keep cursor inside an object?
For example, I have a volume slider and I want to keep cursor inside it until mb_left is released.
I'm also going to hide the cursor and change a sprite of the slider.
But first i want to figure out how to keep the cursor inside the slider when...
I would like to remove the Step Event for some objects during run time (i.e, while playing the game) via code, is it possible?
For example, let's say I have an object with Step Event defined in IDE. Then I run the game, start playing, an instance of that object is created, and later I...
Hi everyone !
I have two objects :
- The first one is the one the player controls. Named "PLAYER".
- The second one is an object (rather a group of objects) distributed on several layers. Each layer has its own depth and each object from that group take the depth of the layer on which it has...
Hello I need help with my code because I tried everything what can I do with my skills and I don't know how to fix it...
here is problem: https://imgur.com/a/P4iHi6c
Just when particles (object/instance) exist and also created new one, exist particles is replaced by new one.
I tried any...
So far this code will position an object on screen (not in the gui) and can be interacted with. This all works as intended. However every-time the player moves the object in question will shift slightly while still staying in place.
I checked other forum posts for a solution but the results...
Greetings, first time posting here. I'm trying to make a standard turn-based battle system, but I keep having trouble when starting the battle from a script.
I'm trying to pass enemy objects as arguments, so the script assigns them to the enemy array in the battle_logic object. Here's my code...
I'm working on a stealth game and revising some mechanics. I have a sentry enemy that used to have a constant, swiveling line of sight. I'm trying to change it at the moment so it instead lies "asleep" for a few seconds, "blinks awake" for a few seconds during which it can detect the player...
why does this code
if (place_meeting(x, y, par_alien))
if (place_meeting(x, y, other))
Hey, I'm a beginner to GameMaker and I'm having some difficulty with two of my objects changing their sprite because of their parent object. I have the child objects (the boots) change their sprites depending on the direction the character moves. I have also set the parent object's (ship body)...
Ok here is a video and please dont punish me for accent and all aboat my english i know its terrible.
Here is first code for sticking object :
Here is code from weapon:
Here is code for moving and shifting:
Thank you for reading and answers.
HI everyone. I am not so cool at gamemaker, so need your help. In my game i have objects that move with other ones, for example spaceship that is flying and turret that is on it and can rotate and shoot. Same thing with many other objects, but when one object move another object move not...
I have an object with 3 fixtures (don't know if that counts).
It has physics enabled and 0 density because I need it to stay still on screen.
I'm trying to use "physics_apply_force(x, y, 0, -15)" on "Left pressed" on it. Doesn't budge.
Is this the way things should work or am I doing something...
I am quite new to game maker studio so I wanna ask you something.
How do I transfer my object (player) from one room to another along with some other objects too.
Any help please.
So as the title states I need help getting it so when a player collides with another object it decreases and increases another objects speed. So far I was able to get it to do both increase and decrease an objects speed, but it works weirdly. So I want it so after a few seconds the boost in the...
Hello! So I have a problem with my enemies spawning on items and each other, and not being able to move. Can someone show me the code to check if there is not an object in the way before spawning the enemy? I know it’s simple, but I’m self taught. Thanks for your time!
Hi, so I'm in the progress of trying to master the Gamer Maker 2 programming language. Recently I stumbled across a little problem. What I'm trying to accomplish, is moving an item object to the center of another object, whereafter a series of events will trigger when the two objects are on top...