Sorry if this has been requested before... I had a few search attempts before caving in and making this topic.
My problem is this:
------------------
I am making a game where the character can change clothing, armour, weapons etc, which will directly affect the way the character looks (IE. Diablo II style armour changes). I have created a "doll" character as one object, and the armour as a seperate object.
I have the objects linked so that-
*On Loop "clothes"
- Position X (clothes object) = Position X (player object)
- Position Y (clothes object) = Position Y (player object)
*Player is (NOT) moving
- Start loop "clothes" 1 times
No matter if its set to 1 times, or 1000000 times, the armour doesn't "follow" the character properly. It seems to have "lag" behind the movments and looks like the clothes are about to fall on the ground (not so bad in hind sight... the character is female lol).
There HAS to be a better way of doing this... I've seen people mention "oh you can fix that using a fastloop" but nobody ever acctually gives an example of the code needed.
Any help would be GREATLY apprectiated!
Oh and, I'm new here... but not new to making click games. I have geen messing around for the last 10 years with Clickteam software, but belive it or not this is the first time I have tried to create independantly animated linked objects. I have just gotten MMF2 and hope to become nicely intergrated into the Daily Click community. Eventually I will be able to contribute in some way and not be some annoying guy that asks too many questions.
Your best bet is creating a rectangular mask object with same dimensions as the character, then set this to use all movement, and then set the character to (0,0) relative to the mask, and the armor (0,0) relative to the mask (depending on where your hotspots are, of course)
If you use your own movement you can do something like when press arrow down 'doll' Y position + 4 px 'armor' Y position + 4 px or set always set Y position of 'armor' to Y position of 'doll' and set X position of 'armor' to X position of 'doll' and hot spot to be correct for a animation direction...
sorry for the double post... i cant find the "edit post" button :/
Mighty Joe - That fixed my problem! I can't belive I didn't think of it myself... so logical! thanks a million
Fanotherpg - I think that would work also (creating my own movement system) though it may get very complicated as there will be many "items" that will link to the player. I also plan on making this a MOO game so I'm not sure how much extra coding would be required per object to get the client/server to sync properly....
I'll mess around a bit more, but now I'm on the right track.
Just to let you know, the problem happens when movement is handled after the event that sets objects to each other - if you're using a default movement, then the second object will be moved before the first one has moved, creating the lag effect.
This was going to be got rid of in the latest build of MMF, but a problem with the fix messed it up even further instead - it's now said that it'll work in b243.
or you can just make the clothes object walk the same way you tell tthe player objet to.
IE: if theres an event saying that when you press left the palyer goes left +4 pixels every second, you should tell the clothes object to do the same, moving +4 pixels too, you dont even need to set the object to be always at 0,0. but its better if you do, just dont rely on it to make it follow the character.
Well, I'm thinking of using the method described by Klikmaster. I will be working on my own movment engine at this stage, as this is an isometric game and MMF2 doesn't have a good movment type for isometric.
Right now though I'm busy working on the graphics... the game engine will wait for the time being until I have some lush graphics to go with it. I will certainly have more questions later as I have already thought of an idea, which I have no idea of how to implement. Trying to get away from using the "basic" functions of klik games and into the more mathematical stuff is a little harder, but the games come out so much better!
The way that Klikmaster mentioned will work fine if you're using movement that's driven by events rather than a movement assigned to the object in the Frame editor. Now, thanks to b243, default movements work fine with it as well.
I am still suffering from this problem and I am using latest version of MMF2 and platform movement object. I've tried everything mentioned in this topic and nothing seems to work, help?
Well, I've now got my next problem... but I'll make a new thread about it.
@Evil-Ville-
Seeing as you are making a platform based game (and I am assuming the standard jump, duck, climb, etc animation sequences will be used) it will probably be easier for you to use the invisible mask method.
Create an object with the platform movement type and make it semi-transparent (100%). Then simply link your characters position to that of the mask object, as well as any weapons or armour etc. They will then follow each other perfectly.