If I have a game, and I have a button that can create an object, how can I go through all iterations that were created and return their xy coords?
If I have a game, and I have a button that can create an object, how can I go through all iterations that were created and return their xy coords?
If the objects are being created one at a time, you could add 1 to a global value each time you create an object, then set one of the objects alterable values to that global value.
Each object then would have a different value, and you could just reference that.
i almost get what you are saying. How would you do that in the example i've attached? I don't understand how i will know which particular object i am testing
Hi Rubes, here is an example of what I think you're looking for,..(I hope) Let me know. Look in the event editor for how this was set up.
http://www.mediafire.com/?budwm2c5wupb5e2
thanks for the example TheSmanman, that is what i'm trying to do. I think you are doing what Pineapple suggested. Is there anywhere I can read up on the Global Value. I read Popcorn's Intro to Values, but didn't see Global Value discussed. Otherwise, i'll just poke around and hope i figure it out. This gets me on the right track, though
I'm glad that helped you out and I did it right for you.
Global values, Here you can read up on Values. Excellent tutorial:
http://www.clickteam.com/website/usa/img/uploads/tutorials/download/Values.pdf
To find the global value I setup for the example I sent you,.read on.....
Very simple,.When you bring up the project (the one I sent you or any) in MMF,.you'll see a "workspace Toolbar" on the left. Click on the project the first in the window,.not the frame,.but the one above it. You can name global value/values anything you want,.in my case/your case,.since you had the object in the frame just with it's default name (Active),.I just named the global value to,."Active Global Value" This value can be carried over from frame to frame and it will be available throughout your game or project. Look at the picture to find out where you set these up.
http://www.mediafire.com/?npx3mh0m8tdp4pq
Here's another good one to view. When you get to the page,.right under the video window it says Download WMV. Click on that and it will open in Windows Media Player. For some reason when you click on the video itself it doesn't work.
http://www.atomicpages.net/blog/2010...global-values/
Currently I'm a weekend MMF'er, and while I can get your example to work, and even add other objects and track, when I try to do this from scratch and recreate your logic, I am having difficulty. I'm going to play around some more, but might need a helpful hand if i cant get it to work. If I'm struggling, I'll post my example and hopefully we can figure out why it isn't working as it should...
Sure post you example and I'll see what we need to do. Just let me know exactly what you want done in the example.