I had the LAG problem in my game then I was helped by the awesome people on here... (prob Circy) and then BAMB!
I used the "Mask" object thingymajingy and it works like sex now. I love it. Woot!
"I have dreamed a dream... But now that dream is gone from me."
Originally Posted by Radix A cheap method is to have all your object parts have the same default movement, in addition to the always relocate event. They'll almost always stick together without lag if you do that. A similar principle can be applied to custom engines.
They way I do it in my games is not to relocate the objects to follow the leader; instead I give them relocation actions in the same event. It's important however that these actions come AFTER the main object. Example:
xinertia of MainObject > 0
--MainObject: set X position to X(MainObject) + (xinertia(MainObject)/4)
--ObjectPart1: set X position to X(MainObject)
--ObjectPart2: set X position to X(MainObject)
The following would be equivalent, but action order is irrelevant (though event order is not):
xinertia of MainObject > 0
--MainObject: set X position to X(MainObject) + (xinertia(MainObject)/4)
--ObjectPart1: set X position to X(ObjectPart1) + (xinertia(MainObject)/4)
--ObjectPart2: set X position to X(ObjectPart2) + (xinertia(MainObject)/4)
That's probably an excessive example, but how you need to do it depends on your engine.
Ah! That's pretty sound, in essence you're just moving everything all at once instead of forcing the bit parts to always follow your mask around.
Thanks Radix, and good to see you back!
--
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!