LittleStain's Forum Posts

  • To fit the users screen size you could use viewportright-viewportleft-viewportbottom-viewporttop in your events.

    To not make the enemy spawn too close to the player you could make an condition system comapre two values : distance(playerx,playery,enemyx,enemyy) > 100

  • Couldn't help you without seeing how you have your events set up.

  • i'd have to see your capx or event sheet to know where the issue lies.

  • Is the layer the analog stick is on set to paralax 0,0?

  • How are you trying to set this up?

    on collision with block - break block should work, right?

  • Manual

  • The textbox object has the on textbox changed possibility. The text object doesn't.

    I think it will work in the way I described above, but if I'm wrong don't sue me.

  • I meant something like this:

    on textbox changed - call function with parameters

  • This might be a bit of a workaround, but would it be possible to set a textbox object to the recieved value and call an on texbox changed event?

  • There are many examples of the functionality you require.

    Just search the forum for touch scroll or touch pan.

  • First let me say like many others here, I don't come from a programming background. Using Construct2 is the first time (apart from old fashioned html-website building) I tried to do anything with programming.

    Construct2, has some asynchronous callbacks, the best examples I can think of now are Ajax and pathfinding. To make it easier for non-programmers like me, these have the "on data recieved" / "on path found" events attached to them.

    The topic you linked to was started by Yann and he/she is a very capable programmer, so I'm sure the things described in it make sense, although it confuses me also.

    I will have another look at your capx and tutorial and try to understand what kind of benefits there would be for me personally to create the events your way.

    It's always interesting to see how someone with a different background tries to tackle issues, it always learns me a lot.

  • Maybe you could do something like this:

    add two instance variables startx and starty.

    on drag start

    • sprite set startx to sprite.x
    • sprite set starty to sprite.y

    sprite on is not dragging

    • sprite set x to : lerp(sprite.x,sprite.startx,0.5)
    • sprite set y to : lerp(sprite.y,sprite.starty,0.5)
  • Give the players a boolean variable HasBall

    when the ball is near the player set it to true, when the ball isn't near the player set it to false.

    when the ball collides with the player have the system pick an instance of the player with hasball is false and set the balls direction towards it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm not quite sure what effect you are trying to create, but a simple solution for limiting the drag would be comparing the distance I guess.

    Would this work?

    sprite1 is dragging

    system compare two values: distance(sprite1.x, sprite1.y, sprite2.x, sprite2.y) > 100

    -sprite1 stop dragging

  • It's all probably very usefull, although it seems overcomplicated.

    Just a small question though.

    You state Construct2 has asynchronous callback, or something like that, but in a creation event when you use subevents automatically the just created instance is referenced, wouldn't that be called synchronous?