LittleStain's Forum Posts

  • It wouldn't conflict if you gave your enemies a boolean and switched it when the effect is needed and switch it back after effect has played.

    Then make the "normal" behaviour play when boolean is false and the "knockback" when boolean is true.

  • BTw: the egg.capx was from justifun and not me.

  • Ok let me try to explain why what you want to do isn't easy..

    You want the sprite to be at mouse.x, mouse.y all the time, except when the mouse is overlapping the egg.

    So you are going to have to tell the sprite what to do when the mouse is overlapping the egg. This is the hard bit, because you want it to follow the mouse, but it can't because the mouse is overlapping the egg. So you have tto tell the sprite how to follow the mouse, without overlapping the egg.

    if you want to click somewhere and have the sprite go there you can use the pathfinding behaviour and it will go around the egg no problem.

    But you choose to have the sprite at the mouse, so it's pretty hard to tell the sprite what to do when that is impossible.

    So If you can find a simple way to explain in normal language where you want the sprite to be when the mouse is overlapping the egg and how to react when the mouse is no longer overlapping the egg, maybe than there is an easier way to explain it to the computer too.

  • also you could use:

    choose(10,15,20)

    to choose one of those three amounts.

  • random(10,21)

    but you probably want only round numbers

    floor(random(10,21))

  • you'd only have to mask the viewport, not the entire layout.

    If you use one or more instances (depending on how you've set things up) of a transparant tiledbackground of 2x2 for that it should work.

    I'm not even sure all has to be covered if you set things up properly, but if you have to?

  • It should also work for the arrow key up, but you'd have to turn off the use default in the behaviour itself, because the default controls will conflict.

    So turning of the default controls and recreating them in events and adding this should work.

  • You can use destination out but you should use the force own texture for the layer.

    Made this one not too long ago for someone else

  • I think you are looking for something more like this, but it will take some work to get it to do exactly what you'd like.

    SpriteAround

    Events:

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

  • If you'd like to do it without plugins, you could use the method in the moveto example in the new project dialog.

    to fade in and fade out I usually use two fade behaviours and set the first to fade in and the second to fade out.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • startx and starty are instance variables for the card object you should create.

    you can do this in the card properties by clicking add instance variable.

    you could have an event:

    card on created

    card set startx : card.x

    card set starty : card.y

    make an event:

    card is not dragging

    create a subevent

    system compare two values : card.startx is not card.x

    or

    system compare two values : card.starty is not card.y

    add action

    card set position :

    x - lerp(card.x, card.startx, 0.5)

    y - lerp(card.y, card.starty, 0.5)

  • You should thank JohnnySix , I didn't really change much.

  • You'll probably have to tweak it a bit to get the exact effect you want, but basically that's about it.

  • All you'd have to do is transfer the time to the width of the bar.

    If your timer is 5 seconds and a full bar is 100 width

    every 0.1 seconds set bar.width to bar.width+2

  • I'm not sure platform has negative speed. You could check if vectorx < 0

    system compare two values : player.platform.vectorx < 0