vee41's Recent Forum Activity

  • Exactly :)

    Your question:

    From 0 to width-1 (indexes from 0 to 9) is not same as from 1 to width (indexes from 1 to 10)

    Both index 10 values, but as the array only has values in indexes 0-9, the later one would try to index array values that do not exist. This is not recommended, ever :)

  • array.width = 10

    array.height = 10

    That means your array is 10 elements wide and 10 elements high.

    Indexing of arrays starts from 0, so your array indexing should be from 0 .. array.width-1 (9, which is the index of last array value)

  • You'd need to set the location of the object you want to move at the moment 'Touch start' event is triggered. Would be something like this:

    On any touch start

        Actor set position to touch.X, touch.Y

  • I did need the array to be 11 then, but fill it with something other than the numbers i needed, before refiling it with the randomNumbers , yes?

    Exactly :)

    Every value in array is 0 until you set it as something else, thus the randomizing part never randomed 0.

  • Here you go: Fixed version

    The array was initialized with 0's so it never gets randomed and random nubmer choosing stage. I initialize the array with -1 so it's a bit more intuitive to use now :)

  • Well width of your array is only 10, no way you can fit 11 numbers into that :)

    EDIT: So set your array width to 11, adjust the limit of numbers accordingly and do the change I described before.

  • Change "while i <= Array.width"

    to "while i < Array.Width"

  • Posting a .capx is usually a good idea, but just going by your description I'd guess you need to add events like:

    Ball 'on collision with' ball

         Bounce to opposite directions

  • Posting a capx would be useful, it's really hard to see what you are doing with just written descriptions.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I ran into same problem with 'on created' not triggering on any container objects. Here is an example capx: On created problem

    It's easy to observe if you switch the action inside 'on created' event to buttons 'on clicked' event.

  • Not 100% sure but I think creating the water with chess plugin does not pick the created instance, unlike creating it with one of the build in functions would.

    Solution would be to add event:

    Water On Created

         Set drop to floor(random(0..3))

    You got fun start for a game there by the way :)

  • There are some plugin dependencies in the capx so posting screenshot of the troublesome events might be a good idea as well :)

vee41's avatar

vee41

Member since 12 Apr, 2012

None one is following vee41 yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

14/44
How to earn trophies