auto runner collision problem

  • Hello,

    My name is July and I'm working on my own auto runner game. I've been learning Construct 2 for 3 weeks now and I really like it. I'm a 3D animator but now I want to be able to make my own games.

    Usualy when I come across a problem I search the forum wich is by the way the best forum I ever met, and I find an answer how to resolve the issue.

    But now I'm stuck.

    So here is the thing:

    -everything in my game is bullet and solid and they have a speed of 130

    -the character is a platform that simulets running right from the start of the layout

    -when he meets the side of a block I wanted everything to stop so i made a condition on collision with sprite > bullet speed 0 for everything

    And he stops.

    But when I jump I want everything to start again.

    All the conditions I made before to be valid again.

    So I want everything to stop only when I colide with the side of the block. Only with the side becouse I want to be able when I jump on the top of the blocks to run.

    For this I made a second small sprite that i put in front of the block and everything stops when I colide with this second sprite, but when I jump nothing happens. I'm not on colision with the sprite anymore so I dont't get it why it dosen't start running again.

    Maybe it's a stupid problem and for sure is very easy to fix but for me it's not and I can't find the solution.

    Thank you for reading my post and for every answer I get :D, if anyone answers. <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Would it work if you make an event

    player is not overlapping small sprite

    trigger once

    • set bullet speed to 130

    You could do this with switching a variable too, which would probably make the events easier to read.

  • I would recommend to do this.

    When player collision with object->set immovable to each thing you want to stop

    To restart the level when you press or touch something make a sub condition to the condition above and make:

    When any touch or mouse or keyboard input (you have to add the plug first though)->restart layout,clear all variables (this is in system)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • But if I say to restart layout and clear all variables I will lose the timer and score and it will go from begining.

    This is what it looks like but it dosen't work:

    when Player on collision with sprite5 > x,y,z etc set bullet speed to 0

    when Player is not overlaping Sprite5 and

    System trigger once

    then

    x, y,z set bullet speed to 130

    I think something is wrong in the second line. I don't really get the logic how can system trigger once be a condition for a reaction. It sounds more like an event.

    Help :(

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