abhi2011 Posted May 3, 2012 Author Share Posted May 3, 2012 What is the code for finding the player coordinates and storing them so that i can use it for a control? The coordinates are displayed when "/loc" is inputted but that is not what I want so don't suggest it. Something like "GetPlayerPos" Link to comment Share on other sites More sharing options...
Urumil Posted May 3, 2012 Share Posted May 3, 2012 Why do you want to know this? Link to comment Share on other sites More sharing options...
Guest Posted May 3, 2012 Share Posted May 3, 2012 What do you mean by control?Controlling the player's character while he/she is online?What's the point of that,if the player moves around,getting many coords.But first explain more detailed what are you thinking Link to comment Share on other sites More sharing options...
erkro1 Posted May 3, 2012 Share Posted May 3, 2012 I think they're already stored in Player(MyIndex).Map, Player(MyIndex).X and Player(MyIndex).Y Link to comment Share on other sites More sharing options...
abhi2011 Posted May 3, 2012 Author Share Posted May 3, 2012 I mean the player's position (if it is the same as coordinate)on the screen cuz i want to try and make a right click option and when right clicked should come up near the player. And Erwin doesn't player(myindex) mean the player that is playing? like if i were playing it would be me? Link to comment Share on other sites More sharing options...
erkro1 Posted May 3, 2012 Share Posted May 3, 2012 @abhi2011:> I mean the player's position (if it is the same as coordinate)on the screen cuz i want to try and make a right click option and when right clicked should come up near the player. And Erwin doesn't player(myindex) mean the player that is playing? like if i were playing it would be me?Player position is the same as coordinates I guess, Player(index).X and the other stuff displays the player X and Y position on the map, so thesame as you see when the /loc thing is turned on.And Player(MyIndex) has nothing to do if the player if playing, because you can only check that at server side with IsPlaying sub, its an array with data of the player. (Please note that MyIndex can only be used at client side and will always be the player playing at the client) Link to comment Share on other sites More sharing options...
Urumil Posted May 3, 2012 Share Posted May 3, 2012 … but why do you want to have this? :D Link to comment Share on other sites More sharing options...
tslusny Posted May 3, 2012 Share Posted May 3, 2012 he want to have right click menu to open only when you rightclick with mouse on player Link to comment Share on other sites More sharing options...
abhi2011 Posted May 4, 2012 Author Share Posted May 4, 2012 @Erwin:> Player position is the same as coordinates I guess, Player(index).X and the other stuff displays the player X and Y position on the map, so thesame as you see when the /loc thing is turned on.> And Player(MyIndex) has nothing to do if the player if playing, because you can only check that at server side with IsPlaying sub, its an array with data of the player. (Please note that MyIndex can only be used at client side and will always be the player playing at the client)So client side is for the person playing the game and server side can be used for any player? So does that mean I have will have to write the code for sending a packet and stuff?I also wanted to ask if there was a need to wirte a packet why is there a write.buffer code in client/server TCP module. And what is cls.buffer? Link to comment Share on other sites More sharing options...
erkro1 Posted May 4, 2012 Share Posted May 4, 2012 @abhi2011:> So client side is for the person playing the game and server side can be used for any player? So does that mean I have will have to write the code for sending a packet and stuff?I think you can use PlayerSearch for that.@abhi2011:> I also wanted to ask if there was a need to wirte a packet why is there a write.buffer code in client/server TCP module. And what is cls.buffer?Read this:http://www.touchofdeathforums.com/smf2/index.php/topic,69393.msg746513.html#msg746513 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