Drag Object & Save Position

creativeappscreativeapps Member Posts: 1,770
edited November -1 in Working with GS (Mac)
I have 5 different objects which user can drag on the screen.
I have few questions in my mind.

1) When I use reset attributes I do not want to reset those 5 objects which user allready drag. How to do that?

2) Total 5 same Objects used in 40 levels. I want to save those object positions once user compelte the level. How to do that? I have to use simple 5 save attributes for that? or 40x5=200 going to use 200 attributes for all 40 levels? Please explain

Comments

  • WeswogWeswog Member Posts: 1,171
    1) You can change all the attributes to 0 except for the dragged objects positions

    2) So do this
    Attribute game.level over is true
    Save Attribute postiton of block 1x and block 1y and so on

    You will need to save the X and Y for each of the blocks so u will need 10 attributes total

    Cheers, Weswog
  • creativeappscreativeapps Member Posts: 1,770
    10 attributes to save 5 objects position for all 40 levels? Please let me know thanks
  • WeswogWeswog Member Posts: 1,171
    Yes :)

    Cheers, Weswog
  • creativeappscreativeapps Member Posts: 1,770
    ok Thanks
  • bluebyu25bluebyu25 Member Posts: 500
    If touch is inside:

    Constrain Attribute self pos x/y to device.touches.count.touch1.x/y

    Thats all you need.
  • FF1FF1FF1FF1 Member Posts: 75
    Not sure if this will help, but what Iim doing for my game is -

    Making the drag-able actor have the same force up as gravity. (using accelerate)
    Making a simple reset scene just the scene (not the draga-able)

    That way the drag-able actors will stay where they are.

    This should save many attributes and load time I guess ? :)
Sign In or Register to comment.