DogeDev's Forum Posts

  • You could use advanced random to generate a shuffled list of numbers called a permutation table and the numbers relate to certain tracks

    Worked, poggers man ty!

  • Hello, so i want to create an optimized and working system that chooses a random audio, then another one without repeating the last audio played. I'm making an Rpg based chat system with simple voices and it's variations like Undertale, but i don't know how I can do it properly. Any help would be grateful.

    Tagged:

  • The title says by itself, i just want to know how do i play an audio that was uploaded by someone through File Chooser. Like, the player will just upload his .mp3 archive, and then i want to load and play it someway, is it possible or no?

  • So i just made a box with 1 sprite, not gonna do that of creating 4 borders. Anyway, i want to know how can i detect the collision of the box only in the borders? Because it's inside is empty, and the player will be placed there, it's the same as an arena but i want to shrink or enlarge the box, so will be easier with only 1 sprite.

  • DogeDev if I have understood well, the solution is quite simple.

    Disable or get rid of the solid object on top of the screen, then limit the Player's movement input if too high than a specific Y amount.

    You can see how I have done here in my tutorial to limit the left and right movement of the spaceship:

    https://youtu.be/hy5_FzrfYDs?t=935

    No third party plugins required and works even with the free version of C2.

    Sorry for the late response, but i actually made it in the way that i wanted and fixed it, so, thanks anyway.

  • Oh, idk it wasn't possible, but, i could think more about it, thanks anyway.

  • Heyah, so i'm having a problem that i can't solve or think about something for it. I'm making a Space-Shooter 2d game, and i have some wall objects that don't let the player to get off the screen. The players uses the 8 Direction Behavior, and the enemies that falls use the Platform Behavior. You can at the image below, see the red-lines that are the hitboxes of then, and, the enemies will spawn above of it.

    Link: imgur.com/a/cjknfTc

    Link 2: imgur.com/a/MDy1aZE

    So, i want to makes the enemies pass through these walls, but, i don't want to use Physics, Bullet or other Plugins Behaviors, i want to use the Platform, becauses it gives the effect that i want.

    Also, i don't want to: Turn off collisions, because the enemy won't able to get shoot in a certain moment. Creates a Hitbox Sprite, because i want then clean. Disable the Solid Behavior, because the player could abuse of it to go through of then. Use Bound to Layout Behavior, because it delays the player movement when he collides with the wall, and movement in this game are precious. Also, i don't want to modify any type of plugin at C2 folder's, unless it gives me a good solution.

    If you have an idea, and thinks it's good enough, even if it has some things i don't want, tell me unless it really good and solves my problem without making it problematic for me.

    Summary:

    Objective: Make some walls that has the Solid Object be able to let enemies pass through of then, but not the player.

    If needed, you can see the .capx below.

    dropbox.com/s/s8f512f50lt5arm/Hellish%20Space%20DEMO.capx

  • Ay bois, so, i'm trying to do an 'simple' system for fun, the system consists in some things on an .txt archive, the tokenat will load then and convert into variables.

    Below there's a video, the .txt and my .capx, so, my problem is, when i press space to load the next text, it loads good without problems, with the correct color and, in the correct order, not messing up things. But, when i load with 'Every X Seconds', it loads 1 number of text late, the colors are messed up, and somehow the ending 'Hello, World.' didn't appear.

    Please, check the video, .txt and .capx for further information, if you know how to fix, please tell me!

    Edit: Btw, in the video the text are fast, but, don't worry about it, the every x seconds is up to 0.75, so, that's why it's fast, my problem is about the delay in the start, and, the colors messed up, same with the ending 'Hello, World.' not appearing.

    Video: streamable.com/0r0gfk

    .txt: pastebin.com/9kJAxiT8

    .capx: dropbox.com/s/6eph642ztbatltf/Hello%2C%20World..capx

    Thanks for reading!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Create a variable number = 0

    On Start of layout, compare if it is = 0 (Means that the game was restarted)

    - Set the value to LocalStorage

    - Set the variable to = 1

    You can also do it using On suspended but I don't think that it works when you close the app, is probably easier just to compare if its a fresh run.

    That should do the trick, thanks bro!

    Edit: Actually that worked, but, in a way that i didn't want tho. Like i said, i somehow want to detect if the game was closed when it's closed, because, i'm making a bullet hell game, that the number of deaths will be crucial to this, so, if the player is about to die and then closes the game to restart the fight 'fast', will just mess up with the death system. If the player reaches a certain amount of deaths ( that are saved in a local storage ) will trigger some functions, if the player closes the game, won't count as a death, that's why i'm looking forward this. Btw, thanks for the help too!

  • Ay bois, so, this time i want to do an type of system for my game, that detects if the game is closed, like to count how many times the game was closed. I don't know a way to do this, either i have tried some, if you know how, please tell me!

    Objective: If the player closes the game, or, the game closes itself, will detect it, then, apply an type of value to a LocalStorage.

  • Hi, you can use the expression "tokenat", it uses 3 parameters : the text source, the index and the separator, it can be anything, for example if you put ";" behind each line and specify it as a separator, "text 1" will be index 0, and will be returned if 0 is used as index parameter

    That should work, but, can you make an example capx for me? Like, i'm not sure if i could make it right, so, if you can would really help me. Also, thanks a lot for the tip!

  • Objective: Load a text in a .txt file, and, after loading it, load the next line.

    Example:

    After loading the 'Text 1' in the screenshot, will go to the next line, and then load the 'Text 2'. Will go on until it stops after loading the 'Text 10'.

    Tagged:

  • You need NWJS. You can check if the file exists in NWjs.AppFolder, NWjs.ProjectFilesFolder and maybe NWjs.UserFolder&YourGameFolder

    If the file is not there, just display a message that the file is not found. Because searching the entire PC is a difficult task and will take a very long time.

    Thanks a lot bro! Gonna try it out.

  • Objective: Find an specific named .txt archive in someone's computer. Like, when people download my game, in the game's folder will have an archive named Chat1.txt, I need to somehow find that archive without specifying his path.

    Difficulty: I don't know a method to do this, and i don't know if i will need AJAX or NWJS to do it.

    If you can help me, i will be very grateful.

  • You don't detect the letter, just the person that is speaking. You can assign them an ID and when they speak use that ID and play a sound, or so I can decipher from the info given.

    That actually worked! Thanks a lot bro!