dop2000's Recent Forum Activity

  • It's hard to tell what's going on by these screenshot. My guess is the event 76 is triggered multiple times and multiple people are marked with status=1.

    Event 79 is definitely wrong. Condition "Build_ID=Person_Build_ID" checks instance 0 of person object only! So if there are many people, this event will almost always be executed on every tick, clearing Builder_On_The_Way state.

    If there are multiple buildings being constructed, event 78 may move the Pathfinding_Destination sprite from one building to another on every tick.

    In other words, it's a mess

    I suggest you put Brower.Log into these events and output some debug info, then you'll be able to see how everything works.

    Object.PickedCount is a useful expression, it can tell you how many instances are picked in each event.

    I would change these events completely. Testing a bunch of instance variables for lots of objects on every tick is bad for performance and it's hard to program these events correctly.

    Use triggered events! When player clicks on the map to put a new building, pick all free people (with status=0), then pick one that is closest, direct it to the building site, set status=1.

    On pathfinder arrival, change status to 2, start building. On completion, set status to 0.

  • So you want the brick to move 32px and stop?

    I suggest MoveTo plugin by RexRainbow.

    https://github.com/rexrainbow/C3RexDoc/tree/master/repo

  • Will the forum ever be fixed??

    After the whole day of planned maintenance yesterday, the website works even worse than usual - terribly slow, logs me out every 10 minutes, pages not loading (Error 524 Timeout). Took me an hour to post a few small comments!

    Don't know why I bother posting it here, looks like nobody from Scirra visits this thread anyway...

  • It doesn't matter, you can add multiple stacks in one loop..

    For example:
    quantity=18
    stackIndex=5  (index of "raspberries" stack in the array)
    
    While quantity > 0
        if array.At(stackIndex,1) = 10 
                 // create new stack
                 Array Push "Strawberries"
                 stackIndex=Array.Width-1
     
        // add 1 to current stack, subtract 1 from quantity
        Array set at X=stackIndex, Y=1, value=(array.At(stackIndex,1)+1)
        Subtract 1 from quantity
    [/code:2jbzvvpw]
  • mikehive explained you how in his comment!

    Use a loop, when the stack reaches maximum size, create a new record in the array (for example you can use Array-Push action).

  • You do not have permission to view this post

  • Shouldn't be a problem unless you have lots of events like this.

    You can do this on Timer event every 0.5 seconds or so.

  • You do not have permission to view this post

  • What's the problem?

    Your array could look like this:

    strawberry, 10

    blueberry, 7

    raspberry, 10

    raspberry, 4

    strawberry, 1

  • Why are you asking the same question again after it was answered in another forum?

  • Instead of "Add target" you need to use use "Acquire target" and "Has target" events.

    Check if the turret doesn't have targets, then pick enemy instances and acquire them as targets.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Also check out the MoveTo plugin. It's a great plugin, easier to learn than LiteTween and can also be used for this task.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 262 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies