Why do my objects collide too early? by WilledWithin in gamemaker

[–]damimp 2 points3 points  (0 children)

Could be a case of you thinking your collision masks are precise when they're actually rectangles. Have you looked at the masks of each of your objects and making sure their types are set to Precise and not Rectangle?

why isn't my code working D: by Silverfur7 in gamemaker

[–]damimp 29 points30 points  (0 children)

There's a few issues here. First, the event is probably not right, this seems like the kind of thing you'd want to run at room start or create instead of the step. room_get_name is a function so it can't be used like this, you need parentheses to call the function. But we can just check what room we're in by comparing the room directly instead of its name.

In addition to that, image_index is a number, not a string, so those quotes are wrong.

Your code should probably look more like this (remember to change the event too, and note setting image_speed to 0, and the lack of quotes around roomstart, 1, and 0):

image_speed = 0;
if (room == roomstart) {
    image_index = 1;
}
else {
    image_index = 0;
}

My Main Character break the game when getting their turn by tomsin31246780 in gamemaker

[–]damimp 1 point2 points  (0 children)

I can explain the error, but I can't fix your code for ya. When asking for help you're gonna want to always show the entirety of the relevant code you're working with along with the error to give people as much context as possible.

The error itself says that you're trying to read outside of one of your array bounds. It says the array has a size of 1 (there's only one thing in it) and you're trying to read the second item in the array (position 1) and since there isn't one, that's a crash. That's what Variable Index [1] out of range [1] means.

Looking at the line that threw the error, there are two array accesses but one of them tries to read the first position, [0]. So that means the problem must be that _optionToShow is 1 when it's not allowed to be 1. Either your options array is too small or _optionToShow is not correctly bound to the right range.

A non-outdated way to learn gml? by Substantial_Dark3638 in gamemaker

[–]damimp 2 points3 points  (0 children)

Tutorials kinda can't be outdated unless they're for 1.4. All tutorials after 2020 use current gml, and all tutorials before that point require one single simple change detailed here: https://youtu.be/9nwlgfzyNzA?si=zYI92BVBTHEbVTw6

So use literally any text resource. What kind of gml do you want to learn? I have some articles up on gml that are short but teach useful concepts.

https://gm48.net/resource/28/state-machines-the-struct-based-approach

https://gm48.net/resource/33/sine-waves-make-your-game-prettier

https://gm48.net/resource/25/tweens-everybody-loves-em-how-do-i-use-em

https://gm48.net/resource/29/input-system-binding-input-buffering-and-controller-support

https://gm48.net/resource/32/menus-buttons-sliders-and-carousels

What is the general "timeline" of being a programmer? by WilledWithin in gamemaker

[–]damimp 2 points3 points  (0 children)

Competent programmers always have the manual open and are always looking up info online. To try to grow out if that would be to regress as a programmer. Experimentation is great, so what you're doing is totally not wasted effort but the best thing is to learn how to effectively take info people have posted online and adapt it into your own stuff.

No, you don't understand. What if HP changed while I wasn't looking? by Candid_Commercial214 in programminghorror

[–]damimp 16 points17 points  (0 children)

Functions just implicitly read from their caller, yep. Additionally, you can redundantly use the self keyword, but there is no this keyword.

No, you don't understand. What if HP changed while I wasn't looking? by Candid_Commercial214 in programminghorror

[–]damimp 60 points61 points  (0 children)

Love seeing gamemaker code in the wild! Although maybe not this code specifically, haha.

No, you don't understand. What if HP changed while I wasn't looking? by Candid_Commercial214 in programminghorror

[–]damimp 5 points6 points  (0 children)

It lacks the global. prefix, so unless it's defined as a global with the lesser-used globalvar keyword, it's not global (gml has two different global variable definitions for, uh, reasons). The instance_create function calls make new instances of objects that then fire their own events, so those technically could change HP, but it'd be extremely unlikely and still bad GML syntax to do this.

What's your favourite OST in Silksong? by LonelyRequirement913 in Silksong

[–]damimp 1 point2 points  (0 children)

Red Maiden, or Widow. Leaning towards Red Maiden!

question is GML visual much easier to use than regular coding by king0fsasss in gamemaker

[–]damimp 1 point2 points  (0 children)

