Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

40
Recently upgraded many projects to GMS 2.3, and we ran into this breaking issue with the "other" keyword. I thought this information might help other folks make the GMS 2.3 transition, so here it is!
Post Flair (click to view more posts with a particular flair)
Post Body

In GMS 2.2, the other keyword returned an instance ID. In that version of Game Maker, you could do this:

// This script will return a list of instance IDs of characters that are not the 
// character who is calling the script.  

instances_that_arent_me = ds_list_create();

with o_character {
    if (id != other) {
        ds_list_add(instances_that_arent_me, id);
    }
}

return instances_that_arent_me;

However, in GMS 2.3, other is not an instance ID. It is a struct that has an instance ID inside it. So you would have to update the above script like so:

// To achieve the same result in GMS 2.3, you have to reach inside the "other" 
// struct and use dot notation to get the instance ID out of it.

instances_that_arent_me = ds_list_create();

with o_character {
    if (id != **other.id**) {
        ds_list_add(instances_that_arent_me, id);
    }
}

return instances_that_arent_me;

You can still use other like this in both versions, however:

with other {
    do_some_stuff(); 
} 

This means that you will need to evaluate your code, because wherever you were using the keyword other in GMS 2.2, you may need to replace that with other.id in GMS 2.3.

-----

Source (Butterscotch Shenanigans): https://www.notion.so/other-keyword-4a09191a4e7e472592867a2a536e0f7a

Author
Account Strength
90%
Account Age
8 years
Verified Email
Yes
Verified Flair
No
Total Karma
1,718
Link Karma
542
Comment Karma
1,163
Profile updated: 5 days ago
Posts updated: 8 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
4 years ago