oosyrag's Recent Forum Activity

  • You can tag your audio files upon playing and use the condition

    Is tag playing

    True if any audio with a given tag is currently playing.

  • Unknown, it could be an oversight. The tween feature was added much after the multiplayer.

    Logically I agree the tween destroy shouldn't be different than a direct destroy, but I don't know what happens under the hood.

    If you create a minimal project showcasing both methods and the difference between them, you could file a big report on GitHub and get an answer pretty quickly, either as a bug or unexpected behavior.

  • Depends on what ad api you're using. I imagine there are hooks/triggers for when an ad is served or failed to load.

    If you're using the built in mobile advert option, try checking the manual entry on it. Other plugins will have documentation too.

  • If an ad fails to load, display "Thank you for playing my game! that I poured my heart and soul into and the ad revenue I rely on to feed my 4 kids, put them through school, and support my mother in the hospital." instead.

    Edit: Option 2 - "If you enjoyed playing this, check out my other games! - link"

    If you can't fill the space up with monetized ad, might as well advertise something else.

  • - If I’ve got an attack that puts out multiple hitboxes, I’d probably need something that would prevent an enemy getting hit multiple times if it’s meant to be a single-hit attack. I have no clue how I would go about this. Do you have any ideas?

    I didn't think about this much, but here's what I would try.

    You could use a simple flag on the receiving object, isHit, true or false. When you check overlap with hitbox, this must be false, and it would be set to true so that following hit events no longer run until you set isHit to false again. Could be until the end of a tick, could be longer. Also can be used for invincibility frames, although I think the traditional way to do that would just be to remove the hurtbox entirely. Edit: Pick nth instance is probably the way to go.

    For the overlap check, you could also add a pick Nth instance (first). If there is just one overlapping, no problem. If there are multiple, it would only run on the first one. You'd have to work out some sort of priority system if there are hits of different types/damages that could trigger together.

    Otherwise just sticking with single hitboxes is perfectly valid too.

    I haven't tried this and there are probably kinks to work out, but I'm sure it can be done.

    - Say if player one and player two swing a ground attack at slightly different times. Player 1’s attack ends first and the function that called for the Hitbox to be created calls for the Hitbox to be destroyed. Would this not prematurely destroy Player 2’s Hitbox? I’m also not sure how I could prevent this. Do you have any ideas?

    You would associate each hitbox with it's owner sprite. Most straightforward way is by instance variable. Upon creating a hitbox for a player, set the hitbox instance variable "source" to player.uid. You can then pick by this "source" instance variable, if you only wanted to remove boxes for a certain player.

    I think you can do something with hierarchies as well? I haven't explored that at all.

    - When you say the hitboxes don’t have to be perfect rectangles, are you saying I can make an irregularly shaped area by overlapping multiple rectangles, or are you saying there’s some way to turn an instance of the universal hitbox sprite into a circle or oval during runtime?

    I was thinking irregularly shaped area with overlapping rectangles. But that was just an idea since you seemed interested in more accurate hitboxes.

    There's also nothing keeping you from having both a circle/oval hitbox along with your rectangle hitbox, besides a little more complexity. You could also make it the same way with a function and resize as needed. Those two basic shapes should get you quite far with possible shapes with minimal effort, especially compared with having to make a unique collision bounds for every frame of every animation you plan to have in the game.

    You can put the two shape hitbox objects either as different animation frames of the same object (which means you add one more parameter to your function to pick which kind to make/animation frame to set), or you can use two separate objects and put them in a family to treat them the same.

  • If you're setting up a function (decidedly a good idea) for creating hitboxes, you'll probably be able to use a single hitbox object and function for everything, including ground attack, air attack, and for every different characters and all kinds of attacks. This would simplify your events for what happens when an enemy overlaps a hitbox as well.

    You'll want a createHitbox function that you can enter the parameters X Offset, Y Offset, X Size, and Y Size (possibly add damage, knockback, and other potential values as parameters and hitbox instance variables). You'll even be able to run this multiple times to create hitboxes of varying shapes and sizes that don't have to be perfect rectangles and can have different properties, like the tip of a spear doing more damage than the shaft.

  • On the right frame, create hitbox, set position, set size, and optionally pin to character. Destroy it on the end frame.

    dropbox.com/s/fnuh7n3cipkil6i/hitboxexample.c3p

  • Not sure if it will help in your situation specifically, but I find in general when building an animation system it helps to keep track of "animation state" in a variable, and set animations based on that variable. This will prevent issues occurring from attempting to set different animations from different events and conditions in one tick. The variable can only be one thing at a time, so only one "set animation" action can run per tick.

  • The system unload action are for memory management and clearing textures that are not currently in use from vram. As started in the manual, this can only be done of there are no instances of the object remaining on the screen and on the tick after the last instance had been destroyed.

    If the object is recreated after being destroyed and unloaded, it will load up the whatever object textures it had before from memory (not vram), including animation frames that were loaded from url before.

    The way to clear the frames, as I mentioned before, is to use the load image from url again, loading an empty image, to overwrite and replace whatever you had previously loaded.

    What is a guess is what you have already set up, which is unclear to me, so sorry if I misunderstood your question, which I understood to be "How do I clear the frames loaded with a URL?"

    Here's an example dropbox.com/s/j2nm4ocxe0w1163/memorymanagementexample.c3p

  • The method I normally use is to put play sound actions into a sub event that checks if a mute sound variable is true or not before running.

  • Destroying a properly synced object on the host should destroy it for the peers as well. Are you able to recreate this in a minimal project? Could be a bug.

    The other reason would be that you actually had two copies of the same obect overlapping each other. The synced one gets destroyed and leaves the other. The peer should destroy any "orphan" synced objects that already exist on the layout upon joining as a peer.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Overwrite it with another load sprite from url action. Can be an updated sprite, or a blank one.

oosyrag's avatar

oosyrag

Member since 20 Feb, 2013

Twitter
oosyrag has 38 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

21/44
How to earn trophies