How do I utilise a 3D Array in a Text Box

Get help using Construct 2

Post » Sun May 08, 2016 5:41 pm

Hi All,

I have setup a 3D array where the X dimension value defines the monster being killed and the Y dimension determines the quantity currently killed.

The quantity killed is held in a global variable.

I am trying to display the value of the array in my text box by using the following event:

Function - On "KillReport" - KillTextBox - Set text to KillMessages.At(0, GlobalVariable)

This always prints 0, regardless of what the value should state. I was wondering if I was doing something obviously wrong that anyone could correct me on.

Thanks,
DripFedFred
B
4
Posts: 8
Reputation: 216

Post » Sun May 08, 2016 7:36 pm

Mm, I can't see anything wrong with that. Are you able to post a capx?
Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 209
Reputation: 3,476

Post » Sun May 08, 2016 8:12 pm

Message: DripFedFred can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hi, sure I made a quick example capx

https://www.dropbox.com/s/
e4k5okfzjj3gt6b/3darrayexample.capx?dl=0

(0,0) works fine but as soon as I move to (1,0) or (0,1) the text entity just displays "0" regardless of what the value should be.

Thanks,

DripFedFred
B
4
Posts: 8
Reputation: 216

Post » Sun May 08, 2016 8:14 pm

Had to split the link into two lines as it kept shortening it because my reputation is too long >.< sorry about that.
B
4
Posts: 8
Reputation: 216

Post » Sun May 08, 2016 8:59 pm

The size of your array's Y axis was set to 1. :)
Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 209
Reputation: 3,476

Post » Mon May 09, 2016 12:26 am

haha wow, ok that's 3 forum questions and 3 ridiculously embarrassing answers!

I need to start paying more attention before running to the forum :p

Thank you very much!

DripFedFred
B
4
Posts: 8
Reputation: 216

Post » Mon May 09, 2016 9:31 am

Don't worry about it! We've all been there. :)
Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 209
Reputation: 3,476

Post » Mon May 09, 2016 11:04 am

I done it it so many times and I thought I was expert. So don't worry
B
255
S
39
G
15
Posts: 1,982
Reputation: 41,005


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests