Coin-coin le Canapin's Recent Forum Activity

  • Use the text box object and a button object.

    Then do this :

    global variable playerName = ""

    on button clicked AND textbox.text ≠ "" → set playerName to textbox.text

    Then to use the variable into a text, write the PNJ text like this :

    « Hi [player], nice to see you again in my unicycle shop ! »

    And do this event :

    pnj.text = replace(pnj.text, "[player]", playerName)

    It will replace [player] by the playerName variable.

    https://www.scirra.com/manual/126/system-expressions is a good place to find stuff like this. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • Hi.

    I want to stuck a moveable hat on my character. My character has an imagepoint "head" which is different for each animation frame.

    I want my sprite hat always beeing on this imagepoint regardless the animation frame.

    I tried the simplest way, as a each tick -> set hat position to character imagepoint

    But it doesn't work as the hat is always 1 frame late and seems to "follow" the head instead of beeing pinned on it.

    Actually I'm using this :

    each tick ->

    • hat Pin Unpin
    • set hat position set hat position to character imagePoint
    • hat Pin pin to character

    It does the trick but seems ugly to me.

    Is there a more proper way to achieve this ?

  • You can store conditions into functions as well.

  • Thank you very much

  • Hi.

    The linked files don't exist anymore and I'm trying to achieve this effect. I want the player bounce off the enemi when jumping or falling on its head, but not if it touches the enemy from the side.

    I tried something like :

    Player -> is overlapping enemy at offset (0, 1)

    Player -> is NOT overlapping enemy at offset (0, -5)

    But it doesn't work as expected. It limits the player from bouncing on an enemy when coming from the side but it doesn't totally prevent it, and if the player if falling at high speed, it passes the Y -5 offset and doesn't bounce on the top of the enemy.

    Any idea ?

  • Well I used a function which is called at each tick and when the player width changes and it works perfectly. \o/

  • Okay I managed to make it working with this :

    There is still one issue thought. If the player is still, overlaps both an indestructible and a destructible block and his width suddently decreases, making him overlapping only the destrutible block, it doesn't trigger the condition and the destructible block is not destroyed. I guess I should put these conditions in a function I call at each tick but also each time the player width changes…?

    edit : forgot to link the picture

  • I already tried this but it doesn't work for the two first pictures I posted : if the player is overlapping at y=1 a cracked block BUT also overlapping at y=1 an indestructible block, then the destructible block shouldn't be destroyed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi.

    I'm trying to achieve a well known effect in platformer games where cracked blocks are destroyed when the player walks on them.

    A destructible block should be destroyed only if :

    The entire player hitbox touches it, OR any part of the player hitbox touches it as long as the remaining hitbox touches another destructible block.

    If the player keeps running on a bridge made of destructible blocks, they should be destroyed one after the other as the player run over them (like with a 0.5s delay).

    Any idea how to achieve this ?

    The last picture represents what would happen if the player spawns directly on the center destructible block and if its hitbox is smaller.

  • Doesn't seem to work… :s Any idea ?

  • Well, that is an easy way !

    Thank you so much !

  • Hi.

    I'm working on a platformer. I would like my camera following the character when he reaches the first 1/3 or the last 2/3 of the window (horizontally as well as vertically).

    When it moves in the opposite direction, the camera stop following it until it reaches the 1/3 of the opposite side.

    Any idea about how to do that ?

Coin-coin le Canapin's avatar

Coin-coin le Canapin

Member since 22 Dec, 2010

Twitter
Coin-coin le Canapin has 1 followers

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies