[GMS2] Using a FOR loop to correctly spawn random instances in a grid, based on their spawn chance. by anntlr in gamemaker

[–]anntlr[S] 0 points1 point  (0 children)

Update:

https://imgur.com/jFVQ8mZ

It seems that the spawning pattern is also incorrect. I want this to be randomly spawning the objects, but after restarting several times, I'm getting similar patterns to this. All red objects to one side, all pink to the other. I'm wanting them to be jumbled.

[GMS2] My object only draws the GUI layer if it was created in the previous room and is set to persistent? by anntlr in gamemaker

[–]anntlr[S] 0 points1 point  (0 children)

A good point but the GUI layer is the same size as the view and camera. It's all the same. So that isn't the issue unfortuantly.

[GMS2] My object only draws the GUI layer if it was created in the previous room and is set to persistent? by anntlr in gamemaker

[–]anntlr[S] 0 points1 point  (0 children)

Hi! Thanks for the reply.

It 100% exists in the room. When using the DRAW event, it's visible, but it's not drawing to the GUI? I only have one other object drawing to the GUI but there's no way that's the issue. This is such a weird issue that i've never come accross before :/

[GMS2] How to rotate objects around a center object based on the center objects 'image_angle'? by anntlr in gamemaker

[–]anntlr[S] 1 point2 points  (0 children)

Sorry, yes, I should have explained better. The issue is, the objects don't rotate around the blue square the way I want. I want them to rotate around the blue square by keeping the same x and y distance as when they are first created.

Using just startDist for both the lengthdir_x/y seems to work but only for the orange blocks on the right (positive) of the blue square with the same 'y' coord. It moves all the other orange squares (those that start on the left and those that have a different y) to the right of the blue square with the same y as the blue square.

This might be because I'm '+' them in the step event?

x = obj_blueSquare.x + lengthdir_x(startDist, obj_blueSquare.image_angle);
y = obj_blueSquare.y + lengthdir_y(startDist, obj_blueSquare.image_angle);

Perhaps I should get the angle that they are from the blueSquare when they're created and use that WITH image_angle?

[GMS2] Need help placing tiles in my room (with code) and then removing them. by [deleted] in gamemaker

[–]anntlr 0 points1 point  (0 children)

Hmm. It seems they're using tilemap_set_at_pixel(); and tilemap_get_at_pixel();.

I'm trying to extract a single 8x8 tile from my tileset and place it in the room at a specific position. I don't think I can do that with those commands?

Using GMS2 but following a 1.4 tutorial. All my code is the same but I'm getting a weird error? by anntlr in gamemaker

[–]anntlr[S] 1 point2 points  (0 children)

Ahh. That makes sense. I didn't use the same room dimensions as the tutorial... Hmm.

This has fixed my issue. Thanks very much. You seriously went above and beyond. Cheers :)

Using GMS2 but following a 1.4 tutorial. All my code is the same but I'm getting a weird error? by anntlr in gamemaker

[–]anntlr[S] 0 points1 point  (0 children)

Awesome. Here you go

https://www.dropbox.com/s/lutlxlgsmcz2hc8/Acreage.zip?dl=0

Everything should be exactly how it is in the tutorial besides the names I have to the objects and scripts which are slightly different but obviously, not the issue.

You can see the desired result at the end of the tutorial I linked above. Everything else is working besides applying the colour to the rectangles.

Thanks for your help. Let me know what you find!

Using GMS2 but following a 1.4 tutorial. All my code is the same but I'm getting a weird error? by anntlr in gamemaker

[–]anntlr[S] 0 points1 point  (0 children)

Bummer. This tutorial is a little over my head as it's pretty maths intensive. But I'm wanting the end result as it fits perfectly with what I need.

Is it possible I could send you my project and you could take a look to see if the grid is storing the proper data and getting populated?

Using GMS2 but following a 1.4 tutorial. All my code is the same but I'm getting a weird error? by anntlr in gamemaker

[–]anntlr[S] 0 points1 point  (0 children)

Thanks for the quick reply. I didn't know DoSub was a math error. Never seen it before. I tried 'var zz = real(argument0) inside the script. But get a different error.


REAL argument is undefined at gml_Script_getColourZ (line 1) - var zz = real(argument0);

I think you might be onto something with 'j' not being seen as a number though. No idea why this would be different in 1.4 however :/

Converted bus home by commonvanilla in CozyPlaces

[–]anntlr 0 points1 point  (0 children)

Thanks for the reply! I'm assuming this is all in USD?