Many sprites spawn many bullets -> preview crash

This forum is currently in read-only mode.
From the Asset Store
Various Bell Sounds (from small to huge) / 35 Unique Clips / 2:46 minutes of audio
  • Hi, I'm new to Construct,

    and am trying to copy the basic gameplay of Plants vs Zombies, just for fun (no worries if you're reading this, PopCap )

    i have just implemented "erase plants with shovel",

    and a provisonal approach with just Snow Pea plants, and slowly moving regular zombies, wich will move even slower, and turn blueish when hit. (I haven't included Health or the gameplay grid, or anything else yet)

    That works fine, for a while, until the preview crashes.

    more Plants = earlier crash.

    Sometimes i have to kill the temp.exe process afterwards.

    Do you know what went wrong here?

    Thanks in advance.

    Here is the .cap:

    http://www.box.net/shared/xb27guy2mn

    I'm on Vista x64, using Construct 0.99.84

  • Woah, this one has me stumped!!! At first i thought it must be the timer so i tried spawning the bullets every x milliseconds... nope still crashes. I have tried toggling all the events off except for the bullet events and it still crashes, so it has to have something to do with those bullets (as you already stated). Of course, it doesn't crash when toggling off the bullet creation event.

    I decided to try and make a .cap with the same amount of objects that spawn the same amount of bullets at the same time intervals and it works fine .

  • Ah-ha! Uncheck "enable scripting" under the runtime properties, and that will fix it.

  • cool, that's it. thanks guys.

    and i figured out, if i use one python command at Start of layout, instead of disabling scripting, it won't crash either.

  • Many thanks for this one! I've spent days trying to track down the cause of the crash on my game. I eventually narrowed it down to one line, a line that spawns the bullet, and I had no idea what was causing the problem!

    Again, many thanks!

    I have a question though. What if I want to have scripts on my game? Does this mean I can't use scripts anymore?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Do you have Python installed?

  • Oh, does one need to install Python first? I thought it was already built within Construct.

    Sorry. I still haven't read the documentation about Python Scripting yet since I didn't have any use for it on my current game. Will review it once I have the time.

    Thanks

  • No python install is necessary. No crash will occur if you use some python at least at the start of the layout to initialize python. If python isn't initialized the app will crash if ~ 700 objects are created (it's a bug). This bug shouldn't be a problem as long as some python scripts are used when scripting is enabled.

  • Ah, so that's how it is. Thanks a lot R0j0Hound!

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