Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics


A high-end code editor for all things GameMaker · By YellowAfterlife

cast warning

A topic by CakeNeq Games created Mar 01, 2021 Views: 216 Replies: 2
Viewing posts 1 to 3

I'm getting the below warning on a bunch of my collision checks since upgrading to the newer beta release. The checks all work as intended, and I realize that it's saying that that script doesn't return a bool, rather it returns an id of collided object. Though as far as GM is concerned, this still works as a bool T/F statement (since the id would be returned is > .5)

Note sure if I just need to turn the feature throwing this warning off. I've tried toggling some of the cast settings, but TBH I'm not 100% sure what I'm doing there.

Any guidance would be appreciated :)


Generally you should be using != noone, but this is relatively safe - I added a special case for this to the next build.

Also note that doing inst >= 0 and inst < 0 specifically is no longer safe since doing var v = self will give you a struct-reference the instance rather than an ID.