Drop slots for my jewel game

Hey

I'm able to move my jewels around freely before dropping them, but this means that they can drop anywhere and stack up in a weird way (some will stop as soon as they collide with the corner of another jewel...So i need them to move left and right from slot to slot (invisible slots of course)

I hope I'm making sense

Thanks in advance, much appreciated

Comments

  • Nocturne31Nocturne31 Member Posts: 23

    Anyone?

  • SummationSummation Member, PRO Posts: 476

    @Nocturne31 said:
    Hey

    I'm able to move my jewels around freely before dropping them, but this means that they can drop anywhere and stack up in a weird way (some will stop as soon as they collide with the corner of another jewel...So i need them to move left and right from slot to slot (invisible slots of course)

    I hope I'm making sense

    Thanks in advance, much appreciated

    I'm not sure but it sounds like you want to have the jewels in a grid with very specific movement rules so that the jewels only end up going in the squares they're supposed to.

  • Nocturne31Nocturne31 Member Posts: 23
    edited May 2015

    @Summation said:
    I'm not sure but it sounds like you want to have the jewels in a grid with very specific movement rules so that the jewels only end up going in the squares they're supposed to.

    Exactly! Invisible grids though

  • SummationSummation Member, PRO Posts: 476

    @Nocturne31 said:
    Exactly! Invisible grids though

    You could make a table that would function as a grid with X and Y coordinates and link your jewels to table cell values.
    This way they would act like they're in an invisible grid.

  • Nocturne31Nocturne31 Member Posts: 23

    Thank you, that makes sense. I have been trying to do that actually, just can't seem to get the coding right for some reason

  • SummationSummation Member, PRO Posts: 476

    @Nocturne31 said:
    Thank you, that makes sense. I have been trying to do that actually, just can't seem to get the coding right for some reason

    What do you have so far?

  • Nocturne31Nocturne31 Member Posts: 23
    edited May 2015

    I have

    Table : 1 Row 5 Columns

    Self Attributes: Row Real, Number Real

    Rule

    Touch PRessed

    Change Attribute : Self.number to TabeCellValue(Game.Table2,1,Self.Column)

    Rule

    If Self.Number =1,

    Do

    Change Attribute: Self.Position.x to 57

    57 is the position of my first column

    I have another rule initially to move the Jewels freely within the scene, if that helps

Sign In or Register to comment.