sweetdiss's Forum Posts

  • I'm using the r214 build of Construct 3, which includes support for adding a child to another object. This works great for attaching a child to a parent object, but when I try to add more instances of the child, they don't stay attached. Only the first instance stays attached.

    I know I could use pinning, but the PinTo behavior doesn't quite work with my game mechanics because I need the child objects to move with Sine behavior while still being attached to the parent.

    I tried adding the object to a family and attaching the whole family to my parent, but still, only the first instance of the object stays attached to the parent.

    Do I have to tell Construct to set each individual instance of the object to be a child of the parent or is there another way?

    Tagged:

  • sweetdiss

    I know it's not helping you on how to use the moveto with the dragging but I don't think it works. I Fixed it for you though :) https://1drv.ms/u/s!AkmrWgxeuxlKhIcDw9lvzBLdeMW6PQ?e=CP7Ya3

    The issue was the Moveto behaviour so i removed it and used lerp SetY, with a boolean to toggle the sinking.

    Super neat little game you got going on :)

    That is absolutely perfect, thank you so much!

  • I've got a water level with a buoy in it. When the player jumps on the buoy, I'd like it to smoothly sink down about 90 pixels and then stop so the player can jump on it one more time.

    I have it set up like this:

    Player on collision with Buoy: Buoy MOVETO position self.x, self.y+90

    This works perfectly, except that I found when the player continues to move, the buoy's X position also moves, so the buoy follows the player while sinking rather than staying at its original X position.

    This is probably because the main mechanic of my game involves dragging the level horizontally using DragDrop, so that technically the buoy's X position IS changing, unfortunately.

    How do I set it so that the buoy object only moves up/down relative to the rest of the level, regardless of when I'm dragging the level?

    Here is the project, where it should make more sense ("GameSheet" & "2-0" are where the behavior happens).

    drive.google.com/file/d/1-MLn4d0Ki72nUBrdgL5fMlXW9Acp6Bzs/view

  • I've got a player sprite that accelerates up when the screen is touched and held, using Custom movement. When you lift your finger, it should stop accelerating and fall back down. For gravity, I added Platform behavior with disabled controls.

    However, when I lift my finger, the sprite doesn't fall back down. It just keeps accelerating up.

    How do I get the sprite to slow its ascent and fall back down when you stop touching the screen?

    Here's the project:

    drive.google.com/file/d/1u2KclAXYroI-UShNy2IOT4UhnwtC5ZEE/view

  • You haven't sized your array correctly. It's only 10x1, but you need 10x10 - depends on Worlds & Levels needed. Use the debug option to look at the array data, and you see immediately, there's just a one-D array.

    Thank you!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a Level Select layout with 9 instances of a level icon sprite. The sprite has 10 frames, 0 being a "lock" icon and frames 1-9 being an icon with the level number on it.

    Each level icon has an instance variable called "Index" which has the level name: "1-1", "1-2", "1-3", etc. (The first "1" is for the Area--like the "Worlds" in a Mario game--because I plan to add more Areas later).

    I also have a LevelUnlocksArray that keeps track of which levels the player has unlocked so far. To make it easier for myself, the X coordinate represents the Area number (remember, only 1 so far) and the Y coordinate represents the Level number (there are 9 in total). For example, the unlock value (0 or 1) for level 1-3 would be found at X=1, Y=3. (I know it's not 0 indexed this way but it makes it easier for me to remember where things are.)

    So here's my problem:

    On the start of the Level Select layout, I'm looping through the LevelUnlocksArray to figure out what frame each of my Level icon sprites needs to be at. If the value at [1,2] is 1, then I want to pick the Level sprite whose instance variable is "1-2" and change the frame of that specific instance from frame 0 (a lock picture) to frame 2 (a picture of a "2").

    Unfortunately, nothing happens. All the level icons remain "locked" (so they're at frame 0 instead of changing to the frame showing their level number).

    Here's the logic:

    And here's the project:

    drive.google.com/file/d/1-MLn4d0Ki72nUBrdgL5fMlXW9Acp6Bzs/view

    (The values are being inserted into the Array in the YouWinSheet, after each level is completed.)

  • Thank you!

  • I understand that you need a small overlap. But I think it's easier to do in a sound editor. Mix the beginning notes into the end of the track, and the ending notes into the beginning. And crop it so that it plays seamlessly.

    If you want to do it in Construct, you'll have to play the first copy of the song, and then compare AudioPlaybacktime expression on every tick. When it's almost the end of the song, start the second playback and fade out the first.. I don't know how accurate this will be.

    Thanks! I'm trying the second method but I can't get it to work. To test it out I'm doing "System > Compare two values > Audio.Playbacktime('Music') = 5" and then playing another file as the action. (Instead of "5" I've been trying different values because I have no idea if it counts in seconds or milliseconds, etc.) "Music" is the tag I've tagged my music with for now.

    The second sound file never plays though, no matter what I set the number value to or how long I wait.

    Another thing that might be affecting it is that I have the music in the Sounds folder, because it won't start playing otherwise (this is something I've read about on the forums).

  • In order to have it loop in time with the beat (so the last beat of the song goes right back in to the first beat) I would have to cut off the final notes ringing out though. It would sound too abrupt.

    If I let the note ring out, there will be a gap in the music when it loops (even if I cut off the silence when the note is finished ringing out).

    I need the last note to ring out over the first note when it loops.

  • I have some menu music for my game that is supposed to loop infinitely. The thing is, I need it to loop seamlessly so the last beat fades in to the first beat when it loops back around.

    I've tried searching the forums but most people asking similar questions want to know how to fade one song into a different song, rather than one looped song.

    Ideally I'd like to re-start the song right on the final beat, and have the final beat begin fading at that moment.

    How do I achieve this?

  • It's possible in r212 with the new Scene Graph feature.

    Don't pin the platform to the big wall, instead use "Wall add child Platform". It will be dragged with the wall and also move with Sine behavior.

    .

    Works perfectly, thank you!

  • My game mechanic requires all the platforms to be pinned to a huge invisible wall. When I added Sine behavior (bobbing up and down) to one of the platforms, I was hoping it would move relative to where it was pinned, but instead it just doesn't move. If I unpin it, it moves as it should.

    How do I move a platform with Sine while keeping it pinned to something else that doesn't move?

  • When I choose Player > on collision with object, the tile map is not one of the options. Same when I start with the tile map, it doesn’t have “on collision with object” as an option.

  • Player on collision with tilemap?

    With the tiles, yeah. I’m making platforms with the tile map.

  • I'm trying to paint my level with a tilemap I made, and I gave it solid behavior, but I can't seem to add any collision events to the tilemap.

    I'm trying to have my character constantly jumping by using 'Simulate Controls - Jump' on collision with the tilemap, but there are no "on collision" events listed for tilemaps. I gave it the Solid behavior as well.

    This works fine with normal sprite objects... Do I need to hide an invisible sprite behind all the tiles in my level?

    Also, if the platform needs to move around, the tilemap just stays still. If I have to put invisible sprites behind my tilemap, is it possible to attach them so they always move wherever the underlying sprite moves to?