IkBenHarm's Forum Posts

  • 14 posts
  • So I've been making a game for school, today I worked on it again. But suddenly when I tried to start my game it gave the following error:

    Javascript error

    Uncought InvalidStatError: An attempt was made to use an object that is not, or is no longer, usable

    localhost/preview.js, line 1217(col 10)

    This never happened before. I do not use plugins or anything like that so that can't be the problem...

    I did not add a sprite or other form of object either, I only used the ones I already had.

    Someone knows a solution?

    Tnx in advance!

    Ps: I do not know if this is the right forum to ask this... I thought this was the best option...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There is a minus in front of the pauze_number, so when pauze_number is 0 it says

    -0+1 (which is 1)

    and when Pauze_number is 1 it says

    -1+1 (which is 0)

    this works! Tnx!

  • This worked! Thank you very much!

  • There is a minus in front of the pauze_number, so when pauze_number is 0 it says

    -0+1 (which is 1)

    and when Pauze_number is 1 it says

    -1+1 (which is 0)

    mh never seen that before, i wil try, tnx!

  • Setting up your events like below would be even better to prevent unwanted switching

    <img src="https://dl.dropboxusercontent.com/u/48563442/pauzenumber.jpg" border="0" />

    Wouldn't this be adding 1 every time P is pressed?

  • Event 2 sets Pauze_Number to 1, then because events run top to bottom, event 4 runs just after and sets it back to 0. Use the 'else' condition instead.

    i do see why it does not work now, tnx.

    however, it still would now work with else

  • wouldn't this just keep adding 1 at Pauze_Number?

  • i do see why it does not work now, tnx.

    however, the else would not work either

  • <img src="http://i39.tinypic.com/2i792px.jpg" border="0" />

    what i meant to make here is to make a pauze screen but...

    This basicly does nothing, somebody any idea why?

  • Okay, will check first in the morning, tnx!

  • Put on a check for something like : When zombie spawns > if overlapping player > select new location

    So something like this? (Sorry just started construct)

    <img src="http://i42.tinypic.com/2ykf86r.png" border="0" />

  • So i've created a little zombie-like game.

    Every time you kill a zombie there will spawn another one randomly at the map... There is one problem, A zombie can now spawn in the player or at one pixel from the player, making it an impossible game.

    Does anybody know how to spawn an object at a random location, but not near another object?

    Tnx

  • Just noticed this is the wrong part of the forum, sorry for that.

  • So i've made my first little zombie-like game, but i seem to have a problem.

    What now happens is as soon as you kill a zombie, there spawns another one randomly at the map. But it can also spawn like 1 pixel away from the player, the player will be dead in no time like this.

    Does anybody know how to spawn an object random at the map but not near another object?

    Sorry if this is a noob quuestion, new to this (:

    In advance, Tnx!

  • 14 posts