C-7's Recent Forum Activity

  • It shouldn't be run every 10 seconds, it should run every tick.

    Every Tick

    If Sprite.Scale <1.0 -----> Sprite > Set scale to Self.Scale+0.1*dt

    This will increase it by 0.1 or 10% over the course of a second and repeat continuously until it reaches 100% or 1.0 scale. You can also add on there for it to happen if a variable is true (otherwise, this will start running once the object is created or the layout begins if it is already on the layout when you run it.)

  • I don't normally do this, but check the manual for information on multi touch.

  • You can use a timeline plugin, but I just have a cutscene variable. Cutscenes are a little complex to make, but not terrible if you break it down.

    At the start if when the cutscene should begin, I set cutscene = 1. I then use that variable to measure the progress.

    If cutscene = 1

    ---->Trigger once, do stuff, wait 3.5 seconds, set cutscene = 2

    ---->Every tick, do whatever.

    Then repeat for each "phase" of your cutscene. I have the main event and then two subevents (the second is unnecessary, but god for organization) to accommodate the things that wil happen continuously (camera movement, character movement, fades, etc.) and things that happen once (triggers, spawning/creating objects, destroying, setting variables, playing sounds) with a wait to let the game know how long that segment should last. I then repeat the process for each segment of the cutscene. At the start of the cutscene, be sure to disable character controls and/or start ignoring input.

    You can get as complex as you'd like, as you can imagine, but that's th gist of how I do all of my cutscenes.

  • Most events run each tick (every time the cpu runs through the event sheet). There are some events that inherently only run a single time (on mouse clicked, on collision, etc). The rest of them happen repeatedly. I suspect the sound is getting played repeatedly and the stopping is only stopping a single instance of it. If you have an event that you want to force to play once (something like "If variable > 4, play sound"), you can go to System>Trigger Once While True to make that event only run a single time instead of repeatedly.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is it done during a trigger or continuous event? If it is called with something like 'trigger once while true' that code should work. If, not, that may be your problem.

  • Great stuff, and Wrangler ! Both games are looking really nice!

  • Congratulations! This is really fantastic for you guys and neat for C2!

    I hope the rest of production goes well and your launch is great!

  • If I understand correctly, I would add an instance variable to the player that indicates the player is moving. Then when a button is pressed, check to see if the player is already moving. If they aren't, set your animation going and set the moving variable

    On future button presses, they check to see if moving, and the player is already moving so they skip the animation and press on. You character still moves in the correct directions, but you only set the animation to play if no movement key was being held down prior to the button press.

    That should prevent animations from overriding each other, which is what I suspect is happening here. What you have described is "undefined" behavior, meaning the exact outcome depends on which order you test the movement keys determines the final, actual, animation.

    At least I think. If what I'm saying doesn't make sense, can you post a .capx? We'll be happy to take a look at it (I wouldn't imagine it would be hard to make a new project, copy the player and the movement key events).

    Hope it helps!

    The only issue with that would be going opposite directions. Your system would mean if you were running right then switched to running left, it would keep the right running animation while going left. So you'll need a series of events and sub-events to define when to stick with what animation direction, but it'll work.

    I do it based on button presses.

    If W is down set animation to north

    --subevent: if a, set animation to north,

    --if d, north

    --if s, south.

    Do something like that for each of the four directions and it should cover everything.

  • Either a dictionary or array (I'm more comfortable using arrays, but they both work similarly in this case). The biggest reason is for saving. I can save everything in my game as a single JSON file and reload just as easily.

  • Roccinio

    I'm not near my computer, so I can only give approximate names. But once you drop it in, it adds in all of the body parts. Don't worry that it's a big pile, it'll sort itself out when you hit run/preview. It inserts a bigger event that initialized and associates all of the sprites with that scml file. That needs to be included in whatever event sheet is running on that layout. I recommend putting that bit initialization event on an included event sheet to reduce copy+pasting and redundancies.

    You can then change the playback rate, set the animations to play once or loop, and choose which animation to play--use the name you set up in Spriter for each animation. I would then set the scml file to the position of your dummy gameplay sprite (so it can have the platformer behavior or whatever you are using).

  • I've never run into that being a problem, but why would you import png sequences from spriter into c2? You can just drop the scml file in and it'll tween everything in-game. You would never have to worry about frames.

  • It's at irc.esper.net, #construct

C-7's avatar

C-7

Member since 9 Oct, 2010

None one is following C-7 yet!

Connect with C-7

Trophy Case

  • 14-Year Club
  • Popular Game One of your games has over 1,000 players

Progress

15/44
How to earn trophies