OpenGMK
OpenGMK copied to clipboard
Game Maker 8: duplicate object behavior?
Hi,
I've decompiled a game project, and I have two objects with the same name in the Objects tree but with different actions. Is that an incorrect decompilation, or a valid thing for GM8?
That can happen. GM8 doesn't stop you from creating multiple assets with the same name. Whichever one was created first (higher in the list when decompiling) will be used when the object is named in code, but both can be placed in rooms, as parents, etc.
Is that correct, that the higher object in the project's list will be used when its name is used?
I'm asking because looking at its code tells me that isn't used.
Almost correct. It's whichever one was created first. Changing the order in the gmk won't affect anything.
The decompiler lists objects in the order they were created, so if you need to know which one would be used by GML code, you can look at which one got placed higher in the list.
Does that require some verbosity option? I don't see any objects listing during decompilation.
I meant the list in the GMK, under "Objects". Like this:
I see. Then it's strange, but the upper object's code isn't used at all, and instead the second one is used.
Can you show us specifically what you mean when you say "its code is used"?
I mean I see which font it loads and there is no such font. Also it prints a specific text, which never appears in the game.
Sorry for the delay, are you talking about how text doesn't appear after the game is decompiled? That happens because fonts can't be decompiled to GMK. You need to open each font asset and select a new font.
No, I mean choosing a font which doesn't exist in the game's list of fonts.
I don't think that's possible, but if you're able to share the game you're talking about, we can take a look and try to see which behaviour you're talking about.
It's the same as in my previous issue.