My "Other" upcoming game is maze 100. A top view world with 100 levels (puzzle game). Anyway this game will have a move crate system but my code for it isn't perfect but it is nearly done. Anyway download this stand-alone version of a level from maze 100 and tell me if you know a way of how to do an engine or if you can help me. I will send the open source if someone can really help me.
www.klikacademy.com/spiderhead/Maze.zip
He's saying where you put the block you can only push it twice before it gets stuck because the room it is in is so small and I dont udnerstand what you want, the engine seems fine to me except for a bug where you can go under the box.
DaVince This fool just HAD to have a custom rating
Registered 04/09/2004
Points 7998
4th December, 2004 at 14:06:27 -
create border sprites near every wall. Then add this event:
Character overlaps crate
+ Border sprite overlaps crate
- Set the character's position back.
You may find another way instead of using some active objects called border sprite, but that depends on how your movement is used.
You could maybe let the crate overlap the wall a little bit and replace (Border sprite overlaps crate) by (crate overlaps backdrop).
all you need to do is duplicate and modify the collision events you already have for backdrop objects, except replace say... Left Detector overlaps background to left detector overlaps crate.
that will make it so the player cant ever overlap with the crate.
from playing that example i guess the only reason the player cant overlap the crate when moving is because it moves at the same time and speed, unless its up against a wall. so just fix it.
DaVince This fool just HAD to have a custom rating
Registered 04/09/2004
Points 7998
10th December, 2004 at 13:49:39 -
Try this: when left detector overlaps the crate, open a group called "push to right". In this group you will make the character go back right again.
Old member (~2004-2007).
DaVince This fool just HAD to have a custom rating
Registered 04/09/2004
Points 7998
11th December, 2004 at 06:56:20 -
Hey, I found a solution, I think!
Try this:
When character overlaps crate + direction is left == Set Alterable Value/counter to 1.
When character overlaps crate + direction is right == Set Alterable Value/counter to 2.
When character overlaps crate + direction is up == Set Alterable Value/counter to 3
When character overlaps crate + direction is down == Set Alterable Value/counter to 4.
Then do this:
When Alterable Value is 1 == push character right N pixels + set Value/counter to 0.
2 = push left N pixels
3 = push down N pixels
4 = push up N pixels.