Making a cool map screen Part 1
Author: | Phredreeke
|
Submitted: | 25th April, 2005
|
Views: | 5512
| Rated: |
|
|
This tutorial will focus on making a mouse based map screen.
First of all, I expect you to have a map. Place it as a background. Make some active objects to mark levels on it. All should be in one qualifier, I'm using Group.0 as an example. Create a string object, and make a paragraph for each level name. But keep the first one blank.
At the start of the level, set the alternable value A of each level mark object to the same value as the paragraph holding that level name. Now, we'll add so when the player holds the mouse over a level marker, the text changes to the level name.
Add the condition mouse pointer is over Group.0
and the action on the string object, set alterable string to: paragraph$( "String", Alterable Value A( "Group.0" ) )
Now start it up, move the mouse over a level mark and the text should change... But when you move the mouse away from it, the text is still there. To fix that, we need to conditions.
First set a negative mouse pointer is over Group.0 then also add a second condition, compare the number of objects to be equal to NObjects( "Group.0" )
As before, add an action to the string object, but this time, set alterable string to ""
The reason for the second condition, is if you only check for negative mouse pointer overlapping, it will register if any of the level marks aren't overlapped. However, if you add the compare no of objects condition, it will only run if none of them are overlapped. The reason for using NObjects( "Group.0" ) instead of the actual number, is that you might want to remove unavailable level markers.
Now, you have a map screen with level names. There are several ways to spruce it up. But I'll leave that for my next tutorial.
|
|
PhredreekeDon't listen to this idiot Registered 03/08/2002
Points 4504
|