Ok, so I'm building a time travel game. That involves a lot of weird stuff I won't go into and get to the point.
http://pastebin.com/jXjbYUbn For some reason, this chain of objects, hits the wall, and then /all/ of them reverse rather than just the last one. It makes no sense. Any clue? Are my IDs messed up?I apologize for the small blog, but this is a make or break it kind of thing for the project. Without it, it will all break.
I don't really understand the code, but are you creating an instance for every future frame of the object?
I can't say for sure without seeing more of the code or having the source, but it looks like youre trying a relatively hacky way of figuring out where an object will be in X steps. Have you considered putting all the logic in a user event and looping through, running that event (or script) until you get to time == playertime? Might make things a lot simpler and more concise. It also means you can do all of this with one instance, nullifying this problem before it exists.
Pirate-Rob: Sorta.
Twister ghost: that is the source of every object in the room. It's actually a way of having time travel be possible. Basically, every frame of the game is kept so that objects can go back in time. (No, not rewinding. Time travel. Big difference)."Don't do that; assuming what someone will think and correcting them."
Well, literally everyone I've asked for help has gotten it confused. So… XDAnyway, what do you mean store it in an array? Do you mean store the past x/y values for each object in itself? That would work if I were rewinding the game or working with no collision events. (You can't simply rewind for time travel cause then the game would never move past the point something goes back in time) As far as I know, there is no way to do collision squares/circles without physically moving the objects. Hmmm :/I'll look into it. Let me know if either of you think of something! :)Every step: save_game under a different file name
Time travelling: load_gameYes, everyone will start screaming at you but hey, it worksFor the array method you don't need to store the x, y for every step.
I would use a method similar to sending updates in multiplayer games, only storing information when things change: an instance is created, changes speed, or direction.When I need to go back in time to pointA, all I need to do is find the most recent update before pointA then simulate the missing frames between the update and pointA.