Guizmus's Forum Posts

  • You just need to add a variable on the player : "jumpNumber".

    Each time he jumps, add 1 to this number. If the number is 2 or over, then you don't trigger the event. When the player lands, you reset this number to 0.

    Example.

  • Sorry but your link doesn't seem to work (you linked the private version of your file, not the public URI)

    I'll try to build something to show how I would do it. Only solution I can see is replacing the whole bounce of solid from the bullet behavior with home cooked events. If anybody sees another method for this, don't hesitate.

  • Ashley described (I don't remember where) a good method for this :

    • name your different Tilemaps depending on their utility (Collision, Terrain, Buildings, ...)
    • select the right one from the Z-order bar

    I tried it multiple times and it's a lot easier.

  • Yeah, sorry I didn't post it here, I wasn't sure it was enough.

    Glad it helped

    I don't know exactly what was wrong with the physics, surely something you needed to unactivate and that wasn't activated afterwards, but I didn't manage to find it.

    The save solution worked in my test too, after I found that you handled the "start click" event in both event sheets ^^ that took some times too, I didn't think of this

  • Here is an example on how to pick an object clicked using its family, and how to use the pathfinding behavior to make it move on click.

    I created a red sprite, the destination, to have somewhere for the car to go to.

  • This man is amazing... I saw his assets on /r/gamedev yesterday and just discovered him here. This is great stuff ! let's all donate !

  • Shadows... dynamic light... well, it's a hard subject.

    Canvas plugin did have a high performance influence last time I used it (for the exact same reason as you did). I don't know of any workaround that could help with this right now. I did some research and tries with the illuminated.js script, but didn't manage to make a plugin out of it.

    But, in your first post, you asked for static lights like a lamp. This particular case is quite simple and doesn't require canvas at all.

    Here is an example on how to do a simple static light.

    Edit : highlight on the method :

    • a layer "lights", black, not transparent, on top of the game.
    • add a multiply effect to this layer
    • add white sprites (or colored ones if you want red, green and other lights) in this layer

    The multiply will make everything black in your game, except what is lighten.

  • If you use peterbot1970 method, do all this in a separate layout where only this sprite is present, and don't include this sprite in the other layouts. Such a sprite would use a lot of VRAM, so it's best to keep it separated.

  • C2/cocoonJS projects are executed in javascript, client-side. SQL is server side. So no, you can't use SQL calls right from C2.

    But you can use the AJAX object to send and pull data from URLs. Doing so, you can send data to your server where, server-side, you will be able to use SQL and then send data back.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Nop, you just double click the enemy to access the animation editor. Then, on the left side of the animation, you can see various buttons. One of those let you define the "collision polygon", the box that will tell what is solid and what isn't in your object. This should be set for every frame (different polygon per frame). You can also use the function "guess polygon shape", that will roughly set the collisions on all your frames.

    This won't matter though if you remove the platform behavior.

    Why your enemy isn't spawning where you want him without the platform behavior is a mystery though for me right now. Maybe a look at your capx could help understand it.

    Edit after your edit 2 : nice to see it work ^^ still no idea why :p

  • From the top of my head, a bullet with 850 speed could very well have some problems on a low framerate. Why ? Because 850px/sec is a lot, and if the game just has 1 big tick when the ball is near a wall, it can very well go through, or in your case get stuck in the wall.

    There is no good solution to this problem (to my knowledge) but there are some fix you can add :

    • reduce the speed of the ball, if it's possible in your game
    • add a check every now and then to test if the ball is overlapping with the wall. If so, check what wall, the current exact position (is it bouncing or is it stuck ?) and move it just a little so it isn't in the wall anymore.

    I know this doesn't seem like what you want, and the problem may be different... Hard to tell without a capx

  • No matter where you spawn the enemy, the platform behavior is supposed to make things be on top of solids, not inside. So this will always be the case.

    What you should do :

    • if it's only 1 particular enemy type that is half in the floor : change this enemy collision box so its feet are not "solid".
    • if it's all your enemies, change the floor collision box so that the half top part isn't solid.
  • You have to ask on CocoonJS' website for this, with this form.

  • Like blackhornet said, we need to know how you make spr1 and spr2 move to answer you. If it a bullet behavior ? A platform behavior ?

    Basicaly you would want to set the X and Y vector of the movement depending on the sign of (spr2.X-spr1.X) and (spr2.Y-spr1.Y) but it could also be easier with the angle of motion.... all depends on the tools you are using.

    if you don't know how to explain this, try to share your file so we can take a look.

  • Button objects aren't classic objects as they are native html form elements. Therefore, they are handled by CSS. You can set an ID in the button properties, and then apply a CSS style to it through your website. I don't know other methods for doing this.

    Another solution would be not to use the default button object, but create a sprite and add everything that could make the user believe it is a button (some kind of hoover, a onclick, some visual effects, you could also use the spritefont, ...)