How do I make a array with vectors?

Get help using Construct 2

Post » Wed Jun 01, 2016 10:52 am

A want store positions because i want get a random pos from a collections.
I why dont make an array with vectors?
B
14
S
2
Posts: 66
Reputation: 776

Post » Wed Jun 01, 2016 11:57 am

Dope vectors ?

Just store an index on the X axis. (index of random positions)
The X position on Y axis = 0
The Y position on Y axis = 1
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Wed Jun 01, 2016 2:04 pm

How to make a array that collected object positions?
B
14
S
2
Posts: 66
Reputation: 776

Post » Wed Jun 01, 2016 2:23 pm

If you need differend objects, then you best have accces to familys. Looping trough families is the same as looping truough instances ...

Condition:
Pick a group of objects.
Pick the array
Action
Array > set size > width = object.count - 1, Height = amount of variables you need to store
Z must be at least 1 .. Zero will make an unusable array

Condition:
System > For > name = "index", start = 0, end = object.count - 1 (because it is zero based)

Now the loopcounter is the expression loopindex("index"), we use that as IID of an object and as X index in the array.
You need Y indexes for the variables.
So
Sub condition
System > Pick nth instance > object = object, instance = loopindex("index")
Actions
Array > set at XY > X = loopindex("index") , Y =0, value = Object.X
Array > set at XY > X = loopindex("index") , Y =1, value = Object.Y
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Wed Jun 01, 2016 3:52 pm

I dont understand please keep it simple.
I only want a array not family with coordinates(x,y)
In unity a lot easier. Ááááá
B
14
S
2
Posts: 66
Reputation: 776

Post » Wed Jun 01, 2016 4:12 pm

Image
B
65
S
23
G
7
Posts: 1,505
Reputation: 10,896


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], Yahoo [Bot], yiuyiu6666 and 16 guests