Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?
Well, at any given time the mouse is at exactly one point on the screen. To record speed or angle, you have to record the movement between two frames. You'll need 4 alterable variables for this: oldX, oldY, currentX, currentY
To calculate the speed, just calculate the distance between old and current. Distance/time should give you the speed; Remember, the time would be one frame, so 1/50 (if your framerate is 50).
To calculate the angle, I believe you'll need to construct the three lines A, B, and C: A is oldX,oldY to oldX,currentY; B is oldX,currentY to currentX,currentY; C is oldX,oldY to currentX, currentY. You should be able to find the angle of movement (which would be along line C) by calculating the cosine of (line A)/(line C).
Is this really an example for angle or does it use directions?
It seems to be just as twitchy as my TGF1 directional version is, cept I did mine with extra actives instead of extra math.
Maybe it's twitchy because it's too accurate ... Is there a way to make its angle gradually change to that of the mouse's angle instead of instantaneously?
Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?
Originally Posted by MBK Is this really an example for angle or does it use directions?
It seems to be just as twitchy as my TGF1 directional version is, cept I did mine with extra actives instead of extra math.
Maybe it's twitchy because it's too accurate ... Is there a way to make its angle gradually change to that of the mouse's angle instead of instantaneously?
that one is angle, you could also make the object move towards (instead of instant) the mouse to make it less twitchy
Ok, thanks Solgryn.
I have much less time now than I previously did, so I'll have to give up on TGF1 for the time being and just learn to cope with the slight interface differences of MMF2 right now. Don't think this is me giving up though, I'll return to TGF1 after making something usable in MMF2. I'm going to work backwards from now on so maybe things will click quicker soon.
This is a good example and many others have shown me lots that can be easily done in MMF2 and not in TGF1.
So, as of this moment, I'm going to switch gears and use MMF2 first, and if I succeed with it, then I'll see if I can make the same thing in TGF1 to satisfy my stubborn obsession at a later time.
I bet you guys thought I'd never begin using MMF2 as my main program.
It seems like I'm one of the last ones if not the last who was using it as his main game creation device.
Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?
Originally Posted by MBK Ok, thanks Solgryn.
I have much less time now than I previously did, so I'll have to give up on TGF1 for the time being and just learn to cope with the slight interface differences of MMF2 right now. Don't think this is me giving up though, I'll return to TGF1 after making something usable in MMF2. I'm going to work backwards from now on so maybe things will click quicker soon.
This is a good example and many others have shown me lots that can be easily done in MMF2 and not in TGF1.
So, as of this moment, I'm going to switch gears and use MMF2 first, and if I succeed with it, then I'll see if I can make the same thing in TGF1 to satisfy my stubborn obsession at a later time.
I bet you guys thought I'd never begin using MMF2 as my main program.
It seems like I'm one of the last ones if not the last who was using it as his main game creation device.
OMG Finally =D! Well, it took me some time to switch but I'm glad I did.