Zeb's on the second CD of MMF2 as well. Its basic idea is to use a pair of invisible active objects to set boundaries for enemies, and have them move left/right on their own until they reach one of those.




Zeb's on the second CD of MMF2 as well. Its basic idea is to use a pair of invisible active objects to set boundaries for enemies, and have them move left/right on their own until they reach one of those.
Oh I see...I was wondering what that second CD was for and forgot all about it :P
edit: Hmm, odd...I put the second CD in my drive but cannot access it; the CD does not appear in the My Computer folder. :confused:





Ahh, I remember Zeb. Cool example of a static platform movement without any fastloops or anything.
Your enemy's speed can be stored inside an alterable valueLets say you name its internal value A "speed", you could add or subtract "speed" to it's X co-ordinate (or, in a better method, have a fastloop which adds or subtracts 1 to the X co-ordinate "speed" number of times), or just change the value to add to 2, 3, etc, whatever speed you want. It's not timer based, it's based on every MMF loop, and you use either fastloops or a higher number for higher speed.
The difference being that adding 2 or more to the X co-ordinate can cause it to be overlapping a backdrop if it goes past the edge in one movement, while that can be avoided if using a fastloop... I can do an example for you at the weekend if this is too complicated.
By the way, good on yer for using the Platform Movement Object, I imagine it'll be perfect for Kirby. It'll be very easy to do his flying/floating double jump thingy through it.
I tried your suggestion, but the enemy still moves too fast even with just adding 1 to the X coordinate speed. I did it so that the event always adds 1 to the X coordinate, but the character is zooming way too fast! Also, the character won't go up and down uneven ground; it only moves straight left and right. I guess this will require some more complex programming in the Y coordinate.





So rather than always adding 1, try every 10 milliseconds add 1, or every 20 milliseconds, etc etc, until you have the desired speed.
For getting enemies moving up and down slopes usually you want to use the collision mask, which is kinda advanced, yeah...
I'm not going to patronise you, though, I'll try my best to explain it. If the enemy is overlapping a backdrop, subtract 1 from it's Y co-ordinate, that pushes it out of the ground if it goes into the ground, you might want to subtract more than 1, though unless done through fastloops (slightly advanced, but you'll get there soon enough) it can be slightly jumpy.
Then you need it to fall back down again if it's above the ground, but the problem here is if we just use an "isn't overlapping backdrop" it'll end up shuddering up and down as it overlaps, gets pushed out, overlaps, etc. So we need to use the collision mask, which is inside the playfield object (looks like a chess board and piece in the event editor), use "Collision Mask: Is obstacle?", and use X co-ordinate of enemy, Y co-ordinate of BOTTOM EDGE of enemy + 1. Then negate this so you get the big red X next to it so it's checking if it ISN'T an obstacle. Then, for the action, add 1 to it's Y co-ordinate.
It's not perfect - you'd need to use fastloops for both the falling and pushing out of the ground if you have enemies which are to fall off platforms etc but this should suffice for simple enemies which are always on the ground.
Has anyone programmed a platform character to both move/walk and turn and move/walk? In other words, if dir=left and user presses left then walk left; if dir=left and user presses right then turn and walk right.Originally Posted by HolyMonkey




you just want to make a character play a turn animation before walking in the new direction that the player holds? that should be very easy.
the logic would be something like:
if player holds right, but character faces left>>play turn animation
if turn animation is finished>> set direction to dir+16
if player holds left and character faces left as well, walk and play the walk animation.
I hope that makes sense.





Yeah you just check the current direction before changing it, and then play the animation. Providing you're using either a static engine or advanced platform movement object, you'll have that perfect.
I've a little problem too... :grin:
I'm using the pmo and everthing is working fine, just two things.
I've a seperate character for the animations, that follows the pmo object.
The running and stopped animations work fine, but the jump and falling animations only display the first frame (of 30)?
Has anyone an idea, what this could be???