Movement sprite array values. How?

0 favourites
  • 10 posts
From the Asset Store
Supports 1D, 2D, 3D arrays. Import and export arrays in JSON format
  • 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:

    How is it implemented?

  • Bump

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • More information can be?

  • So many questions. Including your .capx would probably help!

  • an example of what I want to create

  • What would it do if there were two paths it could take?

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

  • 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

  • good question. But in my game these situations will not

  • 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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)