abhi2011 Posted June 4, 2012 Author Share Posted June 4, 2012 Does anyone know how to make a right mouse button system. Something like if I right click a player his name will come up along with his level and some other options such as trade and stuff. I know it should be executed in "picScreen_MouseClick". And it should be requested by the server to give the name level and stuff. The only problem is the positioning help. I don't have any DD experience and I haven't actually gone through the code. How do I get the other players X/Y location and when I right click come just a bit lower-left of the players sprite?Thanks in advance. Link to comment Share on other sites More sharing options...
tslusny Posted June 4, 2012 Share Posted June 4, 2012 Look to Sub Render_GraphicsHere find```' draw player names```There is some codes for getting x,y Link to comment Share on other sites More sharing options...
abhi2011 Posted June 4, 2012 Author Share Posted June 4, 2012 Seriously? Are you kidding me? WTF? That is for drawing the players name above the character sprite. I want it to be shown in the right-click menu and yes I know how to do that. I don't how to position it . Man this is one of those times when Soul should have been hear to help. Link to comment Share on other sites More sharing options...
tslusny Posted June 4, 2012 Share Posted June 4, 2012 omg you cant just look at that code?? Use GetPlayerX and GetPlayerYlook at mouse movement tutorial ( not that one with 4 triangles) and look how its getting player position Link to comment Share on other sites More sharing options...
Exception Posted June 4, 2012 Share Posted June 4, 2012 @Deathbeam:> omg you cant just look at that code?? Use GetPlayerX and GetPlayerY> > look at mouse movement tutorial ( not that one with 4 triangles) and look how its getting player positionI hope you realise that GetPlayerX/Y get the players x/y according to their map position, and not on the picScreen, right? Link to comment Share on other sites More sharing options...
The New World Posted June 4, 2012 Share Posted June 4, 2012 Use GlobalX and GlobalY, consider their target through the functions available and then render the list of options depending on what type of target was verified, and make sure it renders with whatever offset you have intended. Link to comment Share on other sites More sharing options...
abhi2011 Posted June 5, 2012 Author Share Posted June 5, 2012 @Deathbeam:> omg you cant just look at that code?? Use GetPlayerX and GetPlayerY> > look at mouse movement tutorial ( not that one with 4 triangles) and look how its getting player positionGetPlayerX and GetPlayerY is for the player who is playing. Get's the player's X/Y. What I want is the target players X/Y.@WÑ–ng:> Use GlobalX and GlobalY, consider their target through the functions available and then render the list of options depending on what type of target was verified, and make sure it renders with whatever offset you have intended.GlobalX and GlobalY can be found in the server right? 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