Lou Bagel's Recent Forum Activity

  • To all three of you, thanks for the confirmation

  • This is the intended behavior

    Not sure it is "intended" but more necessary. Anyway, didn't figure this would be new to everyone—I may have even read that in the manual but forgot, ha

  • Not sure where to post this, don't think it is a bug but not sure it is really intended. Just felt like posting this so others are aware since it took me a little troubleshooting to figure out. (I try not to use wait anyway so am happy using different events)

    In short, if you use wait in a loop you may lose the values of the loopindex and parameters passed through function. I say may because I couldn't tell if my code was working how desired or not so used textbox to monitor—which is how I found this.

    capx: https://www.dropbox.com/s/f1pq9ervg9bv8 ... .capx?dl=0

    Events:

    Result: (left without wait and right with a wait)

  • A little UI assistance at the beginning of the game

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • On layout start (or after all trees generated)

    -For each tree ordered by Tree.Y ascending

    --move to top of layer

    Trees don't move so should only have to do it once

  • There's a system condition that will tell you if the game is being run on a mobile device or not. Look in the manual for more details about it.

    Is it fairly accurate?

    I know its never perfect and a challenge to update with new systems—I remember when iphone ruined CSS media queries by marking themselves as not a mobile

  • Sorry for not looking into this myself before posting but just thought of this, not around Construct to test it, and will probably forget it soon:

    What will Mouse.X/Mouse.Y result in on devices without a mouse?

    Thinking along the lines of:

    -On Layout Start

    --If Mouse.X =! (???) then (set conditions for desktop)

    Thought this might be an easy way to detect without needing any input from user...

  • Working on a little intro:

  • You do not have permission to view this post

  • Nice! Glad you picked up on it and it works, good job!

  • ...I just want him to go to the closest one and stay there until it's down then find the next closest one that is marked...

    That would have been good to know when giving advice on your previous comments. I figured you still wanted it to be point and click so gave advice on that.

    Either way, I would make the minion into a state-machine. Something like idle->find->move->arrived->chopped->idle. You would have an instance variable for "state".

    So:

    if state=idle then set state to find and find path to closest tree

    on path found set state to move and move along path.

    on arrived set state to chopping and set timer

    on timer destroy tree, add to wood variable, and set state to idle

    (thus, since idle again would find closest tree and start the cycle over again)

    So with those events I left out arrived but depends on circumstances of what you need. Shouldn't really be too hard if you understand state-machines and can get that cycle down

  • I need to use the touch object and I will have more than 2 images (6 or 10 in total) by always clicking on two at a time. Can I use the same script with touch and with more instances than 2?

    You can do the same thing with touch instead of mouse.

    You should be able to adapt this to different conditions. If you are adding up a varied amount of numbers I would just make a global variable and add the instance variable to the global variable.

    I'm not really sure what you are asking or what your scenario is specifically, but I would rather you ask questions based on understanding rather than tailoring to your scenario. If you don't understand I may be able to make a capx example tomorrow to show you but I won't write your code for you.

Lou Bagel's avatar

Lou Bagel

Member since 7 Sep, 2015

Twitter
Lou Bagel has 3 followers

Connect with Lou Bagel

Trophy Case

  • 9-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies