weisdaclick's Recent Forum Activity

  • Thanks for that, if I would have known this before I could have saved a ton of time.

  • Hi, I have created my project and have exported it with the Cocoon JS option, (I have previously added the Cocoon object to my project).

    I have installed the Cocoon JS app to my iPad and followed the steps detailed here:

    wiki.ludei.com/cocoonjs:launcherapp

    I have copied the zip file to my iPad via iTunes but when I open it with the app launcher the buttons are missing.

    My project has a start screen with 3 buttons to set the level and they are not there which means I can test no further.

    The buttons are regular Construct2 items, nothing special about them - placed on a layer above the background layer and referenced in the event sheet. They work fine on my PC but here they don't show.

    Is this a bug or am I doing something wrong? Can anyone suggest a workaround?

  • I got it working now.

    I don't know when you push/pop values to the array if it expands the size of the array but on the previous event sheet I added this line:

    System On end of layout      myArray Set size to (5,1,1)

    After I did that it works perfectly.

    Thanks for all the help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the responses so far.

    Here is a screenshot, there really is nothing else. You can see another way I have tried it with a local variable.

    I have removed the / 5 to test and the results are not correct and I can't work out why. The black image is the test result with TextTest at the top with TextTest1 next and so on. At the bottom is TextAv but the added value is never quite right which has me stumped. You can see here it is out by one.

    I have read everything I can online about arrays and can�t find an answer.

    [/IMG]

  • 100% sure the divide is not working, I am only using very simple numbers right now. This makes me think I can't do it like this for some reason.

    To test I changed the divide and tried adding another number or multiplying - nothing works, only the first part of the statement (adding the values in the array).

    I tried:

    MYArray.At(0) + MYArray.At(1) + MYArray.At(2) + MYArray.At(3) + MYArray.At(4) /5

    (MYArray.At(0) + MYArray.At(1) + MYArray.At(2) + MYArray.At(3) + MYArray.At(4)) /5

    (MYArray.At(0) + MYArray.At(1) + MYArray.At(2) + MYArray.At(3) + MYArray.At(4) /5)

    (MYArray.At(0) + MYArray.At(1) + MYArray.At(2) + MYArray.At(3) + MYArray.At(4) /5)

    (MYArray.At(0) + MYArray.At(1) + MYArray.At(2) + MYArray.At(3) + MYArray.At(4) /(5))

    MYArray.At(0) + MYArray.At(1) + MYArray.At(2) + MYArray.At(3) + MYArray.At(4) / MYArray.Width

    Stuck.

  • This is driving me crazy, I have been looking around trying to solve it with no joy.

    I am trying to get the average of five values. I created an array then added the values and divided by 5:

    System/Every Tick - System Set MyVar to MYArray.At(0) + MYArray.At(1) + MYArray.At(2) + MYArray.At(3) + MYArray.At(4) /5

    System/Every Tick - TextAv/Set text to MyVar

    All works perfectly apart from the divide by five part, the five values are just added together. I have tried every combination of brackets but nothing works - what am I doing wrong???

weisdaclick's avatar

weisdaclick

Member since 10 Apr, 2013

None one is following weisdaclick yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies