Yann's Forum Posts

  • You need a kind of flag to differenciate the two for picking.

    Create the boolean instance variable 'destroyed' on your object with default false

    and then

    Mouse: on object left click
      -> Object: set destroyed to true
      -> Object: create object on layer 0 at Object.X+50,Object.Y
    Object: is destroyed
      -> Destroy

    This way, when you left click on the object, another one should be created 50px to the right and this one should disappear into nothingness.

  • Well I hope you have a good idea 'cause in this example you can't jump on a platform (move up and move sideway). Once you jumped you have no choice but to fall. Because you can only move one direction at a time and falling wins over left and right.

    Otherwise you would never fall by keeping your finger on left or right arrow. You can try by changing the order and put the fall event underneath the left and right (: (try it, it's fun you're floating \o/)

  • Did a little tweaking on Ize's gesture capx (:

    gestureMod.capx

  • Yeah, at this point without seeing the entire capx it's hard to tell (:

    I probably made some mistake, I never tested what I wrote :D

  • need capx

  • Hmmm can't give a usefull answer, it's probably due to some ways you create your sprite. Or some ways you destroy them. Can't say much with only what you said.

    Might be a good idea to post the capx. Even screenshots might not be enough.

  • I believe density is the way to go, but it depends how you interact with physics, if you have a 8 direction character with physics on it just to activate collision, you won't be able to slow down the character.

    The character must be driven by physics only for the density to work on him... I guess :D

    Delgado, seriously... I... don't understand what you said.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • post your capx test, it's better if we point out your mistakes, you will learn faster

  • There you are

    gridSideScroller.capx

  • Oh my ugly code, I was so young

    now I do grid movement like that:

    gridMovement.capx

    Oh ok I see now... Not so ugly after all, there'are vectors *_*

  • When I use snapping I tend to put the origin on top left.

    'Cause it's size and position that are really snapped, not bounding box... (maybe it should be the other way around? I wonder)

    Anyway if you have a 32x32 grid and you put side by side a 32x32 and a 64x64 sprite, they will align their center, so of course you'll have 16px margin around the small one and border won't be aligned.

    Put the origin at top-left and your done (:

    Anyway, sometimes you need the origin to be centered for rotation thingy, so yeah maybe bouding box snapping could be a neat option. I leave the reflexion to you and to Ashley maybe (:

  • Well if you send me the capx I can show you how I would implement what you ask. 'cause you know... it's easier if you have a capx ready :D

  • probably because they all disappeared at the same tick.

    So if you don't use a foreach, you will trigger the add 1 to RespawnCounter only one time (even if all the monster are destroyed, it's like an internal loop)

    If you use the foreach, each monster will be taken into account and RespawnCounter will be increased for each monster that have their health <= 0

  • Normal, you set Respawn to 0 every tick o.o

  • septeven Damn I've been spotted... You sound like you saw me somewhere :D or like I'm known for something... <_<... Anything it is, it's not my fault :D