RawrIWin Posted June 28, 2011 Author Share Posted June 28, 2011 Yeah, two problems in one day (likely more to come).I doubled the amount of tiles on a map (from 11x14 to 22x28), and doubled the size of picScreen. The tiles look exactly the same, and everything visually is fine.My new issue is targeting. Within the old 11x14 area, targeting is fine. Hover over the character, get target.bmp over it. Outside of that however, seems to not be working well. The further down and right I go, the higher up and left I have to put my mouse. So, when I get to x:28, y: 22, in order to target the character, the mouse has to be around x: 27, y: 17.I know it has to do something with the Cursor X & Y. When I move the cursor to x:28, y:22, it says the cursor is at x: 29, y: 29, which isn't possible, because there aren't that many tiles XDIs there any fix for this? Link to comment Share on other sites More sharing options...
Greendude120 Posted June 28, 2011 Share Posted June 28, 2011 You also need to open the source and set Map X and Map Y to double the size. looks in Constant.mod it should be in there near the top. If you dont see those then it wont work. If that doesnt work then you may have played around with the targeting code and post here if it didnt work. Link to comment Share on other sites More sharing options...
RawrIWin Posted June 28, 2011 Author Share Posted June 28, 2011 I've done that already.I'm fairly confident I haven't messed with the targeting script, considering I've been messing with only GUI stuff.Like I said, I'm fairly confident it has something to do with CurX / CurY, but I haven't messed with them at all..Maybe a property for picScreen needs to be changed? I don't know, I'm literally brand new at coding. Just started today, and gotten this far. Lol. Link to comment Share on other sites More sharing options...
Greendude120 Posted June 28, 2011 Share Posted June 28, 2011 Download a fresh copy of EO2\. Modify ONLY the map size the same way you did in your game. If it works, then your targeting source has been changed for a reason or another. If it doesnt work, your simply not changing all the values properly. Let me know which of the 2 happened.EDIT: yeah in source make sure to click your picscreen and then modify the height and width accordingly. I think its 32 times the value you put. So if your Map x is 12 then your picscreen x should be 12 x 32 since each tile is 32 pixels in size. Link to comment Share on other sites More sharing options...
RawrIWin Posted June 28, 2011 Author Share Posted June 28, 2011 Roger that, I'm on it right now. I'll let you know. Link to comment Share on other sites More sharing options...
RawrIWin Posted June 28, 2011 Author Share Posted June 28, 2011 Yeah, its still happening.I doubled the Max_MapX and Max_MapY on Client-side, doubled the pixels height and width for picScreen, and went server-side and doubled Max_MapX and Max_MapY.The cursor is still off, just as my current client. Link to comment Share on other sites More sharing options...
Robin Posted June 28, 2011 Share Posted June 28, 2011 Input is based on the grid. The only reason it will be off is through the degradation of having a slight inaccuracy in your size calculations.I know for a fact that having a larger screen size doesn't cause any problems at all so it's something you've managed to mess up during your implementation.Go back to the backup you made before you added it and try again. Follow all steps carefully.**EDIT**@RawrIWin:> I doubled the Max_MapX and Max_MapY on Client-side, doubled the pixels height and width for picScreen, and went server-side and doubled Max_MapX and Max_MapY.That's your problem right there. Map size starts from 0\. Double the Max_MapX and Max_MapY then subtract 1 from both values. Link to comment Share on other sites More sharing options...
RawrIWin Posted June 28, 2011 Author Share Posted June 28, 2011 I'll try right now, but I'm sure it will work :P Link to comment Share on other sites More sharing options...
RawrIWin Posted June 28, 2011 Author Share Posted June 28, 2011 …. Or not XDNow my CurX and CurY are showing X: 30 and Y: 30 for map size, with a map x: 28 and y: 22.I'm going to double-check my picScreen size, before I feel really stupid.Yeah..... picScreen is Height: 960, Width: 768. Link to comment Share on other sites More sharing options...
Robin Posted June 28, 2011 Share Posted June 28, 2011 You… you are deleting all your maps after changing the map size, right? Link to comment Share on other sites More sharing options...
RawrIWin Posted June 28, 2011 Author Share Posted June 28, 2011 Just did, with no change. The X and Y cursor values are still off. Link to comment Share on other sites More sharing options...
Robin Posted June 28, 2011 Share Posted June 28, 2011 You are deleting them in both the "client/data files/maps/" folder **and** the "server/data/maps/" folder? Link to comment Share on other sites More sharing options...
RawrIWin Posted June 28, 2011 Author Share Posted June 28, 2011 Yep. Still off. In fact, its really off. Link to comment Share on other sites More sharing options...
Robin Posted June 28, 2011 Share Posted June 28, 2011 Post your Max_MapX and Max_MapY values and your picScreen size. Link to comment Share on other sites More sharing options...
RawrIWin Posted June 28, 2011 Author Share Posted June 28, 2011 Client-side:>! ' Map constantsPublic Const MAX_MAPS As Long = 100Public Const MAX_MAPX As Byte = 27Public Const MAX_MAPY As Byte = 21Public Const MAP_MORAL_NONE As Byte = 0Public Const MAP_MORAL_SAFE As Byte = 1Server-side:>! ' Map constantsPublic Const MAX_MAPS As Long = 100Public Const MAX_MAPX As Byte = 27Public Const MAX_MAPY As Byte = 21Public Const MAP_MORAL_NONE As Byte = 0Public Const MAP_MORAL_SAFE As Byte = 1 Link to comment Share on other sites More sharing options...
Robin Posted June 28, 2011 Share Posted June 28, 2011 @Robin:> and your picScreen size. Link to comment Share on other sites More sharing options...
RawrIWin Posted June 28, 2011 Author Share Posted June 28, 2011 http://i56.tinypic.com/20ky5gk.jpg Link to comment Share on other sites More sharing options...
Robin Posted June 28, 2011 Share Posted June 28, 2011 Read my very first post again. You failed completely at following my instructions.Map size starts from **0**. So if your Max_MapX is set to 27 then your actual map width is 28\. 28 tiles is '896'.Height should be '704'.I honestly have no clue how you managed to get the values you did have, though. '960' divided by 32 would mean a map size of _31 tiles_. Link to comment Share on other sites More sharing options...
RawrIWin Posted June 28, 2011 Author Share Posted June 28, 2011 Rofl.I doubled everything.I told you I'm a source/script newb.Sorry I wasted your time, brah.Edit: Said that in the last post I made, maybe you didn't read it. Link to comment Share on other sites More sharing options...
Robin Posted June 28, 2011 Share Posted June 28, 2011 I assumed you'd just followed the tutorial wrong. I didn't realise you had the calculation so utterly screwed up.Try and follow the tutorial properly next time. Or at least read it. xD Link to comment Share on other sites More sharing options...
RawrIWin Posted June 28, 2011 Author Share Posted June 28, 2011 Lawl, couldn't find it bahahaha XDBut seriously, its a good lesson learned. I won't be making that mistake again. :PI appreciate the help! 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