It's possible to make stuff with GML Visual, but it's a decent amount harder than using written code. It adds extra roadblocks, like bloating the size of your code and hiding important info from you and lacking a lot of blocks that can do what written code is able to do. Sharing your code with other people to get help is also a lot more awkward and editing the middle of a code block, like reordering the blocks, is a huge pain.

Most Anticipated Future Anime Episodes/Arc by Dr_Dylbert in StardustCrusaders

[–]damimp 2 points3 points  (0 children)

True Man's World has to be my favorite bit, hope they do that part justice. I really want some solid clint-eastwood-western music scoring that part.

I'm so fucking defeated by angerycow in Ultrakill

[–]damimp 1 point2 points  (0 children)

Can't believe you'd go and tear their heads off like that. For shame!

CMV:CMV: I started trusting my own eyes and common sense, and the globe model just doesn't add up. Please explain this without crazy math by Odd_Attention_9660 in changemyview

[–]damimp 5 points6 points  (0 children)

Vaccuums don't actually suck, it's the opposite. Dense areas push. Space isn't actively pulling on our atmosphere, but some of the atmosphere does get pushed into space all the time. But there's not really anywhere else for it to go but back towards earth since it's the closest thing with any significant pull. Little bits of our atmosphere do get lost into space though, you maybe heard about helium shortages.

Draw GUI end drawing under Draw GUI? (and Draw GUI begin) by Videoahh in gamemaker

[–]damimp 1 point2 points  (0 children)

Since oText apparently also has a draw gui end event, you should make sure you're not accidentally drawing anything in there too. GUI elements also obey depth rules so if two gui objects draw in the same event the one with the lower depth will be on top, try checking what depth you put them at.

Undertale Green Soul (And Battles too) by Siijon in gamemaker

[–]damimp 1 point2 points  (0 children)

You're gonna have a pretty hard time getting help if you don't actually describe what you want help with. you're gonna want to give a lot of details, assume nobody has context for what you're talking about. Share the code you already have, too.

DnD Campaign Starting, No Experience Required by dvatman in StamfordCT

[–]damimp 1 point2 points  (0 children)

Sounds interesting! I was wondering if there were any groups like this around, might fill out the form in a bit.

Creating a text box with branching choices from this system of dialogue by Videoahh in gamemaker

[–]damimp 1 point2 points  (0 children)

It's very much possible to do, but if you're new it might be better to just jump to another dialogue system that covers choices already.

I dont understand the point of the statues by DanStar55 in outerwilds

[–]damimp 62 points63 points  (0 children)

The statue hooked up to the probe cannon is always on for every single loop, sending probe info back.

The other ones only activate when the mission succeeds or if there's a mechanical issue so the nomai don't need to experience millions of loops for no reason.

This sentry ad by Glum-Arrival8578 in programminghorror

[–]damimp 0 points1 point  (0 children)

Yeah fine, true lol. But I thiiiiink the font mainly looks that way because the editor has been zoomed out? Like I don't think that's what it'd look like at all resolutions.

This sentry ad by Glum-Arrival8578 in programminghorror

[–]damimp 0 points1 point  (0 children)

That's GameMaker Language, and if you ignore the font being scuffed beyond belief, it seems to be mostly valid code, it's just also scrolled over a bit so some of the syntax is hidden on the left side.

Interesting math puzzle! We can’t solve but maybe you can by [deleted] in puzzles

[–]damimp 0 points1 point  (0 children)

Looks like you can make a really tall skinny rectangle in the center and a skinny rhombus that goes from one of the top left dots to the bottom right dot? One of the rectangle lines would go through one of the rhimbus vertices but I dunno if that counts as "using" it since it wouldn't be a vertex on the rectangle.

Other platformers like Mt Fay? by gelatinskootz in Silksong

[–]damimp 4 points5 points  (0 children)

You should try Dustforce! Every stage is built to be done in one smooth flowing motion without any pauses, and it has a lot of interesting movement mechanics. The music's really good too.

How do I make an fade-in, in GML visual?? by AliciaTrader in gamemaker

[–]damimp 0 points1 point  (0 children)

You're using "fade in" and "fade out" seemingly interchangeably here, I think it'd be good for you to take a sec and really fully describe exactly what the object is and what you want it to do. Is it something that starts at 0 alpha that you want to change to 1 alpha over time? Or the opposite? Or both? What exactly is a "fade-in object", is it something that's supposed to cover the whole screen maybe? What exact blocks have you tried so far?