GameMaker [Solved] Space Rocks Tutorial: obj_debris is not visible.

T

Tritune

Guest
Hello!
New user here, trying to complete the Space Rocks Tutorial. I ran into a problem when creating the debris, and came across this thread: https://forum.yoyogames.com/index.p...is-of-space-rocks-tutorial.61078/#post-368634

I was unable to determine exactly what the original poster had done to the sprite origin that fixed his problem, but I tried changing mine around with no effect. I did add the debug message suggested in that thread, and it turns out all the obj_debris are created at Y=0. I've ticked "Relative" in the Create instance for both axis, but it only seems to work on the X axis.

obj_bullet.jpg spr_debris.jpg

I don't know how to proceed from here, so any help would be very much appreciated.
 
T

Tritune

Guest
Upon further inspection, it seems that the debug script from the linked thread was formatted wrong. I changed:
Code:
 show_debug_message("Position created at: " + string(x) + "/" + string("y"))
To:
Code:
 show_debug_message("Position created at: " + string(x) + "/" + string(y))
And now I'm getting the y coordinates for the objects, which seem fine.

But I'm still not seeing any debris.
 

TheouAegis

Member
Does obj_debris have a checkmark next to "Visible"?

What is obj_debris' code? Is there anything in its draw event? What is the code to destroy it?
 
T

Tritune

Guest
Does obj_debris have a checkmark next to "Visible"?
Yes.

What is obj_debris' code? Is there anything in its draw event? What is the code to destroy it?
It goes like this: obj_debris_create.jpg

obj_debris_step.jpg

Ticking the "Relative" box in "Assign Variable" fixed the problem for me, thank you for pointing me in the right direction.
 
Top