lareviera's Recent Forum Activity

  • > > ProUI is up again for whoever wants to purchase it.

    >

    >

    > awsome thanks !

    >

    > Quick question, is it possible to set the gridview data to an array, instead of a json.data file?

    Do you mean the Construct array object ?

    GridView only accepts a JSON array of objects, as data. So you need to convert your array to a JSON array of objects.

    for example :

    [1,2,3] should be [{"key":1},{"key":2},{"key":3}]

    yeah the array object.

    ah ok i see , convert manually you mean xD, thats a bummer hehe ,i just wanted to make a inventory like grid with no information and copy pasting [{},{},{}] a hundred times was a bit weird, is there another to do it?

    still a great addon.

  • ProUI is up again for whoever wants to purchase it.

    awsome thanks !

    Quick question, is it possible to set the gridview data to an array, instead of a json.data file?

  • when will this be available again?

    this will be a god send, i switched to construct 3 lately and i was using a bunch of plugins that i had to scrapp (gridcontrol, rexboundaries , etc) and had to remake my ui with the available plugins, was...not...easy... this will be great.

  • Not sure what you mean on the first bit, but on the big number do you mean it's decimal places? You can use round(random(x,y)) to make it a whole number.

    oh just meant this.

    round, worked flawlessly!, thanks again.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh I thought you meant an error in the editor. An assert I dunno, are the values in the array definitely numbers? Try int() around the calculation to convert it if it produces a number as a string.

    awsome dude ! yes that worked, your an angel!

    weird, it worked with just one int for the first array call, i put the second one to see what happens.

    the first part was seen has a string and the second part a number?

    now its giving me a preety big numbers, gonna see if i can convert it to a float or something, but its not very important, dont think i intend to show the numbers to the player.

  • oh i forgot to change that in the screenshot,but yeah with the diferent cell it still crashes

    Is there something wrong with the expression?

  • so i have a weapons spreadsheet(array) that has two numbers for attack damage: min attack damage, and max attack demage.

    im trying to get a random number between the two , but not succeeding.

    i tried whats bellow but it gives me an error.

    any ideas ?

  • update to anyone who might be having the same question

    it WAS working with the original expression subtract from:arr_weapons.At(weapon,1)

    however it was giving the NaN error because firstly on one csv spreadsheet i had no values in the cell\array, and on the second try...wait for it... i put O instead of 0 xD ( thats O"letter" instead of zero xD "facepalm"

  • yeah its workin , but another question arises, how do i add or subtract from the array.

    i tried just subtracting from the column and but it gives a NaN error, wich i read has to do with adding or subtracting strings from numbers and i have to convert the string to int. i tried whats below but, its not working. where am i going wrong

    thanks for the help , im a total noob when it comes to coding.

  • oh wait i figured it out why it wasnt working with the fx animation...because in the spredsheet the fx ID didnt match ? i think that was it

  • The other data is at a different Y. So using what you have now, array.at(weapon,0) is the weapon name. array.at(weapon,1) is the next column of data.

    thanks for the fast reply,

    i did try that with the fx, i put diferent animations into fx and also named them ID_"number"

    so as i changed the weapon variable number , the fx number also changed.

    so the expression was :

    -fx2 set animation to "ID_"&arr_weapons.At(weapon,1)

    but it didnt work :/

  • so the problem is, im trying to use a csv spreadsheet thats is a weapon database, with information like weapon name, attack dmg, element type, and fx that go with it.

    i need a way that on weapon selected, i can get the current equiped weapons´s other stats, like attack dmg and fx etc. and use it somewhere else with just one expression.

    below is where i cant get at.

    right now i can select the weapon name at x with a variable.

    and even change the fx with the same variable(although im using an object, so its easy), but how do i go about getting the weapons attack and other stats?

    for ex:

    weapon» on collision with enemy» subtract current weapon.array.at( something, something)...

    is this right ?

lareviera's avatar

lareviera

Member since 29 Jun, 2013

None one is following lareviera yet!

Trophy Case

  • 11-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

14/44
How to earn trophies