TPorter64's Recent Forum Activity

  • yeah, Is between angle works pretty well for switching now. I'm basically trying to get the AI and animation behavior of say the guards in Zelda: LTTP. They kinda do their own thing and upon drawing aggro start approaching the player, of course I don't need my guys to move diagonally. Thanks for the idea. I knew there was a quality shortcut.

  • I know how to change the player sprite/animation based on whether they are moving up, down, or left and right to imply movement. What I can't figure out is how to make an entity not controlled by the player do the same. The enemy doesn't have a "patrol" per se. He kind of wanders in a random fashion bouncing off solids. But every few seconds I have it reset it's angle to face the player, giving a vaguely "zombie like AI pathfinding" (also repositions angle based on "loud" elements caused by the player...etc. Anyways, I can think out the math but can't figure out how to make construct agree with me :)

    If your x speed (absolute) is greater than your y speed (absolute) then you are moving predominantly on the x axis or left/right.

    If your x speed is negative you are heading left = play "walk_left" anim

    or

    If your y speed (absolute) is greater than your x speed (absolute) then you are moving predominantly on the y axis.

    If your Y speed is positive you are heading up = play "walk_up" anim

    and so forth. But I can't find the ability to compare x and y speeds so I can start making this determination. Am I over or underthinking this?

  • okay, removing the 8 way directional from the crate and moving it on overlap at player.8direction.Speed/32 pixels at angle player.angle gets it to move at the right speed. Three questions arise.

    Is there a way to restrict the crate to only move along the axis I want (top, bottom overlap = y axis movement. left, right overlap = x axis movement)

    How do I set up the math and behaviors to allow the crate to run into other crates and carry it along somewhat believably? using the pin behavior they act like sticky crates and catch each other at any angle and begin.

    Inversely, how would I create it so a moving block can not push another moveable block but instead is blocked by it?

    I guess i really need a top down physics system to get what I want out of this feature. Thanks to any who try to wrap their brains around it. I will be, too.

  • I have two issues with pushing boxes in my top down game.

    I've imported a picture of a crate, given it 8-direction movement and enabled custom movement so it doesn't move when the player does.

    I have made the character "Solid" 8-direction movement. He can now push the box around but only on diagonals it seems. This is of course relative to whatever the base angle might be I'm assuming, but why would the default be at a 45 degree interval?

    I have tried limiting the movement of the crate to up and down, left and right, 4 directions, 8 directions and at every angle interval the pull down menu will allow (including none) and the behavior never changes.

    The bounding box of the player character is also a square. The only way i could make sense of it was to put each box at 45 degree angles so at least the pushing was consistent with the face you pressed on.

    I don't need the box to snap to a grid space or move at defined periods, I just want the box to move logically. I do want the box to be restricted to 4 way movement and not to rotate, but it seems to be doing that already, albeit at an angle I wasn't expecting.

    Secondly, there doesn't seem to be a way of creating inertia for these moved boxes, they simply stop moving upon collision. I'd love if there was a "physics" solution to this, but the current physics behavior seems to be only designed for sidescrollers.

  • For this instance, no. I'm not playing it on tick or any other timing variable so it's not that the item is spamming on one ammo+enemy overlap. It's that my weapon is a constant stream (not particles) and can cover multiple enemies. And each one of those enemies that is affected by the stream is told to play a pain sound. What I want to be able to do is say, "ok, 7 enemies are in the stream, but I want to cap the pain sound at only 2 or 3 possible globally at one time".

    I'm still experimenting and feel I'm getting close, but it's never quite right...yet.

  • yeah, tagging them helps it a bit so they don't stack now. Thanks for that. But I don't want the new one to replace the old, I want the old one to play out before a new one will play (or at least be audible).

    Closer now!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the try. My first stroke of genius was to add a counter. For every of this instance playing add one to counter. If counter is above 1 then stop sound. Sounded logical. But it stops all sounds, not just the offending one.

    The same would apply to your idea. Once you throw in that stop sound, it stops all certain sounds. Not just one, or the most recent one.

    I think my ultimate solution lies in some of the timeline and cooldown plugins for C2 that I'm checking out now. Essentially adding a cooldown to a sound so it can't play until the cooldown ends. Still a bit hacky.

    I'm an audio engineer by trade for the video game industry and I'm kinda spoiled on audio middleware like wwise and fmod that allow you to create a basic rule and priority system for audio.

    I'll keep trying stuff out though, thanks!

  • How can I limit instances of the same sound from playing? I have a weapon that can overlap multiple enemies each causing them to emit a "hurt" sound. What I don't want is to trigger them all at the same time necessarily, which can start clipping and distort. I want to be able to say only play one of a certain instance of sound while one is still playing.

    Inversely, is there support to stop a currently playing sound if it is asked to play again, effectively interrupting and replacing the original one with the new instance?

TPorter64's avatar

TPorter64

Member since 26 Apr, 2012

None one is following TPorter64 yet!

Connect with TPorter64

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies