theubie's Recent Forum Activity

  • zhxauo

    The for each iterates through the objects based on their ID (UID is 0 based for all objects, starting at 0 from the first object placed), so if you use for each it's going to loop through them in order.

    capx (R119)

    You can make this further work with your setup by adding a condition to the for each event of sprite -> is visible = false, which means it will only loop through those you haven't shown yet.

    Edit: Fixed URL.

  • If you are OK with just the first 4 instances, you can do for each and when the loop index reaches <= 4 break from the loop. It would also have the advantage of stopping the loop itself if you happen to have less than 4.

  • The tint FX works pretty well, if you know the platform you're going to be running on supports webgl.

    Otherwise I had to fall back to using a recolored animation for the sprite.

  • Are these the only 4 instances you have, or do you have more?

  • Do you have a capx for us to look at?

  • Most of the time if you have an event for a particular function it will override the default behavior. Have you tried making an event mouse -> on click middle and leaving it with no actions?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah. I take it from the group name "Bug1" that you've got different groups for each of the bugs (you said there were 5 max total, correct?)

    The problem is that when you are decreasing the health, that event doesn't pick a specific instance of the bug sprite, so it's applying it to all of them.

    You might try adding the Sprite -> Pick nth instance to the event with the mouse click and what_is_clicked and isinfight variables to pick the 1st instance (or 2nd for second bug, etc). That will cause everything you do to the bug sprite for that event to only go to one bug.

    Would have to see all the code itself to know for sure if that will work for you, but that's where I'd start.

  • You do not have permission to view this post

  • If you're decreasing the instance variable correctly, it should only destroy the one you're dealing with. Can we see a capx or a screen shot of the code where you are doing the "damage" and where you destroy the bug sprite?

  • Add the browser object. It has an action that will let you refresh/reload the page called "reload"

  • FadeDown

    When your sheep breaks the threshold of being scared of the dog and backs away, the very next step away from the dog puts it back under the threshold, thus it turns around again.

    You could either make those check every x seconds (which gives the sheep time to move away before checking again) or you could implement a cooldown timer for the sheep with an instance variable so that it keeps going it's last direction for a bit before checking again.

    I added a every 0.5 second condition to both of your last two checks and it smoothed it out a bit.

    You've still got a bit more logic to do, but that's the direction I'd head, IMHO.

  • Took a few moments to fully grasp the controls, but it has a nice retro NES feel to it. Thumbs up.

theubie's avatar

theubie

Member since 13 Jan, 2013

None one is following theubie yet!

Connect with theubie

Trophy Case

  • 11-Year Club
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

13/44
How to earn trophies