GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 2010-08-24 17:25:30

paul23
Member
Registered: 2007-10-17
Posts: 110

parenting & trigger events, won't work

Well today I was working on my widget engine a bit more, and I started moving the step events to triggers to organize things a bit better..

ONly to find out I actually BROKE stuff.

After some searching (well wasn't long, I was expecting it to not work, as triggers seemed kind of "hacked" into gamemaker), I noticed that trigger events from child objects aren't automatically checked.. You actually have to put the event (and the code 'event_inherited') into the child object..

This makes triggers suddenly a lot less viable.. I'm currently building a script which automatically adds these events to objects, however it'll be slow (for each object with an event, it has to check all other objects for parenting).

EDIT:"Big" update: after rebooting my pc for some forced updates from microsoft (hate how it updates sometimes, even though I said I wanted to manually update) it "suddenly" works!
EDIT2:It seems to work for "most" objects. Still for 1 object it doesn't work. (I am unable to reproduce). However if I ONLY put the code "event_inherited()" into the object's event (from nothing) it suddenly works: so I still think there is -some- bug somewhere. Might upload a stripped version later today.
EDI3: Reopening seems that now even in all other objects the events work.. Either I'm crazy and imagining things or the actual structure of GM (events & parenting) are only updated at certain points.

Last edited by paul23 (2010-08-25 06:48:31)

Offline

#2 2010-08-25 22:30:30

xot
Administrator
Registered: 2007-08-18
Posts: 1,201

Re: parenting & trigger events, won't work

That's a really bizarre report, Paul. Not sure what to think of it. I haven't delved into GM8 at all, so I can't advise.


Abusing forum power since 1986.

Offline

#3 2010-08-26 08:58:08

paul23
Member
Registered: 2007-10-17
Posts: 110

Re: parenting & trigger events, won't work

Well I myself also don't know what it really is. I'm unable to reproduce, and it seemed to get completely gone.
More or less hoping some visitor also experienced the same thing, and can help verifying where the problem lays. For Gwidgets which I am updating again such a "bug" might mean a fatal problem if it occurs regularly. I hope it's of the same magnitude as the "no build" bug I experienced (2 times in the few years I had GM7, gamemaker wouldn't update the build of a game, and it kept using an old build whatever changes I made - was fixed by restarting gm though).

Too bad the GMC doesn't have a forum to discus possible bugs (though it would immediatelly turn into a failure and floated with people who say there's a bug in gm when they forgot to initialize a variable). And I don't even want to look at the bug-report forum on yoyogames-forums..

Offline

Board footer

Powered by FluxBB