Arrays and Object Angles

Get help using Construct 2

Post » Tue Jul 10, 2012 9:48 pm

Thank you for taking the time to read my question

I am new to arrays so forgive me for my ignorance. I would like to set an objects angle based on the value taken from a specific index in my array.

When looking at the choices for using the array these are the options that stick out to me as recalling values from and index but I don't know which one to use:

.At()
.CurValue()
.IndexOf()

Is one of these options the one to use? And if so whats the proper way to have the system retrieve the value from the specific index of (1, 1) and apply that to the Set Object Angle?

Thank you again and any help is greatly appreciated
B
5
Posts: 16
Reputation: 609

Post » Tue Jul 10, 2012 10:07 pm

From the manual:
http://www.scirra.com/manual/108/array
Use the .At() expression to retrieve values.

So you would use this expression in the set angle action:
Array.At(1,1)
B
79
S
24
G
52
Posts: 4,724
Reputation: 39,711

Post » Wed Jul 11, 2012 12:01 am

Oh....my.....GOD!

Thank you so much. I thought that this was the command I was looking for, but when I tried using it some strange things happened so I figured I better just ask. I guess there must be and issue somewhere else that is causing the conflict.

Thank you again for the quick response!
B
5
Posts: 16
Reputation: 609


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, anty21ro, badmoodtaylor and 17 guests