Razertune's Recent Forum Activity

  • AllanR Thank you for your two cents on my issue.

    I'm not sure if this could be due to codes and events. In this situation, it's about a newly created sprite. No code or event has been implemented that somehow involves this sprite.

    I just noticed that this behavior only occurs when I drag/create new sprites while having a global layer at the top. If I have a sprite created on a non-global layer, changing layer for the sprite seems to work.

    Guess I more or less solved my own problem.

  • Hello

    I'm not sure if this is the right forum section for my question.. If not someone will probably move my post. Anyway.

    So there's an issue that's been following me during all this time within Construct 3, and I'm not entirely sure what's causing it.

    As I'm continuing working with sprites and layers within my game, certain sprites seem to disappear when moved to other layers. It's not a situation where the moved sprite falls behind another layer that now covers it up. The sprite that got moved to another layer simply gets deleted as soon as it's no longer highlighted. I assume this can be confirmed by examining the properties of moved sprite. Upon doing so, I can see that the sprite no longer inherits properties that's unlocked as soon as at least one of it exists within the layout (for example which layer the sprite currently resides within.)

    Up until now I've managed to bypass this issue by deleting the layer and simply creating a new one before moving the sprite to it, but right now it's become such a halt for my progress.

    Is there a feature I'm missing?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I see I see.

    Thanks for the help. You revealed much more than I imagined!

    I placed a Trigger once sub-event for the third animation frame before the For Each sub-event. It seemed to stop the sprite spam.

    I'll keep your top level advice in mind. Sounds like a better practice.

  • Holy cow! It seems something is constantly spitting out Breathe sprites!

    Thanks for telling me to go debug! I've never used it until now.

  • DogeDev

    That could be a temporal solution, though I've found another fix for now. I edited the event instead to play the sound during the third frame of the Beast Ready Animation. That doesn't seem to cause a problem. Still need that Trigger Once sub-event to not cause looping.

  • [Beast]

    ----+ Beast: On animation "Idle" finished

    -----> Beast: Set animation to "Ready" (play from beginning)

    ----+ Beast: On animation "Ready" finished

    -----> Beast: Set animation to "Idle" (play from beginning)

    ----+ Beast: Animation frame = 3

    ----+ Beast: Is animation "Ready" playing

    --------+ System: For each Beast

    ---------> System: Create object Breathe on layer 5 at (Beast.BBoxRight +5, Beast.BBoxBottom +10)

    ----+ Breathe: On any animation finished

    -----> Breathe: Destroy

    And the creation of Breathe plays the sound growl.

    That's all the other code somehow involved with the playing of the audio file.

  • As mentioned, if I was to ensure only one Breathe sprite exists at one time and also remove the Trigger Once sub-event, the Growl sound loops until the Breathe sprite disappears.

    I'm not sure what I'm doing wrong. Otherwise it's the preview function that messes the sound up, but I wouldn't know.

  • Hi

    This is hopefully a simple issue for someone glimpsing past my post.

    So I have a sound file imported named Growl.

    A sprite named Breathe is continuously created and disappears after its two frames are finished.

    What I've done is this:

    ----+ Breathe: On created

    --------+ System: Trigger once

    ---------> Audio: Play Growl not looping at volume 0 dB (tag "")

    All is nice and dandy. But if another Breathe sprite is created while one already exists, the sound seem to loop until both instances are gone.

    How do I prevent this loop from occuring? The System: Trigger once, only prevents one sound alone from looping.

  • Another headsup. It seems like the spinning animation issue have solved itself somehow. Not sure how but all is joy now.

  • I want to believe that the random spinning animation has something to do with the bird animation finishes going through its four frames and repeats. Even if I set the birds 8 Direction Set Angle properties to 'No', and apply a 'Set angle to 90 degrees' and '..0 degrees' function on the corresponding Every Tick and Else events, the animation still seem to stop and spin before looping through the frames.

  • Thank you both for the assistance!

    I will keep your advice in mind when comparing cords. Another thing. How do I disable the current simulated movement before replacing it with another direction? Do I just use Stop 8 Direction?

    dop2000 I've decided to use your suggestion. It seems to work out really well. There's only one minor thing with this execution. After the bird changes movement towards right, it moves for about 3 times its tile size before stopping for almost a second and starts spinning the animation violently before proceeding as normal. In the end taking the last turn and simulates moving up. I've set the 8Direction Set Angle to 90 intervals.

  • On start of layout a sprite(bird) is created that has simulated 8 direction movement based on an instance list. From start the bird simulates movement downwards. At the same time another sprite(airspace) is created and is every tick placed beneath the bird sprite. This airspace sprite only serves the purpose of ensuring the bird doesn't reach the solid ground closer than 16 pixels. On collision with solid, the airspace sprite gets destroyed, and on that trigger, the bird sprite simulates moving right instead.

    Now here is my issue.

    I would like this sprite to change the simulated movement upwards when it reaches the X cord of BBoxRight of a third sprite(nest) that's already existing in the level. However I'm not entirely sure how to go about this.. I've tried to experiment with the compare X function, however there's surely something I'm missing in my execution. I guess what I've done is creating an event that compares X cord of bird sprite with BBoxRight x cord of nest sprite, but nothing triggers the bird to simulate movement upwards.

    All chime ins are appreciated.

Razertune's avatar

Razertune

Member since 16 Mar, 2020

None one is following Razertune yet!

Trophy Case

  • 4-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

6/44
How to earn trophies