Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO] Targeting Issue


RawrIWin
 Share

Recommended Posts

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 XD

Is there any fix for this?
Link to comment
Share on other sites

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

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

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

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

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

…. Or not XD

Now 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

Client-side:

>! ' Map constants
Public Const MAX_MAPS As Long = 100
Public Const MAX_MAPX As Byte = 27
Public Const MAX_MAPY As Byte = 21
Public Const MAP_MORAL_NONE As Byte = 0
Public Const MAP_MORAL_SAFE As Byte = 1

Server-side:

>! ' Map constants
Public Const MAX_MAPS As Long = 100
Public Const MAX_MAPX As Byte = 27
Public Const MAX_MAPY As Byte = 21
Public Const MAP_MORAL_NONE As Byte = 0
Public Const MAP_MORAL_SAFE As Byte = 1
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...