Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

[GM7] World Map idea


BOB_ROX

Recommended Posts

Hello, I want to make a world map for my game. So once you go into story mode it takes you to the world map but it has only one level open which is the test/practise level. and not have all of them unlocked at the first time.

My problem is, Im drawing a picture for this world map and use it just as that. And that I dont know how to work it as I want it too. The idea I got in my head is the Sonic Advance 2 idea. If anyone of you havent played sonic advance 2 to know what Im talking about Ill explain it. Its basically you start off with 1 level, and when you pass that it goes to a cutscene and then on the world map it unlocks the second level and then so on.

I was wondering if anyone could help me with this. I know I need to make a room for this But I dont know where to go from there.

Link to comment
Share on other sites

So you have a room and a World map graphic.

Make a new global variable called "global.var_StoryProgress[0]". This is an array we can use to find out if each stage has been completed. When the game starts, set it out like this:

[B]global.[/B]var_StoryProgress[0] = 0;
[B]global.[/B]var_StoryProgress[[U]1[/U]] = 0;
[B]global.[/B]var_StoryProgress[[U]2[/U]] = 0;
// and so on until you have a variable for every stage

When each stage has been completed, you can set up a code like this in the results screen:

if( room == rmZone0_Act1 && [B]global.[/B]var_StoryProgress[0] == 0 )
    [B]global.[/B]var_StoryProgress[0] = 1;
if( room == rmZone1_Act1 && [B]global.[/B]var_StoryProgress[1] == 0 )
    [B]global.[/B]var_StoryProgress[1] = 1;
// and so on...

Now we have a method of checking what stages are locked and unlocked, we can move on.

You would probably need a cursor object (objWorld_Cursor) that the player can move around the map, using the directional keys to move the cursor around the map. Simple stuff.

Next, you'll want marker object (objWorld_Marker) that will show the player where each unlocked stage is and allow them to play it. Each marker instance in the room editor can have a Creation Code (Click "Objects" tab > Right-click + Ctrl on object > Creation Code) to give each instance a unique identifier and destroy itself if the player hasn't progressed far enough.

Example. The creation code for the first level objWorld_Marker could be:

var_MarkerId = 0;

And the creation code for the second level objWorld_Marker would be:

if( [B]global.[/B]var_StoryProgress[0] != 1 )instance_destroy();
var_MarkerId = 1;

With all the locked stage markers destroyed, you can use something like a collision or step event to check if the cursor object is touching a marker that is still there.

Thats just the rough outline for you to get you started. If I wanted to go into more detail this post would be too long for my liking. Hope it helps you out though.

Link to comment
Share on other sites

Id like to ask this question because I am unsure, Would the first 2 codes you said be for objWorldMarker or cursor?

if( global.var_StoryProgress[0] != 1 )instance_destroy();
var_MarkerId = 1;[/CODE]

for that code, if I keep using that one for each marker in the room?, and If I do Would I have to change the markerId = 2 for the third if I were to keep going for each level, Coz Im thinking would I have to add it by 1 each time?. Im just checking with you since you know more than I do probably. Because I think Im understanding, But cursor part Im not so if you the time explain a bit more on that please.

And I also dont have a results screen yet, Coz Im planning on making that like Sonic Rush's result screen, Use a animation image (Which Im drawing and still designing the base of) and using it in a different room and stuff so I aint got that in yet. But I dont wanna change the topic to a results screen help part. So Ill leave that results code for later.

Link to comment
Share on other sites

With the code you have there, that would be for the objWorld_Marker object.

And yes, you will need to change the MarkerId variable for each level marker. The great thing about creation code is that you do not need to set up multiple objects to do (pretty much) the same task.

With the cursor, I was thinking a map style like Sonic Unleashed would work well, where the player moves it around and when the cursor is over a destination you can select it (skip ahead to 0:36 of

for what I'm getting at).

As for the whole results screen thing, all you need to do is find an appropriate time to perform the code. It doesn't have to be the results screen, it could be the finishing line or something else.

I have to go now.

Link to comment
Share on other sites

Uh huh, I get what you are saying about the Cursor. But I dont know nothing on how to add it Sadly. And I was wondering now that you brought up that way of doing it. I'll try that way, But Id like to ask. If you know how to make it so it shows a mini message at the bottom of the screen on where to go next as Such?

E.g:

"Go to the Practise Stage to practise!" You know something like that?.

Also Im still drawing up the big Map as well. So Right now Im just getting the room set up for it.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...