Print Page | Close Window

Change map name location

Printed From: Mirage Source
Category: Tutorials
Forum Name: Approved Tutorials
Forum Discription: All tutorials shown to actually work with MSE are moved here.
URL: http://ms.shannaracorp.com/backup-forums/forum_posts.asp?TID=53
Printed Date: 20 December 2006 at 6:01pm
Software Version: Web Wiz Forums 8.01 - http://www.webwizforums.com


Topic: Change map name location
Posted By: Sync
Subject: Change map name location
Date Posted: 07 February 2006 at 6:32pm
Originally posted by DerNalia

Changing the Map Name Location from the Top of your map (sometimes hard to read) to the title bar of your game.

DIFFICULTY: = -3.14159 / 5

First find in Sub GameLoop in ModGameLogic:


             ' Draw map name
             If Map(GetPlayerMap(MyIndex)).Moral = MAP_MORAL_NONE Then
                 Call DrawText(TexthDC, Int((20.5) * PIC_X / 2) - (Int(Len(Trim(Map(GetPlayerMap(MyIndex)).Name)) / 2) * 8) + sx, 2 + sx, Trim(Map(GetPlayerMap(MyIndex)).Name), QBColor(BrightRed))
             ElseIf Map(GetPlayerMap(MyIndex)).Moral = MAP_MORAL_SAFE Then
                 Call DrawText(TexthDC, Int((20.5) * PIC_X / 2) - (Int(Len(Trim(Map(GetPlayerMap(MyIndex)).Name)) / 2) * 8) + sx, 2 + sx, Trim(Map(GetPlayerMap(MyIndex)).Name), QBColor(White))
             ElseIf Map(GetPlayerMap(MyIndex)).Moral = MAP_MORAL_NO_PENALTY Then
                 Call DrawText(TexthDC, Int((20.5) * PIC_X / 2) - (Int(Len(Trim(Map(GetPlayerMap(MyIndex)).Name)) / 2) * 8) + sx, 2 + sx, Trim(Map(GetPlayerMap(MyIndex)).Name), QBColor(Black))
             End If

Comment that whole thing out and the write:

'Map Name in Title Bar
             If Map(GetPlayerMap(MyIndex)).Moral = MAP_MORAL_NONE Then
                 frmMirage.Caption = "GAME_NAME - " & (Map(GetPlayerMap(MyIndex)).Name) & " (No Morals)"
             ElseIf Map(GetPlayerMap(MyIndex)).Moral = MAP_MORAL_SAFE Then
                 If Map(GetPlayerMap(MyIndex)).Right = 36 And Map(GetPlayerMap(MyIndex)).Left = 366 And Map(GetPlayerMap(MyIndex)).Up = 2 Then
                 frmMirage.Caption = "GAME_NAME" & " (Safe Zone)"
                 Else
                 frmMirage.Caption = "GAME_NAME - " & (Map(GetPlayerMap(MyIndex)).Name) & " (Safe Zone)"
                 End If
             ElseIf Map(GetPlayerMap(MyIndex)).Moral = MAP_MORAL_NO_PENALTY Then
                frmMirage.Caption = "GAME_NAME - " & (Map(GetPlayerMap(MyIndex)).Name) & " (No Death Penalty)"
             End If


You'll Notice that in the Safe_Zone IF statment that there is another if statment using the maps, left, right, and up values, this if for your first map.  In my Game, with out that bit of code, it said "Elemental Destiny - Elemental Destiny (Safe Zone)"

If you wanted, you could put the map name in a lable by changing frmMirage.Caption to frmMirage.labelx.Caption



Replies:
Posted By: Sync
Date Posted: 07 February 2006 at 6:32pm
Approved




Print Page | Close Window

Bulletin Board Software by Web Wiz Forums version 8.01 - http://www.webwizforums.com
Copyright ©2001-2006 Web Wiz Guide - http://www.webwizguide.info