how do i call all Y-axis values (array)

Get help using Construct 2

Post » Tue Oct 10, 2017 4:10 am

Greetings : as the title indicates

how to obtain all values from the Y-axis , writing only the first value and giving those values in variables for example I did this scheme:

:?:
Image
B
3
S
1
Posts: 2
Reputation: 279

Post » Tue Oct 10, 2017 5:12 pm

Hey @seinrre!

Normally you would go for something like this:

Code: Select all
On text changed txtBox
arrayName Contains value textBox.Text
    Repeat arrayName.Height
        arrayName.At(loopindex, 0) = textBox.Text
             V_Weight = arrayName.At(loopindex, 1)
             V_Cost = arrayName.At(loopindex, 2)
             V_Qualitty = arrayName.At(loopindex, 3)


Hope this helps. Cheers!
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
21
S
6
G
3
Posts: 660
Reputation: 3,847

Post » Wed Oct 11, 2017 12:30 am

brunopalermo wrote:Hey @seinrre!

Normally you would go for something like this:

Code: Select all
             V_Weight = arrayName.At(loopindex, 1)
             V_Cost = arrayName.At(loopindex, 2)
             V_Qualitty = arrayName.At(loopindex, 3)


Hope this helps. Cheers!



I had to change this part

Code: Select all
             V_Weight = arrayName.At(1, loopindex)
             V_Cost = arrayName.At(2, loopindex)
             V_Qualitty = arrayName.At(3, loopindex)


THANKS Bro :D :D :D
B
3
S
1
Posts: 2
Reputation: 279

Post » Wed Oct 11, 2017 10:54 am

My bad, I inverted X and Y. Glad to help.
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
21
S
6
G
3
Posts: 660
Reputation: 3,847


Return to How do I....?

Who is online

Users browsing this forum: dop2000, Seruza and 12 guests