Save position of several instances of the same obj
Hi everyone, I'm new to this forum, nice to meet you all.
I'm making a game in which you break bricks with a horizontally moveable bat and a bouncing ball, and I want to have a level editor. Problem is, I want to be able to save the position of the bricks but I can only save the position of one instance of one kind of brick. That means I can save the position of the first brick of a kind, but not any additional bricks. Feels like there should be an easy solution to this?
Re: Save position of several instances of the same obj
Are you using the built in save frame position under the storyboard object?
I thought I just did some testing and it saved the info for all the instances of an object.
Re: Save position of several instances of the same obj
I'm a bit nooby, so... where do I find the "save frame position" option?:D
Re: Save position of several instances of the same obj
Re: Save position of several instances of the same
uhm, no... maybe I'm using an older version?
EDIT: No, I see now that I have the latest version... but still I can't find that option?
Re: Save position of several instances of the same
In the actions - Under the storyboard object then Frame Position
Just remember do not jump frames until the frame has been saved is triggered.
Re: Save position of several instances of the same
Chess piece -> Frame Position -> Save Frame Position
Re: Save position of several instances of the same
Ok, this is very strange, I do not have "Frame Position" under the storyboard object...
Re: Save position of several instances of the same
Are you looking in conditions? Make sure you are looking in actions...
Storyboard Controls -> Frame Position -> Save Frame Position
Are you using the demo or something? That should work :confused:
Re: Save position of several instances of the same
Are you using MMF2?
And you can solve your problem with a different approach.
Assign all your bricks a qualifier and then when you want to save them, spread value 0 in the qualifier and start a loop the number of times. Then compare the spreaded value to the loop index and apply actions. Something like this:
+ On save
- Spread value 0 in ID of 'bricks'
+ On save
- Start loop 'save' number of 'bricks' times
+ OnLoop("save")
+ ID of 'bricks' = Loopindex("save")
- save position in ini file/array/whatever
Make sure that you dont start the loop and spread the values on the same event or it wont work properly.
Just do what i did above and put them in their own event each (even though they are the same)