RatFace's Forum Posts

  • 7 posts
  • Tweening the z-elevation works well for scaling text and spritefont:

    https://www.dropbox.com/s/9lgyx16nidbuiwg/scalingWithZ.c3p?dl=0

    This can be done much easier now with the scene graph. Add text as a child to the sprite, and it will scale with the parent.

    For any future travellers looking for an easy way to do this, I've attached an edited version of mekonbekon's events with dop2000's mentioned method (set text as a child of a sprite, and tweening the scale of that sprite)

    As far as I know, scaling with 'scale' works for most things but doesn't for 9patch for example, so I scaled the 'size' instead.

    https://drive.google.com/file/d/1n307Qi9nBGSg-gkGGOcqNNfTzjthp-bn/view?usp=sharing

    PS. In my case, I wanted a number(text object) that represents the amount of collectibles collected to quickly increase in size/scale before returning back to normal.

    Here's a screenshot of what I did: (sprite is invisible)

  • Project file:

    https://drive.google.com/file/d/1vvKYcSNE3u3rjmNMuGAaUUuR2NWh6579/view?usp=drivesdk

    Can someone help me with this? I cant figure out how to scale the project to the proper look.

    The project was initially in a 400x225 viewport, with the PlayerCollision being 16x30 and PlayerGraphics scaled way down to fit that, and the tiles (not my tilemap) being 16x16.

    However, since I imported my own tilemap (200x200) and my final artwork (627x870 - but downscaled in C3 to 20% - btw should I downscale in C3 or outside? Does it affect memory to have the source image smaller?) Additionally, I wanted the viewport to be fullHD (1920x1080)

    Needless to say, everything's messed up now, especially the physics (player feels so much heavier, and I'm not sure if I should be increasing all the numbers to fix that or if there's a more efficient way to do this)

    Then there's the tilemap problem. As mentioned, it's 200x200 per tile and I figured out how to tile it properly in C3 but it's too big still. So unless I scale everything up and increase the viewport size to say 3000x3000 or something, it no longer tiles properly. I want to scale it down, but when I try to do so a lot of problems arise so I need help with that as well. Should I be scaling it down outside C3? If so, by what percentage? I'm a bit lost to be honest.

    Here's everything's proportion to one another

    Here’s what it looks like currently

    Would very much appreciate some help!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use date object

    https://drive.google.com/file/d/1r__11nFBRCVxXzGvVcZ5KO4L_Q7ZP1EX/view?usp=sharing

    Thank a lot for taking the time to help! I eventually managed to get the timer to work, but this definitely works too! I'm pretty new to all this so, considering both got me the desired result, which one is more efficient and when/why would you use one over the other?

  • May be I understand this all wrong, but would it not be easier to use pixel per tick instead?

    > + System: ProgressBar.Width ≤ 208
    + Mouse: Left button is down
    -> ProgressBar: Set width to Self.Width+(208÷3)×dt
    
    + Mouse: On Left button released
    -> ProgressBar: Set width to 0
    

    With 208 the width and 3 the 3 seconds and if you have 60 FPS it would add (208/3) * (1/60) = 1.1556 pixel per tick to the width.

    Hey! Thanks for answering! I think that would fix this particular problem but I wanted it to be based on actual time pressed and not ticks or fps (so its exactly the same no matter the device)

    Someone told me that the "Every X Seconds" isn't accurate and I should instead use a timer but Im struggling to understand how to use one

  • Need help please!

    I'm creating a button that, when held for 3 seconds, restarts the layout. However, I'm having trouble getting the progress bar sprite (total width: 208) to actually sync with the number of seconds pressed.

    I have a couple of questions:

    1) Why are the timers messed up? If every 1 second I add 1, it should be equal to if every 0.001 seconds I add 1/1000 since 1 second = 1000 milliseconds yet when I did that to try and figure out the problem I got a different result? I got the "correct" result when I did every 0.001 seconds I add 1/60

    2) Is there an easier way to do this where I can use Tweening instead and forego the whole timer part, the whole reason I'm going with every 0.001 second is so the progress bar moves smoothly and not in chunks.

    Screen recording of the debug preview: streamable.com/aj2tz8

    Project file: dropbox.com/s/odxh7b09jnz2x7d/HoldButtonToRestart.c3p

  • Thank you for your answer! It turns out I used "change angle" instead of "change instance variable (shooting_dir)" which fixed the problem. However, what you proposed fixes another problem I had with a different enemy sprite, so thank you!

  • Sprite rotates with the shooting direction. I'm an artist with no experience coding so this was my first trial.

    I followed this tutorial: youtube.com/watch

    Here's a video of the problem:

    streamable.com/v0tpje

  • 7 posts