Print Page | Close Window

Change Direction without Walking

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=210
Printed Date: 20 December 2006 at 5:53pm
Software Version: Web Wiz Forums 8.01 - http://www.webwizforums.com


Topic: Change Direction without Walking
Posted By: Sync
Subject: Change Direction without Walking
Date Posted: 11 February 2006 at 3:34pm
This is veeery simple tut, but its fun to have it ;)
You just need to add a few lines only on client. Its DAMN simple xD

Dificulty: 1/5

On modGameLogic, find this sub:
Sub CheckInput(ByVal KeyState As Byte, ByVal KeyCode As Integer, ByVal Shift As Integer)
On that sub, find this:
    If GettingMap = False Then
        If KeyState = 1 Then
Right under that, add this:
             If Player(MyIndex).Attacking = 0 And Player(MyIndex).Moving = 0 Then
                 Dim OldDir As Byte
                 OldDir = GetPlayerDir(MyIndex)
                 If KeyCode = vbKeyHome Then
                     Call SetPlayerDir(MyIndex, DIR_UP)
                     If OldDir <> GetPlayerDir(MyIndex) Then
                           Call SendPlayerDir
                     End If
                     Exit Sub
                 End If
                 If KeyCode = vbKeyEnd Then
                     Call SetPlayerDir(MyIndex, DIR_DOWN)
                     If OldDir <> GetPlayerDir(MyIndex) Then
                           Call SendPlayerDir
                     End If
                     Exit Sub
                 End If
                 If KeyCode = vbKeyDelete Then
                     Call SetPlayerDir(MyIndex, DIR_LEFT)
                     If OldDir <> GetPlayerDir(MyIndex) Then
                           Call SendPlayerDir
                     End If
                     Exit Sub
                 End If
                 If KeyCode = vbKeyPageDown Then
                     Call SetPlayerDir(MyIndex, DIR_RIGHT)
                     If OldDir <> GetPlayerDir(MyIndex) Then
                           Call SendPlayerDir
                     End If
                     Exit Sub
                 End If
             End If
Done xD
Now to move without walking you just need to click Home(DIR_UP), End(DIR_DOWN), Delete(DIR_LEFT) or Page Down(DIR_RIGHT)

Simple and fun ;) :D



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