Bootfit's Forum Posts

  • Hello folks - I'm looking at using SpriteFonts for the first time. Can anyone suggest some SpriteFonts resources to download different fonts? The SpriteFont supplied in Construct is a bit clunky.

    Thanks all. :)

  • I have an event sheet that creates a sprite:

    System > Every SecondsPerObject seconds > System > Create object ObjectBox01 on layer "OBJECTS" at (280,75)

    But what would I write if I wanted to choose from a random selection of sprites? eg ObjectBox01, ObjectBox02, ObjectBox03

    Thanks all.

  • Smashing thanks.

    There's so many sub-events with each behaviour that I didn't know Plaform is Jumping, Platform is Falling are even things. I suppose you don't know they're there until you need to use them.

  • I have a really basic sprite (called Player) that has 4 frames of animation and sits on a FloorLayer with solid behaviour enabled.

    Frames 0 and 1 are the basic legs up/down running states. Frame 2 is the jump state and frame 3 is the downwards state (the state between jumping and falling back down to start running again in frames 1 & 2).

    I currently have the following:

    Mouse > On any click > Player > Simulate Platform pressing Jump.

    This moves the sprite up in a jump motion. But the sprite continually runs through frames 1 > 3 including the jump & downwards states.

    How do I edit the event sheet to run just frames 0 and 1 for running and frame 2 when in the jump state and frame 3 after the jump state and returning to the FloorLayer?

    Thanks all :)

  • My initial question was more to do with the fact that the bomb is a sprite and has perfect pixels, whereas the boxes are tiled backgrounds and look anti-aliased. Why do sprites look pixel-perfect while tiled backgrounds don't?

    If one displays perfectly then why not the other?

  • I'm using the retro style layout (180 x 320) and I have pixel-perfect sprites and tiled backgrounds.

    If you look at the attached image of a zoomed in portion of the screen, you can see that the bomb (sprite) is pixel perfect but the grey boxes (tiled backgrounds) look like they're anti-aliased. The grey boxes have pixel-rounded corners and a single line of light and dark shading at the top/bottom but they should still look pixel-perfect.

    What settings do I need to apply to make all sprite/tiled-backgrounds etc look crisp? I currently have:

    Thanks all :)

  • The function I need isn't If Score%10 = 0

    The function I need is If Score % 10 = a whole number > then DO THIS...

    --> ELSE do this...

    eg:

    * 6%10 = 6 (whole number) > DO THIS...

    * 5%10 = 0.5 (not whole number) > ELSE...

    So whats the expression for Whole Number?

  • OK - so float(Score)%10 is the expression I need, but how do I complete the following:

    System > float(Score)%10 -> If the result is a whole number then do A, else do B

  • Brilliant. Float - that was the term I couldn't remember.

    Thank you :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In my game whenever the player gets a score of 10, 20, 30 ... 1210, 1220 etc (basically any score that is wholly divisible by 10) I want an event to run.

    There's a way in programming that runs something like this:

    If a number is divided by 10 and the result is a whole number (1, 2, 3 etc) then run this function...

    I can't remember the name of this type of function, but is there a similar way of doing this in Construct, where If Score/10 = Whole Number then execute Function

    Thanks all :)

  • Nope - completely lost.

    When I put all Lerps in the one event:

    rgb(lerp(0,255,SliderBar.Value), lerp(0,255,SliderBar.Value), lerp(0,255,SliderBar.Value))

    ...the slider just turns the background from black to white.

    I've tried adding instance variables (TestSpriteR, TestSpriteG, TestSpriteB) to a yellow TestSprite:

    system > every tick > Test Sprite > Set TestSpriteR to (lerp(255,0,0))

    ---------------------------------- Set TestSpriteG to (lerp(0,255,0))

    ---------------------------------- Set TestSpriteB to (lerp(0,0,255))

    But that didn't do anything. Yep, I've no idea what I'm doing.

  • pilpgam - thanks for the plugin suggestions but I might look into the code/event sheet suggestion by NetOne. The AdjustHSB plugin looked promising but it altered all the colours in the game as opposed to just colours on a specific level.

    Tis not advanced very basic stuff

    you really need lerp for a lot of things in games so good to understand

    here I did background RED only on one slider to keep it simple so you can see how it works

    the slider just moves value from 0 to 1 so result is it is setting red from 0 to 255

    green and blue I left at 0 but if you clone 2 more sliders and put the same lerp then you can control all the colours

    https://drive.google.com/open?id=1Rx7ysE4UydFQnvB0EmC2MWwFYY9G2FQb

    NetOne - thanks for this.

    I cloned the slider bar and called them SliderBarR, SliderBarG, and SliderBarB - then did:

    System > Every Tick > System > Set layer 0 background color to rgb(lerp(0,255,SliderBarR.Value), 0, 0)

    ---------------------> System > Set layer 0 background color to rgb(0, lerp(0,255,SliderBarG.Value), 0)

    ---------------------> System > Set layer 0 background color to rgb(0, 0, lerp(0,255,SliderBarB.Value))

    However, when I do this only the last slider bar in the event sheet works - in this case, SliderBarB. If I disable that then SliderBarG only works. Does this make sense?

    Also, once I do get all 3 slider bars working together, I'm not sure how I'll automate it so it runs through a set selection of colour points.

  • Hmm, that seems a bit advanced for my current level. Are there tutorials or basic projects that I can look at that will help clarify the process?

  • Thanks pilpgam - I appreciate your help with this. I've replicated your event sheet and I've been fiddling around with the colours but I can't seem to get the correct colours I need.

    I need the following colours:

    R 255

    G 225

    B 0

    fading into

    R 255

    G 0

    B 255

    ...and every colour between - so it passes through the green and blues also.

    Ashley is there a way to implement this easily?

  • Maybe just adding a 'Set Color' effect to the sprite and then changing the parameters of it every 0.1s and then stopping that process when it reaches for example 255, 0, 255?

    I'm not sure how I'd go about this - can anyone expand on how I'd do this?

    I've created a white tiled background sprite and I've given it an Effect of Set Colour.

    Now what?