Mario Style Worldmap

Get help using Construct 2

Post » Sun May 06, 2012 9:26 pm

Hi I was wondering how to create a mario style worldmap where you can move around and play levels that you've unlocked. And once you're at a specific level mark, be able to warp to the level to begin play.

Examples:




Thanks for the help :)
Image
B
57
S
14
G
6
Posts: 493
Reputation: 11,253

Post » Sun May 06, 2012 9:39 pm

Activate grid snapping on C2
On some points place a sprite you can name "node"
create 4 boolean insance variable named 'E' 'S' 'W' 'N' (for East, South, West and North)
For each node you have to manually set the following:
if you can go right set E to true, else false
if you can go down set S to true, else false
if you can go left set W to true, else false
if you can go up set N to true, else false
Then each time your player character is on a node, and you push an arrow key, check if the node allows you to go that way, if yes, start moving the character and disable control until it reaches the next node.
(setting things with the snap feature enabled help to have things properly aligned)

Now for levels, you can add a second instance variable named 'level' which can old text. You set it for each node to nothing if shouldn't lead to a level, else you set it to the layout name holding your level.
And then if the player character is on a node (not moving) and the player hit the "enter the level" control, AND node.level is not equal to nothing, then go to layout (by name) node.levelYann2012-05-06 21:40:08
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Mon May 07, 2012 12:31 am

Thank you so much for the help. I will post again if I am having trouble.
Image
B
57
S
14
G
6
Posts: 493
Reputation: 11,253

Post » Mon May 07, 2012 1:37 am

I cannot seem to be able to find a way for the world map character to actually be moved without direct input. but it's also not giving me the exact result that i want (the way I'm doing it).

and once the character sprite overlaps a node, how do i stop the movement?
Image
B
57
S
14
G
6
Posts: 493
Reputation: 11,253

Post » Mon May 07, 2012 11:48 am

"be moved without direct input"... well... In mario you have to press a button (direct input) to make mario move...

To make him stop: if he overlap the node and he is moving -> stop him

Once you have something on c2 you can share the capx too. It would probably be easier to pinpoint your potential mistakes.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Tue May 21, 2013 11:10 pm

Oh I need this. I am excited to try and implement this technique tomorrow. Yann!
B
32
S
9
G
3
Posts: 275
Reputation: 8,063


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 19 guests