prawnsushi's Forum Posts

  • [quote:1x9ulwzl]funny fact: move your mouse around the screen like madman and see what the ship does when trying to follow the mouse cursor

    peppy : Do a barrel roll.

  • Erm, i noticed a bit late that your animations used numbers as names....

    So you can just set a private variable (hitme = 0) and increment it :

    + Balle: On collision between Balle and BricBrique
        + BricBrique: Pick closest to: Balle.X, Balle.Y
        + BricBrique: Value 'hitme' Less or equal 5
            -> BricBrique: Add 1 to 'hitme'
            -> BricBrique: Set animation to BricBrique.Value('hitme')
        + System: Else
        + BricBrique: Value 'hitme' Greater than 5
            -> System: Add 1 to global variable 'briques'
            -> BricBrique: Destroy[/code:1dkfn2fp]
    
    And probably you could use families too, that could save you a lot of events...
  • Tulamide to the rescue!

    Thanks, it's a bit more clear now

    When i see such expressions , my brain just stops working...

    Next time i'll just put these expressions in a text object at runtime and see what happens...

    Thanks again Tulamide

  • + System: Always (every tick)
    -> sun: Set Y to clamp(.y,23,200)
    -> Sprite: Set horizontal skew to [b](sun.y/70)[/b]*(Sprite.x-sun.x)
    -> Sprite: Set height to [b]178[/b]-(Sprite.y-sun.y)
    -> sun2: Set opacity to lerp(70,0[b],clamp((sun.y-100),0,100)/100[/b])
    -> Sprite: Set opacity to lerp(70,10,[b]clamp((sun.y-100),0,100)/100[/b])
    [/code:3uddm35y]
    
    Nice, but i wonder how you come up with such things as "clamp((sun.y-100),0,100)/100". Why sun.y-100?
    
    Also, i know you didn't write all this code, but why is the shadows height set to [b]178[/b] ? random value?
    what about skew with sun.y /[b]70[/b]?
    
    This is making my head spin... also, i suck at maths, and that really doesn't help me at all here lol
    
    Thanks
  • Thanks Rojo

    I didn't understand the expressions there so changing the layer effect was my 1st thought :p

    Looks better your way though hehe.

  • Salut !

    It will work if you reverse the order of the events.

    i removed the wait object and rearranged the events like this instead :

    + Balle: On collision between Balle and BricBrique
          + BricBrique: Pick closest to: Balle.X, Balle.Y
                + BricBrique: Animation "5" is playing
                         -> System: Add 1 to global variable 'briques'
                         -> BricBrique: Destroy
                + BricBrique: Animation "4" is playing
                         -> BricBrique: Set animation to "5"
                + BricBrique: Animation "3" is playing
                         -> BricBrique: Set animation to "4"
                + BricBrique: Animation "2" is playing
                         -> BricBrique: Set animation to "3"
                + BricBrique: Animation "1" is playing
                         -> BricBrique: Set animation to "2"
                + BricBrique: Animation "0" is playing
                         -> BricBrique: Set animation to "1"
    [/code:3umkpfdo]
    
    Indented "+" events are sub-events.
    
    it seemes to work ok... edit : but someone may know a better way (surely, i ain't a programmer lol)
  • Alisia Dragoon :

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Looks very cool I'll probably use it!

  • If you look carefully you'll see the picture, but it's very light.

    Set the layer to multiply to see what's happening.

  • [quote:7owy8rjj]one thing is missing. transperency.

    shadows, when sun is low, not only grow longer - but also less visible. in that last cap - try and drag the sun far away offscreen and see what happends.

    It's fine with me anyway - no one's gonna ever see the sun in my game

    I'm using this (yes i know...) with lamps. It doesn't look very realistic (due to the lamps position) but still better than blobs.

  • Maybe you can cook something with this :

    Len(string)

    Returns the number of characters in the string.

    Check the number of characters in the tooltip text and then adjust the text object's size and frame size?

    You'd probably have to know the width and height of the police you're using though.

    aaah i don't know i'm just a noob ^^:

    Edit : Or maybe you can try to do it the html/css way : make small images for the corners (or just one since you can rotate it), and one for the frame itself that would be stretched or repeated until it fits the size of the tooltip. Because if you use 1 image only it would be blurred. And then add a Tiled Background.

  • Btw, is there a difference between floor(3.2654) and int(3.2654) ?

  • Correct me if i'm being dumb :

    [quote:1ut1a92i]int(value)

    Convert the given string or float to an integer.

    It means you can convert the text "3" to the number 3.

    Or round the Float 3,2 to the Integer 3. (I think Tulamide said it is rounded down).

    Etc...

    You cannot convert text like 'blah blah" into a number with int. Actually, I wonder what int("blah blah") would return...

  • This is very nice, i love it

    Can i use it in my game?

  • Thank you, kind sir.

    I'm now working on something inspired by Clock Tower, so i'm quite busy looking at all the drawers in construct....

    Don't know if i'll continue this game.