Author Topic: Create Events not firing?  (Read 2314 times)

klazen108

  • Administrator
  • The Kid
  • Posts: 286
  • your a kid now your a squid now
  • OS:
  • Windows 8.1/Server 2013 Windows 8.1/Server 2013
  • Browser:
  • Firefox 29.0 Firefox 29.0
    • View Profile
    • Delicious-Fruit
  • Playstyle: Keyboard
Create Events not firing?
« on: May 26, 2014, 04:17:39 PM »
Hey Guys, I'm having a weird issue in my fangame... let me start off with my specs:

Seph Edition Engine
Game Maker 8.1

So I've got this one room with a bunch of trolls. When you trigger them all and exit the room (as intended), the game starts acting very strangely. I'm not sure exactly what's happening, but it's like the create events are no longer being fired. The player starts moving faster than intended (but the physics seem to still be accurate), and the troll spikes in the previous room are clearly visible. You can see what I mean in the spoiler below. Caution: This is for my contest fangame, so if you don't want spoilers, don't open this tag!
(click to show/hide)
I have the troll spikes on layer -1000000, above everything, for development; in the create event I put them at layer 1000000, below everything, so you don't see them. However, it's like the code to hide them isn't being run!

I figured this might be a problem with my room transition code, since it was custom written. I've included it in the spoiler below if you want to look at it.
(click to show/hide)

Another strange occurrence is that this bug only happens in this exact room, and only when you exit it on the left for the first time. I cannot reproduce this bug by coming back here later. If it happens, F2 does not fix it; I have to close the game and reopen it, and then it works as intended for the rest of the game. Maybe it's an issue with my triggers? I've included the code for them as well in the spoiler below.
(click to show/hide)

If you require any other information, or would like to look at the project itself, let me know and I would be happy to share. Thanks for taking the time to read!

infern0man1

  • ~(=^・ω・^)ψ
  • Global Moderator
  • Oatmeal Killer
  • Posts: 1.021
  • Dear sir stroke madam, fire exclamation point
  • OS:
  • Linux Linux
  • Browser:
  • Safari Safari
    • View Profile
    • Twitter
  • Playstyle: Keyboard
Re: Create Events not firing?
« Reply #1 on: May 26, 2014, 08:38:07 PM »
Is the room set to be persistent? If it is, that's the problem. That's usually what causes some teoubles for me.

klazen108

  • Administrator
  • The Kid
  • Posts: 286
  • your a kid now your a squid now
  • OS:
  • Windows 8.1/Server 2013 Windows 8.1/Server 2013
  • Browser:
  • Firefox 29.0 Firefox 29.0
    • View Profile
    • Delicious-Fruit
  • Playstyle: Keyboard
Re: Create Events not firing?
« Reply #2 on: May 28, 2014, 01:31:51 PM »
Yeah, persistent objects can cause trouble too, but it turned out the issue this time was because of particle systems... apparently, even if you destroy them when you're done with them, they still can cause memory leaks. I was trying to make a new particle system on this screen's room start, and when it reached that line, it caused game maker to silently error out on the rest of the code in the room start & create events, causing all the symptoms I saw. That was really a weird one... lesson learned, avoid particle systems whenever possible :Kappa:

lemonxreaper

  • Administrator
  • Spike Dodger
  • Posts: 222
  • Do you even needle?
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 29.0 Firefox 29.0
    • View Profile
Re: Create Events not firing?
« Reply #3 on: June 04, 2014, 07:43:41 AM »
avoid particle systems? but they are so beautiful :Kappa:
Just pretend I have a cool picture like Zero.
Completed Fangames: https://dl.dropboxusercontent.com/u/4678222/Complete%20Fangames.txt