shirokuma's Recent Forum Activity

  • ...the movement isn't smooth though

    Are you talking about how the probe swings wildly when it's dragged near the starting point of the wire? Or is there another issue?

    If it is the issue you could disable the lines of code that rotate the black probe towards the starting point of the wire. So the probe would always stay at it's original angle.

    You might also consider moving the multimeter so that you are not trying to probe a point right next to it.

    If you don't want to move the multimeter you could stop adjusting the angle of the probe when it's within a certain distance of the multimeter.

  • rayray - Yeah, it's probably a little too abusive. Of course maybe that's a new game genre.

  • Something like this:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here it is with just what you need:

  • I was playing around with text entry earlier and came up with this. You should be able to glean what you need from the code in the "Walk Away" or "Walk Here" section.

  • Here you go. You start off wearing the Green Suit, and when you buy the Blue Suit you start wearing it.

  • Both lerp and CanvasToLayerY can be found here:

    https://www.scirra.com/manual/126/system-expressions

    [quote:3kvp8g7r]CanvasToLayerY(layer)

    Calculate the layout co-ordinates underneath a position in canvas co-ordinates for a given layer.

    and

    [quote:3kvp8g7r]lerp(a, b, x) Linear interpolation of a to b by x. Calculates a + x * (b - a)

    So lerp will move from a to b by x.

    For a we want the Y position on the layout of where the camera is centered. This is our starting point. So for that I used CanvasToCenterY(Layer#, X, Y). I didn't see the requirements inside the parenthesis in the manual, but that is what is needed.

    For b of the lerp expression I use the Y value of the sprite.

    And for x I use 0.05.

    My brain is hurting again just thinking about this... <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • Well, I'm not very happy with this one, and it certainly isn't efficient. But maybe it will give you some ideas.

  • Here you go. I made the item to buy a badge that attaches to the character at a certain location. Once you purchase it you wear it in all the layouts. I also added persistence to the gold, so when you leave and come back into the treasure room the game remembers how much gold is left.

  • I'm looking forward to playing it.

  • I wasn't able to open LittleStain's file since it was made with a Beta version of C2, so maybe you already have a solution you like. If not here is a 2 line solution.

    Basically I have the system check every tick to see if the angle between the sprite and the mouse is within a range that I specify. If it is I update the angle of the sprite. So as the mouse moves out of range the angle of the sprite is no longer updated and left at the last angle instead of snapping back to 0 as in my previous example.

  • Are you looking for something like this:

shirokuma's avatar

shirokuma

Member since 8 Mar, 2014

None one is following shirokuma yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies