LittleStain's Forum Posts

  • lerp isn't a behaviour, it's an expression you can use.

    create an object and use this:

    every tick - object set x : lerp(object.x,1000,0.1)

    to see the effect.

  • I'm not sure objectnames would work as expected.

    Strings and numbers work great.

  • Could you use families for this?

    so put the spplayerpiece in a family called spfamily.

    and check for each spplayerpiece if they have line of sight to the family.

    I know it works in other cases to compare instances with eachother, maybe it will work here too.

  • It should be possible although Construct2 was not made specifically for that purpose. It would be a lot like creating a cutscene.

    you could compare the frame and set the spritesize accordingly.

    to sunchronize the sound you should have it triggered at the right time, or trigger the events at the right time according to the sound.

  • Containers might not be necessary, but learning about them in an easy game is better than not knowing about them when trying to create something harder.

    When working with a hitbox and seperate sprite for the enemy it is easier when the sprite and hitbox are "connected" so when you destroy or hit one the other one is automatically "linked", it makes the picking part, which many construct2 users confused, a little easier.

    Here's the manual entry on containers

    If you put the enemy sprite and the hitbox together in a container, when you say on collision with hitbox, enemy play death animation, only the "linked" enemy will play that animation.

  • One way to do it:

    for each enemy

    system compare two values: distance(enemy.x, enemy.y, player.x, player.y)<50

    • enemy set speed to 0

    system compare two values: distance(enemy.x, enemy.y, player.x, player.y)>50

    • enemy set speed to 10

    ofcourse you should play with the values

  • system create sprite.

    It would probably be easier to give you a better answer if you asked a better question.

    Could you explain what you would like to do and why it isn't working?

  • yes.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you put the enemy and the hitbox to a container, this could solve everything.

    another option is to pick the right enemy sprite in the event, so the action is not called on all instances of the enemy sprite.

  • Instead of using a variable number you could also use:

    choose("blinkfast","blinkleft","blinkslow")

    that way you can just use the animationnames you want.

  • Maybe this topic will help you

    I don't think there is any need for trigonometry, but one can make it as hard as one wants.

  • What is the reason to open a second topic with the same question an hour and a half later?

  • Please remove the every tick action.

    It makes the action on start of layout pointless.

  • You can do a lot with lerp (linear interpolation)

    I don't have an example at the moment, but there are many on the forum.

  • for position, using pin behaviour or setting position to an imagepoint every tick would work. For scale I guess you could use a variable that affects both objects.