A little help needed: Values?

This forum is currently in read-only mode.
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Gday,

    I'm kinda new Construct but I've been reading up on tuts and the wiki to get me this far.

    I've been making a simple LEGO based game where you control a little LEGO duck.

    <img src="http://jaeuploads.googlepages.com/DUCKthumb.jpg">

    Click http://jaeuploads.googlepages.com/DUCKthumb.jpg for a larger image, I couldn't workout how to make thumbs nails in here (tying to keep things clean)

    The Aim of the game is to collect coins and eat pizza (to pass the level)

    What I'm trying to do is when you collect a X amount of coins something happens, in this case the hat appears and you can put it on, granting you more jump power so you can get to the pizza and pass the level.

    But the problemo is that I can't figure out how these values work; to make them trigger something, how to make a text object display those numbers and if I can use the same coin object multiple times ... or if I should even be using values at that.

    Here's my... events, this is where I'm most likely wrong in many cases, for I don't really know what I'm doing and things are all over the place.

    <img src="http://jaeuploads.googlepages.com/DUCKevents001thumb.jpg">

    http://jaeuploads.googlepages.com/DUCKevents001.jpg

    (The rotating of the DUCK I found out myself, though indeed it's not the best method but it's the only one I could think of, maybe that's another thing I could learn)

    I've made quite a few mini games with Construct but nothing too complex because this is where I get stuck.

    So could anyone kindly help me? I know It would have to be a simple thing but I'm stuck.

  • Set Private Variable ('cointotal') for other object (for example Text Object, but not Coin). Increment it when collision with coin (instead of Coin: add 1 to cointotal, you should make Text: add 1 to cointotal).

  • Ah! thank you very much, got the coin amount working.

    Would you also know how to make something change once it gets to a number?

    As once you collect 5 coins the hat will magically appear (set visible + collision on)

    I can't see any "if/on value" things D:

  • Ah! thank you very much, got the coin amount working.

    Would you also know how to make something change once it gets to a number?

    As once you collect 5 coins the hat will magically appear (set visible + collision on)

    I can't see any "if/on value" things D:

    +CoinCounter.Value('CoinTotal') Equal to 5
       -Hat: Make Visible
    
    +Duck is Overlapping Hat
    +Hat is visible
       -Duck: Change Animation to "DuckWearingAHat"
       -Duck:  Platform:  Set Jump Strength to 9999
       -Hat: Destroy
    [/code:39lokngo]
    
    You get to the "Value Equal to" condition by selecting "Compare a private variable" in the conditions list.  It's highlighted in yellow, you can't miss it.
  • I couldn't figure out how to do that, the "Compare a private variable" event shows up only on a sprite object, not the text one. unless I'm ment to do something else.

    But with mucking around for a while trying to find out why I found the simple [Text is "X"] event seems to work for me just fine, but maybe for later games when things get technical this method mightn't work?

    <img src="http://jaeuploads.googlepages.com/Text-is.jpg">

  • That's odd. "Compare private variable" shows up for text objects for me

    But hey, if it works, it works

    Edit:

    Hmm, seems I gave you a little misinformation previously. "Compare private variable" is highlighted for sprite objects, but not text objects. It should still be in the list, though.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah haha, I see it now

    Thanks for your help. If I come across any more problems I'll be sure to ask.

    Here's the current project so far if anyone wanted to see it. Nothing much at it's current state but there's a few test levels (the bonus level isn't finished and the clouds are just test ones)

    http://jaeuploads.googlepages.com/D.U.C.Kv5beta.zip

    Here's some pictures,

    <img src="http://jaeuploads.googlepages.com/DUCKv5SneekP.png">

    <img src="http://jaeuploads.googlepages.com/DUCKv5SneekP2.png">

    <img src="http://jaeuploads.googlepages.com/DUCKv5SneekP3.png">

    <img src="http://jaeuploads.googlepages.com/DUCKv5SneekP4.png">

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)