angryscientist's Forum Posts

  • This is fantastic! Thank you for creating it! I'll credit you on anything I make with it...

  • I'm glad you enjoyed it! I've been meaning to make a better version...

  • I want to preview my game on mobile but don't want to use a browser. I'm essentially looking for a mobile equivalent of NW.JS. I tried PhoneGap but it didn't work for me. Does anyone know of any good alternatives?

  • R0J0hound Do you think you could add the option to disable anti-aliasing?

  • dop2000 Yup, that solved it. I figured it would be something simple like that.

  • First, let me say that this is probably the strangest thing I have ever encountered in Construct 2, so I really hope someone can shed some light on the problem.

    So I was attempting to create a simple maze generator in Construct 2 with the tilemap similar to Prim's Algorithm. To keep track of the current position of the end of the maze, I had an object called "marker" that would move around according to the following. At the beginning of each frame, it would call a function called "get" to generate a direction to move in. It was supposed to work by (every time "get" was called) randomly setting a text variable called "direction" to either "up", "left", "down" or "right". If the random generator spat out (For example.) "up" it would check to see if the tile above the "marker" was occupied; if it was, it would call "get" again. It would continue doing this until it got a suitable direction. At the time of posting this, the "marker" was not yet programmed to actually move, simply to check where it could move. I had it set so that "get" would be called at the start of the layout or upon on a mouse click.

    I should also mention that unless I otherwise specify, I am always undoing my changes before testing a new solution.

    The problem started simply: at the start of the layout, it would always set "direction" to "right" even if the tile to the right of the "marker" was occupied. Upon clicking the mouse (And calling "get" again.) it would randomly pick between all suitable directions as it should... Plus right. (Even if the tile to the right of the "marker" was still occupied.) I first tried rearranging the order of the events with no change in this behavior. I then tried deleting all the code that had anything to do with the direction "right". Upon running I would immediately get an error: Uncaught RangeError: Maximum call stack size exceeded. If I undid my deletion of the code it would run as before. If I deleted the code involved with another direction (For example "up") it would still run as before minus the deleted direction. I tried searching my project for "right" and saw only the events previously mentioned. I tried disabling the all of the code involved with choosing any direction and it ran just fine. (But without choosing a direction.) After undoing my changes I tried only disabling the code involved with picking a new direction if the tile to the right of the marker was already occupied. It always still picked right uppon running the layout. I then tried only deleting "right" from the "choose" expression that was randomly picking the directions. This time I again got the "Uncaught RangeError". Deleting any other directions from the "choose" expression gave me no "Uncaught RangeError"s. Lastly and most weirdly, I delete the code responsible picking a new direction if the tile to the right of the marker is already occupied; while leaving "right" in the "choose" expression. If I run it still always first picks "right" but it gives me no "Uncaught RangeError". But if I then re-write the code I deleted (Without undoing) it gives me the error.

    Needless to say, this is incredibly bizarre and I can think of no reason whatsoever that would cause this to happen. This might be a problem with my computer or some 3rd party plugin I have installed (Though there or none used in this file) so I've included a download link. If others encounter the same problem or have any ideas then please respond with your thoughts.

    This file has not been altered since writing this post.

    Construct 2 beta release r254

    https://drive.google.com/uc?export=down ... CWo6ZbHWPG

  • Prominent I am not having the problem specifically with overlapping objects. Just with trigger ounce events in general. For example, I might want to trigger an event only when a boolean first becomes true.

  • I have used this technique before, and while it is effective, it is inconvenient when you have hundreds of events.

  • What I want is simple. I want to get an event like "Is overlapping" and turn it into an event like "On collision" (i.e. make it only trigger for one tick.) without using trigger ounce while true. I don't want to use trigger ounce while true, because if one object is overlapping already, and another object collides as well; it will not trigger a second time. Any ideas?

    -Thanks!

  • I am trying to approximate the shape of multiple sprites using to polygon plugin. So multiple sprites and be Pinned to each other and calculate collisions with the polygon object.

    But, in light of the fact that I made this post, I am unable to do this. If anyone knows how or has any advice than please respond.

    -Thanks.

  • I just want to know if there is any way to tell how much of an object is overlapping another. Is there a weird trick or plugin?

    Thanks.

  • Hmm... Weird. Anyway sorry, I didn't say how to add an audio tag, but glad I could help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When you Stop a sound, you don't put the name of the sound, you put the tag of the sound. Add a tag to the sound called "Snd_Fire" (Or anything.) and then stop the tag.

  • The boolean variable only needs to store one byte of information. So a boolean variable is slightly better for storage and performance. But only very, VERY slightly. So unless you have literally a million variables, it won't make a difference.

    I would recommend using a boolean variable, just because it lets you do things, like toggle the boolean. Which is surprisingly difficult to achieve with a number variable.

  • There are a couple ways to get around this. You can just spawn the bullet a few pixels out of the bounding box of the enemy.

    However, a better solution would be to give the bullet a variable called "Creator". And when anything spawns a bullet, set its Creator variable to "self.UID". And then, when the bullet and the enemy collide, compare if bullet's Creator variable is equal to the enemy's UID, if it isn't, destroy the enemy.

    The second solution is better because the enemy will sometimes still destroy itself with the first solution.