#Where are the docs for the `other` keyword?

12 messages · Page 1 of 1 (latest)

burnt light
#

Does anyone have any links to docs that exhaustively explain how the other keyword behaves? Searching the manual yields zero results for "other", and googling has so far just led me to fragments of information scattered about old docs, forum posts, and the like. I suspect that other is fully, officially documented somewhere but I can't for the life of me find it.

short cape
burnt light
#

Are those its only two behaviors?

short cape
# burnt light Are those its only two behaviors?

there might be more, those are just the 2 I can name off of my head.
I only really use it in the context of a with statement.

Is there any reason you wanna know about other? general curiosity or are you trying to use it for something?

burnt light
#

I've been working on a VSCode extension for coding our projects and this is one of the remaining things that doesn't behave right.

short cape
#

ah, hmm
I tried to do a search for other uses of other myself
and with statements and collision events were the only things mentioned in a reddit post too.

the with statement context is prob it's most useful use, and there it's basically just the id of the object the with statement is in.

#

where, in a collision event it's the id of the object you collided with.
But you can also just not use collision events lol.

burnt light
#

Yeah that's the main way we use it, I believe. Fortunately it was easy to add that behavior! I'll have to hold off on the collision stuff until I figure out how we're using it in our projects (I don't actually do the game programming, just tooling development)

short cape
#

yeah, might be good to just see if there are any other uses of other in their code lol

I've been using GMS since 2017 and they are the only 2 uses I can think of that I ever used.

burnt light
#

That's consistent with what I've gathered so far

short cape
#

lol
but yeah, other is usually an id of an object, just what object's id it is depends on the context.