Heal/Kill Attribute
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=170
Printed Date: 20 December 2006 at 5:52pm Software Version: Web Wiz Forums 8.01 - http://www.webwizforums.com
Topic: Heal/Kill Attribute
Posted By: Sync
Subject: Heal/Kill Attribute
Date Posted: 11 February 2006 at 3:14pm
Difficulty: Medium 3/5
Originaly Posted By: Mr.Saturn
Healing/Killing Attributes
'Healing Tiles '-------------- '~Server Side
'In modTypes add 'Code:
Public Const TILE_TYPE_HEAL = 7
'In modGamelogic go to Player Move and add 'Code:
If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Type = TILE_TYPE_HEAL Then
Call SetPlayerHP(Index, GetPlayerMaxHP(Index)) Call SendHP(Index) Call PlayerMsg(Index, "You feel a sudden rush through your body as you regain strength!", BrightGreen) End If
'~Client Side:
'In modGamelogic search for code: 'Code:
If .Type = TILE_TYPE_BLOCKED Then Call DrawText(TexthDC, x * PIC_X + 8, y * PIC_Y + 8, "B", QBColor(BrightRed))
'And under that add 'Code:
If .Type = TILE_TYPE_HEAL Then Call DrawText(TexthDC, x * PIC_X + 8, y * PIC_Y + 8, "H", QBColor(BrightGreen))
'Now search for 'Code:
If frmMirage.optWarp.Value = True Then .Type = TILE_TYPE_WARP .Data1 = EditorWarpMap .Data2 = EditorWarpX .Data3 = EditorWarpY End If
'And under that add 'Code:
If frmMirage.optHeal.Value = True Then .Type = TILE_TYPE_HEAL .Data1 = 0 .Data2 = 0 .Data3 = 0 End If
'Now in frmMirage make an option box under Attributes and title it optHeal.
'Congradulation! You compleated this tutorial and should now have fully working Heal tiles.
'Kill Tiles '-------------- '~Server Side 'In modTypes add 'Code:
Public Const TILE_TYPE_KILL = 8
'In modGamelogic go to Player Move and add
'Code:
'Check for kill tile, and if so kill them If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Type = TILE_TYPE_KILL Then Call SetPlayerHP(Index, 0)
Call PlayerWarp(Index, START_MAP, START_X, START_Y) Call SetPlayerHP(Index, GetPlayerMaxHP(Index)) Call SetPlayerMP(Index, GetPlayerMaxMP(Index)) Call SetPlayerSP(Index, GetPlayerMaxSP(Index)) Call SendHP(Index) Call SendMP(Index) Call SendSP(Index) Moved = YES End If
'~Client Side:
'In modGamelogic search for code: 'Code:
If .Type = TILE_TYPE_BLOCKED Then Call DrawText(TexthDC, x * PIC_X + 8, y * PIC_Y + 8, "B", QBColor(BrightRed))
'And under that add 'Code:
If .Type = TILE_TYPE_KILL Then Call DrawText(TexthDC, x * PIC_X + 8, y * PIC_Y + 8, "K", QBColor(BrightRed))
'Now search for 'Code:
If frmMirage.optWarp.Value = True Then .Type = TILE_TYPE_WARP .Data1 = EditorWarpMap .Data2 = EditorWarpX .Data3 = EditorWarpY End If
'And under that add 'Code:
If frmMirage.optKill.Value = True Then .Type = TILE_TYPE_KILL .Data1 = 0 .Data2 = 0 .Data3 = 0 End If
'Now in frmMirage make an option box under Attributes and title it optKill.
'Congradulation! You compleated this tutorial and should now have fully working Kill tiles.
|
|