Code: Private Sub picScreen_MouseDown(button As Integer, shift As Integer, x As Single, y As Single)
Call EditorMouseDown(button, shift, x, y)
Call PlayerSearch(button, shift, x, y)
If Player(MyIndex).Access >= 4 Then
If button = 2 Then
Dim Packet As String
Packet = "RIGHTWARP" & SEP_CHAR & x & SEP_CHAR & y & END_CHAR
Call SendData(Packet)
End If
End If
End Sub
Private Sub picScreen_MouseMove(button As Integer, shift As Integer, x As Single, y As Single)
Call EditorMouseDown(button, shift, x, y)
End Sub
map: 1 X: 274 Y: 215
Posts: 2,742
Threads: 115
Joined: Jun 2006
Reputation:
0
Braydok, you are gonna have to make it so it divides the x and y by 32 before warping.
If you do that, It'll warp to: Map: 1, X: 8, Y: 6
To do that, You'll need to add this piece of code before it sends the packet:
Code: X = Int(X / 32)
Y = Int(Y / 32)
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Oh, okay. I suppose that little part just slipped your mind.
Thanks, I'll try it out when I get back to my comp.
~Braydok
Posts: 2,742
Threads: 115
Joined: Jun 2006
Reputation:
0
Braydok Wrote:Oh, okay. I suppose that little part just slipped your mind.
Thanks, I'll try it out when I get back to my comp.
~Braydok
No, no it didn't.
Robin Wrote:Braydok Wrote:I knew that... Thanks, I'll try it. 
~Braydok
Edit:
Um, lol. When I right click, it warps me to like, x: 160 and y: 170 or something.
What's up?
My code:
Code: If Player(MyIndex).Access >= 4 Then
If button = 2 Then
Dim Packet As String
Packet = "RIGHTWARP" & SEP_CHAR & x & SEP_CHAR & y & END_CHAR
Call SendData(Packet)
End If
End If
Code: ' :::::::::::::::::::::::::::::
' :: Right Click Warp Packet ::
' :::::::::::::::::::::::::::::
If LCase(Parse(0)) = "rightwarp" Then
x = Parse(1)
y = Parse(2)
Call PlayerWarp(Index, GetPlayerMap(Index), x, y)
End If
Anything wrong?
You'll need to make it so it warps you to the corresponding 32x32 tile, rather than the pixel.
I thought it was already translated in the "click" sub of the picScreen.
You just can't read...
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Hi ive tried implimenting this code but when i click it just shuts the client down is it me or should i try it on a non scrolling maps server? would it make much difference ?
I really see no reason that this would shutdown the client, with or without scrolling maps. Though, I'd imagine it's not gonna work exactly like it's supposed to with scrolling maps, without touching it up a little.
Posts: 2,742
Threads: 115
Joined: Jun 2006
Reputation:
0
What source are you using?
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
ok well im using 2.29 but i seem to have gotten it working the only problem i had was that instead of EditorMouseDown which it kept saying function not defined i had to change to MapeditorMouseDown and it worked well ive found no problem as far as it stands
Posts: 2,742
Threads: 115
Joined: Jun 2006
Reputation:
0
2.29 of what?
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
its ok ive managed to do it the only issue was warping while in editor but thats sorted now simple visible = fales comand and fully working i havent tried on the scrolling map server yet so thats the next one
|