StanBond's Recent Forum Activity

  • Thanks that worked!

  • Hello, I've managed according to the tutorials to use the local json file through the files folder. Now I would like to tryout hosted version of it.

    I've tried to use the AJAX request , but nothing worked, then I've tried to setup a php file index.php with the following contents

    <?php
    
    echo date ("h:i:s");
    
    ?>[/code:3o6rnsop]
    
    Just to try and output it, but nothing working so far.
    
    What am I doing wrong?
  • When you press the button, check if the apple overlaps the cup. No variable needed.

    I would do this but, I was looking for a solution that will allow me to have multiple cups.

    For example, I have 3 cups - 2 of them red, and I have two apples, the apples must be placed on red cups only.

    So at the end the user got the button to check if he placed them all correctly.

  • Do you really need the variable then? The "Overlapping" condition is giving you the data you need.

    I have a button, which later on when I press got to check if the apple is on the cup

    >

    > Something similar can be done with overlapping, but when I set current value of variable+1, it just goes razor fast up without limiting to the increment of 1.

    >

    >

    This is because it adds 1 every tick/frame while the apple is on the cup. I do not know if you just want it to be 1 for on cup, 0 if not on cup or if you want 1 to be subtracted/added every second. In the case of the latter, change add/subtract "1" to "1*dt", that will add one per second regardless of framerate.

    You have three options if you just want 1 or 0 for on cup:

    1) Instead of add to/subtract from variable use "set value" action.

    2) Add a "trigger once while true" condition to the overlap event.

    3) Don't use a global variable, add a boolean variable to the apple object called OnCup and set it to true/false if it is overlapping/not overlapping.

    Thanks I'll try this out

  • I have a cup and apple, when I place my apple on my cup I want the variable "onCup" to increase by 1, and when I remove it from the cup I want it to decrease by 1.

    As I see it, there should be some listener that will listen to the condition, while its on the cup increase by 1, if its no longer on the cup then decrease by 1.

    Didn't find any tutorial that explains this approach.

    Something similar can be done with overlapping, but when I set current value of variable+1, it just goes razor fast up without limiting to the increment of 1.

    Looking forward to your help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So I have made an inventory slot, and the idea is of the following:

    Got only one inventory slot with 10 apples stacked in it, something like an apple and at the bottom left corner it says how much apples i got in this slot right now, whenever I displace the apple with drag and drop function beyond the inventory slot it should reduce the current number of apples in the slot.

    The problem, I've created 10 instances of apples, created global variable with value 10 and made it the way that whenever i move an apple beyond the slot it will subtract 1 from the global variable. However as it stands now i had to use "Is overlaping" for the apple that overlaps the inventory slot, whenever I take the apple away it keeps subtracting. What I want is to reduce the global variable by one whenever the apple leaves the inventory slot.

    Any suggestions? By the way, maybe someone can suggest any method to take care of these apples in more comfortable manner, as in case of 100 apples will be hard to manage them all.

    Thanks!

  • Thanks 99Instances2Go, works like a charm, the invert suggestion regarding "on collision" kept me really busy as it was greyed out

  • Hello,

    So I have made a button, sprite with a flower (attached drag and drop to it), whenever I move my flower on to the button I've made a collision detection the way it will turn on the particle by changing its position from the outside of the screen to the position of the button, and everything works great. But now I want my particles to go away why I move away the flower from my button. How do I detect that there is no longer a collision?

    Thankds!

StanBond's avatar

StanBond

Member since 11 May, 2016

None one is following StanBond yet!

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies