game maker – How to compare strings in GML

game maker – How to compare strings in GML

When comparing anything in GML, you have to use a single =. Other than in javascript or c#.

so it would be:

if test = test{
    return true
}else{
    return false
}

the code above will return true

But to test variables in other objects, you would use [objectName].[variable] .

For Game Maker Studio EA 1.99+

The right way to compare strings is using ==

Also for Game Maker Studio 1.4+

But for Game Maker 8 or 8.1 i dont know.

game maker – How to compare strings in GML

Leave a Reply

Your email address will not be published. Required fields are marked *