Lou Bagel's Forum Posts

  • 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.

  • x is a increasing/decreasing number from 0 to 1 (or 1 to zero)

    you have to increase/decrease x in some system

    look at my example for 1 possibility

    True in the traditional lerp way, but not in the gradual decline effect where x is a constant (somewhere around 0.04) and the a is updated to the current location. This will move fast at first and slow as it goes but never reach the exact b, so much test for b-1, or somewhere really close.

    Is there a way to save as an older version capx? Mine had both examples, think it would be helpful

  • Did you try this?

    Global Variable1 = -1

    Global Variable2 = -1

    Mouse Button is down

    -Cursor is over image & Image is "active/ready" (make an instance boolean)

    --Variable1 = -1 -> variable1 = image.instancevariable & set image boolean to false

    --else Variable2 = -1 -> Variable2 = image.instancevariable & set image boolean to false

    On button released

    -Variable1 =! -1 && Variable2 =! -1 then [where ever you need the sum to go] = Variable1 + Variable2 (& set Variable1 & 2 back to -1)

  • Couldn't you achieve the same effect using local storage?

    Not sure best way but maybe:

    On layout start -> set global variable to random number

    On button -> store global variable into local storage, open new window

    If global variable =! local storage then fire javascript

    I actually haven't used local storage yet so doubt that is exactly how it would go but hopefully that conveyed the premise. I've used mySQL tables before and feel like I could achieve this with them, but figured local storage could as well and would be much simpler

  • Thanks for file badmoodtaylor but can't open as I'm still on the last stable release (r233)...

    Ah, that's really annoying because I only updated to open someone else's capx I was trying to help

  • You are using a 'checked' release of Construct 2, intended for testing, which causes certain errors to be reported this way. Hit Ctrl+C to copy this messagebox - it's useful information for the developers...

    Maybe I misread that as I was posting for your benefit not mine—I didn't require a resolution, sorry

  • I clicked on the ... on the font properties, changed font and to a smaller size and the error popped up either then when I clicked okay.

    I don't really remember specifics because I was routinely just trying different fonts and sizes

  • www -dot- cazualnoob -dot- com/web-games/ (second game file)

    well... my little minion will only chop 3 or 4 trees then I can't make him do anymore - no idea why.

    Long story short, I'm pretty sure it is the "trigger only once" on the chop=1 condition. So if you click two trees they will both have chop=1 and once one tree is chopped the event won't fire again.

    And just to note, this isn't me complaining but for your benefit on getting help in the future—your project is pretty messy. A lot of disabled events and events that do nothing. It is asking a lot to post your whole capx and ask for people to read through it all. Try putting events in groups, using comments, and using the bookmark on the events you want people to trouble shoot. Just saying it took a while for me to even find the part to trouble shoot and I almost said screw it. (but I didn't )

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wow, nicely done korbaach . Concise and effective. I gotta get myself more familiar with arrays

  • Here is one with regular blur and text blur—I might like regular better but your preference. You can mess with the speed of the lerp one by changing the "0.08" but make sure you change it in both actions

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