Things are breaking and I have no idea why

0 favourites
  • 12 posts
  • So far I'm loving this software. Game is coming along very nice. However, I tried making a boss enemy, and it was working just fine until something broke and it started ignoring actions and doing things on its own. No issue at first, just have to figure it out. Then it just wouldn't work period even when there was only one event giving it a move to command. So I deleted the boss enemy and started over. Now whenever I preview the layout, I cannot shoot even though NOTHING ELSE has changed. No other events have been changed. Variables are all as they should be.

    Are there any engine bugs I should be aware of? Has anyone else had issues with things that worked fine just ceasing to function even though logically everything is ok in the event sheet? I have no idea how to remedy this and it is getting very frustrating, to put it lightly.

    Thanks

  • Could you send a screenshot of your events? It's going to be much easier to help you if we can see what your events are.

  • I have over 700 events in my project for context. Also the way I prefaced it made it sound like it had a problem with the boss events. But basically to clarify, everything was working as intended and then now one of my basic functions (player shooting) just doesn't work when clicking the mouse. The boss events were in a separate group from anything else, and that group has since been trimmed down alot when trying to rectify the boss issue independently. Everything else has been untouched pre-break.

    I don't think sending screencaps of my shooting events would help since there have been no changes to them right before or after it broke. But I would send them if I find the issue lies with them specifically.

    I guess what I'm trying to get at is: are there stability issues I should be aware of in construct? Is it possible to have too many events? Things along those lines because I don't think the issue stems from the event sheet.

  • I don't know why this is happening, you might want to ask some users such as dop2000 or RojoHound about it, perhaps even Ashley if it is an engine bug.

    One idea is that perhaps your layout's assigned event sheet was changed? Check the layout's properties tab and check to make sure it is using the right event sheet.

    Other than that, I don't yet know what the cause could be. Sorry :(

  • are there stability issues I should be aware of in construct? Is it possible to have too many events? Things along those lines because I don't think the issue stems from the event sheet.

    I'm not aware of any issues like that. 700 Events isn't exactly all that big, I've seen users with projects having several thousand (iirc even 10000+) events.

    My guess would also be, something mucked up an event somewhere, perhaps just on accident and unnoticed. Classic example: You deleted the boss. If you delete a sprite that is referenced somewhere in an even/action/expression, the action also gets removed. It has to since the referenced object doesn't exist anymore. This absolutely can break your event logic, and it might go unnoticed.

    Also, posting the project or at least screenshots of the events in question is always helpful.

  • Ok here is the events in question

    bullet sprite is still in project. All behaviors unchanged. Canshoot still works just as it should when looking at the debugger. Nothing logically makes sense as to why it would stop working. I just have no direction to start looking where it could have gone wrong. The bullet just doesn't spawn.

  • Do you use layers? Is layer 0 correct?

    Might be the case that layer 0 is your background layer and therefore hiding the bullet.

  • I don't know why this is happening, you might want to ask some users such as dop2000 or RojoHound about it, perhaps even Ashley if it is an engine bug.

    One idea is that perhaps your layout's assigned event sheet was changed? Check the layout's properties tab and check to make sure it is using the right event sheet.

    Other than that, I don't yet know what the cause could be. Sorry :(

    Checked all that and it isn't the problem. I'm sure it'll get resolved one way or another. It's just frustrating when you run into problems like this. I appreciate you taking the time to help me :)

  • Do you use layers? Is layer 0 correct?

    Might be the case that layer 0 is your background layer and therefore hiding the bullet.

    Layer is correct. 0 is the game layer

  • Hmmm.

    Is "canshoot" a global variable? If it's a local variable, it might need to have tick box ticked so it doesn't reset back to 0 every tick.

    Are you saying you can see in the debugger that the bullet objects are spawning? If so, click on this in the debugger, do you see the X and Y position? Maybe it's appearing in a weird place.

    Could disable the "destroy if not onscreen" just to rule that out from destroying it instantly.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Solved my bullet issue. Went line by line and when I deleted the boss the action "destroy bullet" was triggering with no condition, since the boss was referenced in the condition before. So as soon as I was shooting it destroyed the bullet.

    I still have the underlying issue of my boss enemy not working, but I will post a new topic if I run into an issue that stumps me after trying different methods to solve it.

    Hopefully there's a lesson there from me being dumb lol

    Thank you to everyone who took the time to help

  • Hah, I knew it!

    It's just something that happens, especially if you're not used to it working this way. In usual programming no reference get deleted, it just starts throwing errors. Construct prevents throwing errors by also removing the reference. If I think about it this way, I'd probably prefer the latter, but I can see why the first one also makes sense.

    Either way, before deleting something that has events attached, just do a "find all references" to check where you used the object in your events.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)