theubie's Forum Posts

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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?

  • 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.

  • Ran into the exact same issue when using the iframe for Kongregate. My solution was similar, but to also account for the user clicking over into chat during game play (i.e. after on start of layout) I instead went with using the browser focus action on the mouse any click event. That way when they click back into the game, it gives focus back to the game and the keys again work.

    Something else to consider when designing apps that sit in an iFrame that the player might click outside of.

  • It depends on your idea of an MMO. If you're thinking WoW, EQ/EQ2, etc...then no. If you're thinking about the browser MMO genre like you see on Facebook then you could do something like that.

    I'm working on a browser based MMO myself at the moment...it's a rewrite of my original browser professional wrestling MMO UWE. Originally it was a standard html + js front end and used Ajax to contact a php/MySQL back end. This version will use C2 to create a HTML5 front end which uses AJAX to communicate with the back end.

    tl;dr - Depending on your idea of a MMO, yes is is possible.

  • Are you sure one would even need to save the state of a game?

    Couldn't one simply use global objects (arrays, variables, etc)?

    When you switch to a layout, it resets the layout to it's default position...so any spawned sprites are gone, and if you've got a player actor they'll be back at whatever position you started them at. You're going to need to remember where everything is at and then set the scene back up again when you come back to that layout.