ultrafop's Forum Posts

  • My apologies but you're using the beta version of C2 and I'm on the last stable version. I can't open your project. You can PM me with some links to screenshots and I can try to help that way.

  • Carbincopy I'm not so sure, I think the sound would play every tick that way (60 times a second).

  • Hey there! You can make one file with it playing twice, as you suggested....ooooor you could just set it to play not looping, wait 1 or 2 seconds and play the sound one more time.

    Currently, the alarm is set to stop playing at the start of "level 1" and not on the main menu event sheet. You'll want it there since you're loading that layout when the level layout ends. Just to make sure there wasn't an issue with your file, I tried this and it works jut fine for stopping the alarm.

    As for an easy way to playing the sound while overlapping the nebulas:

    if player is overlapping nebula + once while true (This is in the system object) - play sound looping

    else - stop playing sound

    If you do that, you'll want to adjust your collision boxes because some look a tad off.

    I'd also recommend that you condense your 3 nebulas into one object with 3 frames for it's animation (and set that animation speed to 0, the default should be 5). You can change how the object reacts to the payer depending on which frame is active in the nebulas animation (quick example: if nebula is playing animation "default" and it is at frame 2, subtract 5 health from player).

  • I'm not sure what kind of data you're storing but Localstorage is asynchronous so it's possible that the order of events may be impacting the way things are loading (making them load sometimes and not at others).

    Also, have you changed preview browsers? I believe that local storage stores in each browser separately so that may be why ata appears to be missing.

  • Did you try preloading the sound at the start of the layout?

  • You've got the events to play the sound looping first, then waiting 2 seconds, playing it without looping, then stopping. My guess is that your game is going to the next layout when the looping version is playing. Try to set those sounds to play without looping - I think that will fix the issue.

    In addition, on the start of your opening layout, you can set the sound to stop. That way, when that layout is opened up again, the sound no longer plays.

  • Hey there, this tut does a good job of explaining how the local storage object works:

    https://www.scirra.com/tutorials/1461/h ... age-plugin

  • You could try creating all of your objects, families, and global variables (All with the same names and, for your purposes, you'd probably want the same sprites) in a new project and then copy and paste your events from your original projects.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey there,

    Here's an example for you:

    In this example, you'll notice that I have a "once (while true)" qualifier in there. That's because this sprite only has one frame and is used as a backdrop. The method for your purposes is, otherwise, the same. If your animation is at "walking", compare frame to "10" and then set your sound to play.

    If you haven't done it yet, you'll also need to add the audio object to your project and import your sound.

  • Used tutorials and examples of raycasting to determine the angle of my object/player and move it accordingly.

  • Hey, thanks. I'll try to figure that out but I must confess that I've been out of math classes for 10 years lol. I'm unsure about how to do that. Would this be as simple as "Setting Position to Object"?

  • Hello all,

    So I've been tinkering around with C2 and came across a problem I'm not sure how to solve.

    My desire is to have an object inside of a curved sprite (like a circle) pushed outward at an angle from the center of that curved sprite (dependent on it's own position relative to the center). My goal is to have this object to be able to move along the outer edge of that sprite. My geometry is pretty bad since I've been out of school for awhile but I feel like I need to do something with sin, cos, and tan here...just not sure what. I've looked around and raycasting might be helpful? It looks a bit arduous but I'm interesting in learning anything that can be linked or offered.

  • Holy smokes, that's incredibly kind of you . Thanks!

  • Super helpful reply . Thanks R0J0hound

  • I'm sorry to be unclear. Here is an quick sketch:

    By "object ends" I mean, the edge of an irregular shape.