Jhunter2551's Forum Posts

  • Hello,

    I have a situation in my game when the player gets an item. A screen comes up with details about the item, setting the timescale for the entire game except for the sprites on screen to 0.

    I need to have a sound effect play while this happens, but I can't because the time scale is 0.

    Is there a way to make only one audio clip have a regular time scale, or even a way to set the audio plugin's time scale? I'm having trouble finding anything.

    Thank you!

  • if all you want to do is not repeat the previous one, then you could save the previous choice and make a While Loop keep generating a new one until its not equal to the previous.

    just make sure to save the one you pick as the "new" previous one

    something like this

    This looks like what I need it to do! This will definitely work for the finite state machine enemies, but I'm wondering if you have any ideas on how to log the audio file that is chosen as the new previously played?

    Because it chooses from a list of sound files, I don't know how to track which one it chooses.

    Either way, your suggestion is very helpful. Thanks!

  • Hello,

    I've been struggling but largely ignoring this problem in my game for a while. I'm developing a metroidvania that involves a lot of situations where this crops up. Most of my bosses are developed using a finite state machine, so most of the time there in an event saying something along the lines of: "set state [choose("state1", "state2", "state3")]. When the state is chosen, there are some times the same one will play over and over due to random chance. I have also had issues recently when adding sound effects. I have 4 footstep audio files but when I choose randomly, it often plays the same sound multiple times in a row, which sounds off-putting.

    The main question is: How can I choose randomly from a set of STRINGS and not get the same one twice in a row?

    I have looked into advanced random features such as permutation tables but they mostly include numerical systems. I would assume there's a way to set strings equal to the numbers in the permutation tables or something but I am not familiar enough with advanced random to think of something.

    Are there any simple solutions I'm missing? Or what is the most efficient way of implementing something to regulate this?

    Any ideas would be great.

    Thanks!

  • See I would do that, but there’s honestly way more things I want to stay persistent than there are enemies. Small things like pickups, chests, and gates. Adding all of those as variables would be very cumbersome I think so I’m trying to avoid doing that if possible.

  • Hi, I’m currently working on a metroidvania in which enemies and doors and gates and many objects have the “persist” behavior. This way, when the player opens a gate and travels to another layout then comes back, the gate is still open. Similarly, I like for the enemies to stay dead. However, when a play saves, I want enemies to respawn. There is an event for “reset all persistent objects” but is there a way to only reset a family (such as an “enemy” family)?

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I’ve actually been working on a devlog series for my game I’m making in construct. I am looking for feedback on how to improve, so if anyone could check them out that would be awesome!

    youtube.com/playlist