How do I get C/sec when u buy A to get B.

0 favourites
  • 10 posts
  • Hi!

    Here is what I want to make:

    Each time u buy A, u get B and B is to make C/sec and the price of A increases 2x each time clicked.

    So:

    On clicking A & If money is same or greater than A = B bought. And A+A = new A (got it til here).

    And now, since every tick = 60times/sec right? Then I want to make every X seconds = 1.

    So I made it like this - every 1 sec = 0.01

    But when I tried it, when I cliked it only executed it once and therefore the value of C is only 0.01 (what??) I alrdy made the text auto-update though.

    So can anyone please help me?

    Thank you very much!

    Any help would be appreciated

  • Could you give more details to the "C/sec" process?

    • What do you want to calculate?
    • What is C?
    • What does C depend on? Does it increase when you buy more B?
  • Here is the image: (Sorry Ashley but I really need help right now x.x)

    What I mean is when I click it: I'll get Fans every second. But by this It doesn't do the thing like I wanted it to do.

    remove the (;[.][;[;) https://scontent-sit4-1.xx.fbcdn.(;[.][;[;)net/v/t34.0-12/17092122_622835954592251_487185459_n.png?oh=2bc92d20a365edd6eabe9b1a309fec35&oe=58B8546F

  • That's because you have the fans action under the event as a sub-event. It'll only trigger once due to that condition. You should put it elsewhere on it's own and add a boolean variable, like:

    "B Bought" variable = 1 (true)

    Every 1 second*dt

    Adding "*dt" makes it framerate-independent, so it'll probably run better regardless of end-user specs.

  • So:

    Every 1 second & for every +1 to the Cameraman (New variable) = +1 to the Fans right?

    But how can I make the every +1 to the cameraman while the available thing is compare variables? Thanks

  • Seems so. My example was operating off of a static variable...a simple on/off boolean that activates the first time item-b is bought. You may have to do more work for this.

    If you link the capx, I can try to set this up for you so it works as described.

  • Here is the capx: (remove the }[\][) http:/}[\][)/www8.zippyshare.}[\][com/v/OxTfJZLs/file.html

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Okay, but I want to trigger it for each clicks. How can I do it?

  • How do you want it 'un-triggered' ?

    To trigger it on 'each click' it must be in a state of 'not triggered' b4 the click.

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