How Do I Get 'System Every Tick' To Work

0 favourites
  • 7 posts
  • Hello,

    I am working on a platformer and I can't get Every Tick to work.

    My problem:

    When the player collides with a treasure i want the system to spawn a w crossbow at the player's image point. During test I see that the system spawns the crossbow, but crossbow doesn't stick with the player. So how can i make it stick with the player as they move.

    My Event Sheet:

    ->Treasue | ON collision with player

       (Sub-Event) System | Every Tick | crossbowsprite | Set to player (image point 1)

  • Pin behavior or

    add player.x to your equation

    If your image point is in the middle of the sprite and the sprite is 20x20 pixels big, imagepointx(1) will give back 10, no matter where the sprite is.

  • In your event, Every Tick is only triggered when the player collides with the chest, so it's not actually running every tick as it's part of a condition.

    Like mindfaQ said, you can just use the pin behavior to then pin the crossbow to the player. If you really want to use an every tick action, then create an inactive group with the Ever Tick event, and activate that group after you get the crossbow. Just remember to deactivate the group when you don't need that Every Tick running anymore.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the rapid response, my only concern is i don't know what the "PIN" behavior is. If someone could link that for me that would be great! Thanks everyone.

  • manual

  • Thanks everyone! This has solved my problem

  • HeroicSoftware I would recommend going through the tutorials as they would have covered this in the beginning tutorials on platformers. A lot of good stuff that will save you time and effort if you just do the beginning tutorials.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)