Print Page | Close Window

mining, fishing, and woodcutting (tile tu

Printed From: Mirage Source
Category: Tutorials
Forum Name: Temporary Archive (Read Only)
Forum Discription: Temporary 3.0.3 archive tutorials, will be deleted when converted.
URL: http://ms.shannaracorp.com/backup-forums/forum_posts.asp?TID=187
Printed Date: 20 December 2006 at 5:53pm
Software Version: Web Wiz Forums 8.01 - http://www.webwizforums.com


Topic: mining, fishing, and woodcutting (tile tu
Posted By: Sync
Subject: mining, fishing, and woodcutting (tile tu
Date Posted: 11 February 2006 at 3:23pm
This should get you started on the concept of mining, fishing, and woodcutting skills.
This tutorial covers adding the mining, fishing, and woodcutting tiles, but in
no way makes them work, it just covers the blitting to the screen.
The tutorial also covers making the option buttons in the mapeditor.
------------------------------------------------------------ -----------------------------
open modTypes.bas. Add the following under the TILE_TYPE stuff (server and client)
Public Const TILE_TYPE_MINE = 9
Public Const TILE_TYPE_WOOD = 10
Public Const TILE_TYPE_FISH = 11


(client)
Find:
If .Type = TILE_TYPE_KEYOPEN Then Call DrawText(TexthDC, x * PIC_X + 8, y * PIC_Y + 8, "O", QBColor(white))

Under it add:
If .Type = TILE_TYPE_MINE Then Call DrawText(TexthDC, x * PIC_X + 8, y * PIC_Y + 8, "M", QBColor(Green))
If .Type = TILE_TYPE_WOOD Then Call DrawText(TexthDC, x * PIC_X + 8, y * PIC_Y + 8, "W", QBColor(Brown))
If .Type = TILE_TYPE_FISH Then Call DrawText(TexthDC, x * PIC_X + 8, y * PIC_Y + 8, "F", QBColor(Cyan))

open frmMirage
Find the mapeditor
add 3 option buttons to the attributes panel:
optMine
optWood
optFish

Captions:
optMine - Mine
optWood - Woodcutting
optFish - Fishing

now find:
                     If frmMirage.optKeyOpen.Value = True Then
                          .Type = TILE_TYPE_KEYOPEN
                          .Data1 = KeyOpenEditorX
                          .Data2 = KeyOpenEditorY
                          .Data3 = 0
                     End If

Add underneath:
                     If frmMirage.optMine.Value = True Then
                          .Type = TILE_TYPE_MINE
                          .Data1 = 0
                          .Data2 = 0
                          .Data3 = 0
                     End If
                     
                     If frmMirage.optWood.Value = True Then
                          .Type = TILE_TYPE_WOOD
                          .Data1 = 0
                          .Data2 = 0
                          .Data3 = 0
                     End If

                     If frmMirage.optFish.Value = True Then
                          .Type = TILE_TYPE_FISH
                          .Data1 = 0
                          .Data2 = 0
                          .Data3 = 0
                     End If


That's all for my mining, woodcutting, and fishing tile tutorial.
I hope you enjoy it.



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