ramones's Recent Forum Activity

  • Store the UID of the target - say as an instance variable on the bullet - and when the bullet collides with a sprite you can check its UID and see if it matches the stored value.

  • It should look like this:

    [attachment=2:34n56jmr][/attachment:34n56jmr]

    And not this:

    [attachment=1:34n56jmr][/attachment:34n56jmr]

    Also in Chrome you can view the value saved in local storage:

    Open the Dev tools (F12). Select resources from the top bar and then click Local Storage on the left. See if you have the correct value stored there.

    [attachment=0:34n56jmr][/attachment:34n56jmr]

  • Make sure you're setting the local key to totalkills (the variable name) and not "totalkills" (a string).

  • Yeah sure, no problem.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The animation speed is negative when playing the animation backwards. You keep setting it to a positive value so it gets stuck.

  • In events 57/58 the LedgeSprite is being pinned to Sprite9 every tick as long as LedgeSprite is overlapping MoveSprite. You only want to pin it once. If the ledge sprites are always fixed to the ends of the shelf you can pin them 'on start of layout'.

    What's happening here is that the shelf moves to the right and the ledge sprite gets pinned a little further back every tick until it's no longer overlapping the MoveSprite.

  • Just like this:

    [attachment=0:2e8e3cix][/attachment:2e8e3cix]

    That will set total_noir to the number of sprites that have that boolean set. I think you have problems in your other events though.

  • You probably shouldn't pin the LedgeSprite to the Sprite9 every tick. And do you have more than one Sprite9? If you have another Sprite9 the second LedgeSprite is probably being pinned to it because you're not specifying which Sprite9 to pin to. That would explain why it's not moving.

  • Pick all family objects that have the boolean set to true and then use the Family.PickedCount expression to check how many there are.

  • When you spawn a stone inside the loop then you can't pick it until that event finishes. (You can pick a newly created object by UID only). Those new stones you spawn won't be picked by the 'Pick all' condition.

    I'm guessing you have one stone on the layout at the start and you call this function to create more but it's only able to pick that first stone. You'll have to try a different approach.

    For example, you could spawn all the stones first, in a different event. Create all stones at (-1000, -1000) with boolean flag placed = false. Then you can have your loop that would be almost the same but instead of spawning stones it moves one of the unplaced stones to the correct position.

  • These look great. Thumbs up for big GIFs.

  • Here's the LayerToCanvas/CanvasToLayer approach if you want to see that.

ramones's avatar

ramones

Member since 17 Apr, 2012

Twitter
ramones has 4 followers

Trophy Case

  • 12-Year Club
  • x4
    Coach One of your tutorials has over 1,000 readers
  • x2
    Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

15/44
How to earn trophies