Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

GMEdit

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

"overriddenProperties" not being shown in "#event properties"

A topic by Barnaque created Jul 27, 2021 Views: 187 Replies: 3
Viewing posts 1 to 4
(1 edit)

The "#event properties" doesn't show properties if they override a parent's object property.


Looking at the object's .yy file, we can the "properties" are being properly parsed as shown in this example : 



But in the event of properties who override a parent's property value (the "overriddenProperties" array in the .yy), the properties do not show up in GMEdit, as shown in this example : 




The problem occurs when using the latest beta version (and prior versions too, but I'm not sure which on I was using at that time).

I just tested this, and trying to overwrite a property from a parent object in GMEedit (by assigning it the same name), will simply created a new property with the exact same name. I'm not sure how that behaves  code wise then in Game Maker, but we can see Game Maker considers it a new property with the same name.



The code in GMEdit : 

(parent)


(child)



Would it be possible to add a way to specify that the property is overwritten? Something like : 

interacted:expr<override> = #"scr_interactable_player_dialogue_create(self);";

Developer

Added for the next release. It’ll be

obj_parent.variable = newvalue;

because that’s the data that is in the YY file.

Also, you shouldn’t be putting ;s in variable definition values - right now GM is compiling variable definitions into a separate event with variable assignments (which means that an extra ; does no harm), but this could change in the future.

Great, thanks for the update and the info, it's really appreciated.