Movement sprite array values. How?

Get help using Construct 2

Post » Sat Jan 10, 2015 11:27 pm

I have an array filled with the values and the need that the object (sprite) moved based on the values of the cells of the array like this:
Image

How is it implemented?
B
17
S
3
G
1
Posts: 9
Reputation: 2,973

Post » Sun Jan 11, 2015 3:03 am

Bump
B
8
S
1
G
1
Posts: 96
Reputation: 632

Post » Sun Jan 11, 2015 6:30 am

More information can be?
B
17
S
3
G
1
Posts: 9
Reputation: 2,973

Post » Sun Jan 11, 2015 9:45 am

So many questions. Including your .capx would probably help!
B
11
S
4
Posts: 152
Reputation: 1,236

Post » Sun Jan 11, 2015 10:01 am

an example of what I want to create
Image
B
17
S
3
G
1
Posts: 9
Reputation: 2,973

Post » Sun Jan 11, 2015 12:09 pm

What would it do if there were two paths it could take?
B
11
S
4
Posts: 152
Reputation: 1,236

Post » Sun Jan 11, 2015 12:28 pm

do not need a path. you need to read the data cell array and on the basis of these data, move the sprite
B
17
S
3
G
1
Posts: 9
Reputation: 2,973

Post » Sun Jan 11, 2015 4:09 pm

haer wrote:do not need a path. you need to read the data cell array and on the basis of these data, move the sprite

word "path" means where sprite goes
example
where would sprite go in this picture case
You do not have the required permissions to view the files attached to this post.
B
11
S
4
Posts: 152
Reputation: 1,236

Post » Sun Jan 11, 2015 5:28 pm

good question. But in my game these situations will not :)
B
17
S
3
G
1
Posts: 9
Reputation: 2,973

Post » Sun Jan 11, 2015 6:15 pm

Global a=0;
Global b=0;
Global NextBlock=1;

on hit | System -> Set a= (array X of block hit)
-------------System -> Set b= (array Y of block hit)

System -> NextBlock = 1 | System -> NextBlock = 0
------------------------------------Array.setAtXY(a,b) to "0"
(subevent) Inventory Value at (a,b-1) = "C" | System -> set NextBlock to 1
-----------------------------------------------------------| System -> set b to b-1
(subevent) Inventory Value at (a+1,b) = "C" | System -> set NextBlock to 1
-----------------------------------------------------------| System -> set a to a+1
(subevent) Inventory Value at (a,b+1) = "C" | System -> set NextBlock to 1
-----------------------------------------------------------| System -> set b to b+1
(subevent) Inventory Value at (a-1,b) = "C" | System -> set NextBlock to 1
-----------------------------------------------------------| System -> set a to b-1
B
11
S
4
Posts: 152
Reputation: 1,236


Return to How do I....?

Who is online

Users browsing this forum: jaytrott86 and 8 guests