DMF Posted November 25, 2012 Author Share Posted November 25, 2012 ok's this is a far outdated code wonder if some one could convert it to format of EA 3.0.21 .this code was under"Private Sub Form_KeyUp"idk i didn't see an i in the code.```Dim d As Long, i As Integer```Rotation code was under same sub.```If KeyCode = vbKeyEnd Then d = GetPlayerDir(MyIndex) If Player(MyIndex).Moving = NO Then If Player(MyIndex).Dir = DIR_DOWN Then Call SetPlayerDir(MyIndex, DIR_LEFT) If d <> DIR_LEFT Then Call SendPlayerDir End If ElseIf Player(MyIndex).Dir = DIR_LEFT Then Call SetPlayerDir(MyIndex, DIR_UP) If d <> DIR_UP Then Call SendPlayerDir End If ElseIf Player(MyIndex).Dir = DIR_UP Then Call SetPlayerDir(MyIndex, DIR_RIGHT) If d <> DIR_RIGHT Then Call SendPlayerDir End If ElseIf Player(MyIndex).Dir = DIR_RIGHT Then Call SetPlayerDir(MyIndex, DIR_DOWN) If d <> DIR_DOWN Then Call SendPlayerDir End If End If End If End If```this would be really great help to me if someone could convert this.Thanks in advance. Link to comment Share on other sites More sharing options...
Exception Posted November 25, 2012 Share Posted November 25, 2012 That doesn't need conversion at all. Link to comment Share on other sites More sharing options...
DMF Posted November 25, 2012 Author Share Posted November 25, 2012 then tell me how get it in with out crashing? or where exactly i should add it?? b/c it dont work. 1 if i get it open the enter button crashes it. if that doesnt .moving does or it dont work at all.o-o ya i was testing it,, so any ideas? Link to comment Share on other sites More sharing options...
Exception Posted November 25, 2012 Share Posted November 25, 2012 …how on Earth can that snippet of code from that one paragraph tutorial be _crashing_ you?When you say crash, do you mean, literally CTDing, or RTEing?Also, don't forget, in order to use that, you should be hitting the End key. Link to comment Share on other sites More sharing options...
DMF Posted November 25, 2012 Author Share Posted November 25, 2012 ik i have to hit end key.it does do it . b/c when its not there it is all fine. Link to comment Share on other sites More sharing options...
kris_hole Posted November 26, 2012 Share Posted November 26, 2012 I don't understand what the error is? Link to comment Share on other sites More sharing options...
DMF Posted November 26, 2012 Author Share Posted November 26, 2012 not exactly an error code per say it crashs client. o-o try puting it in EA 3.0.21 you probly see what im talking about. Link to comment Share on other sites More sharing options...
Ertzel Posted November 26, 2012 Share Posted November 26, 2012 Remove all that shit you added.Go to:```Public Sub HandleKeyUp(ByVal KeyCode As Long)```and before the```End Sub```add:```If KeyCode = vbKeyEnd Then If TempPlayer(MyIndex).Moving = NO Then Select Case GetPlayerDir(MyIndex) Case DIR_UP ' Change to right SetPlayerDir MyIndex, DIR_RIGHT Case DIR_RIGHT ' Change to down SetPlayerDir MyIndex, DIR_DOWN Case DIR_DOWN ' change to left SetPlayerDir MyIndex, DIR_LEFT Case DIR_LEFT ' change to up SetPlayerDir MyIndex, DIR_UP End Select Call SendPlayerDir End IfEnd If``` Link to comment Share on other sites More sharing options...
DMF Posted November 26, 2012 Author Share Posted November 26, 2012 thanks ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now