dop2000's Forum Posts

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

  • Also check out the MoveTo plugin. It's a great plugin, easier to learn than LiteTween and can also be used for this task.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I see nothing wrong. This is how pathfinding works, it doesn't always move in shortest straight line.

  • Check the position of Origin image point in Sprite Editor - double-click your arrow sprite and select Image points on the left toobar.

  • Try moving "Find path" to the bottom of the event #89, after "Add obstacle" action.

    Also, why do you have another "Add obstacle" in event #90?

    Still, it will be easier to troubleshoot if you share your capx file.

  • What exactly is your question?

    You can add all enemies to a family "Enemies" and all orbs/potions to another family "Items" and do this:

    On Enemies destroyed: Enemies spawn Items

    This will spawn a random item when any enemy is killed.

  • There may be other (invisible) obstacles, or wrong collision polygons, or the cells size is too big.

    Impossible to tell without seeing your capx.