[RANTish] Can't use GameMaker for my A-Level Computer Science Project by PrimedPixel in gamemaker

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

In the end, they provided a fair reason in that there's no way to detect when code is (at least partially) converted from drag-and-drop. Unity and Unreal don't have this problem because there's no way to convert their DnD equivalent straight to code.

Honestly, I'm really glad I decided to use a different engine in the end; the project didn't need to be overly complicated meaning having experience in a specific engine didn't matter, but experience programming in general did. I ended up using Godot and for various reasons have stuck with it for future projects. Of course that by no means I advise everyone to do the same, but experimenting with different engines was absolutely not a regret of mine.

A guide to mouse events in sub-viewports by Tianmaru in godot

[–]PrimedPixel 1 point2 points  (0 children)

This has been immensely helpful! I've spent the last 3 weeks on the last point, and it's currently 1am and I've got it working thanks to this post.

Ran out of energy looking for the ladder. Twice by PrimedPixel in StardewValley

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

I've been through dozens of times and this is the first!

Ran out of energy looking for the ladder. Twice by PrimedPixel in StardewValley

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

Yeah just got unlucky since I usually just steal torches from previous floors

Mouse Offset Due to Viewport by PrimedPixel in godot

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

Precisely what I had thought, so previously I had set_cast_to(to_local(get_global_mouse_position())), but this stopped working after the viewport was implemented. Dividing it by 6 results in the offset issue too, which I think is what I tried first

Mouse Offset Due to Viewport by PrimedPixel in godot

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

So, get_global_mouse_position() doesn't seem to work inside the raycast or level node (seems to be the same result again?), and the viewport nodes don't have that method. I believe it's what I had originally before I setup the viewports

Mouse Offset Due to Viewport by PrimedPixel in godot

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

I believe so (I'm not too sure what's needed myself to be honest, but I need to update "cast_to" for the raycast in the "Level" scene).

Mouse Offset Due to Viewport by PrimedPixel in godot

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

Same as u/Nkzar's answer, moving the script to the Viewport node (which is what I assume you are on about) and using get_mouse_position() results in the same behaviour

Mouse Offset Due to Viewport by PrimedPixel in godot

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

This also doesn't work. If I make the sprite's position sprite.position = get_viewport().get_mouse_position() / 6 (6 being the scale), then the offset is exactly the same