I've been messing around with the pinball movement for pushing a block, it didn't work out. So then I tried using a secondary PMO and I've almost got it working how I want, but... I've just realised that it only works for the first block I placed into the frame. Any others (they are the same object) just don't react to being pushed around. I'm guessing the PMO will only control the first instance of an object you place into the level then?
Any other ideas I could use for block pushing? Thanks!
Ah you've come across the dreaded MMF2 Object selection.
Welcome to the forums!
Well the easiest way I can think of is if
Player is touching block
Players X position is less than the position of the block
Players Y position is less than the players position being on top of the block
Player is holding Right
-Set blocks position it's position + whateva
And the opposite for the Left side.
If that doesn't work, you can try going back to another method, but with the PMO you might need some object selection code, otherwise it will only pick the first one (since while you think it might be specific enough, consider MMF2 to be a simpleton that doesn't understand simple orders, you need to be more specific)
Did you ever get your animations to work properly? You should totally create a project page for this. Not that anyone even looks at them anymore, but it does help keep you focused.
Personally, I'm not a fan of the PMO extension - I don't think it really does anything that you couldn't code yourself quite easily.
As for the blocks, it depends on what you need exactly. If you want multiple blocks that can be stacked on top of one another etc, then things start to get *very* complicated. You may even need to use one of the physics extensions (eg. Box2d). If movement is grid-based, that makes things much easier (block-pushing games usually are grid-based) - a very simple custom movement would suffice.
Block Stack Platformer Example - Nostalgia
Author: Frateroshi Nitorachi
Genre: Example
Extensions Needed: Platform Movement Object (PMO)
Description:
A really great example. Maybe this example could be your next block game engine. From an old cca file with an unknown date.
Instructions:
On screen.
@Chloe I did get those animations sorted! Thanks! After looking at your method I'd say it is better than what I had down, although I've just added "particular animation is not playing" a few times on other events. It's a bit messy this way but I've already got a big messy list of events. I'll come back to that thread next time I'm making a PMO game from scratch! As for this thread, I'll give your example a try!
@Sketchy I'm not really going for anything too complex with the block pushing. Just left and right movement, preferably with gravity.
@Nivram Thanks for linking that, I've just downloaded it and will take a look when I get on Windows later on!