Jump to content

Search the Community

Showing results for tags 'resourse'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News & Announcements
    • News
  • Project Zomboid
    • PZ Updates
    • General Discussions
    • Bug Reports
    • PZ Support
    • PZ Multiplayer
    • PZ Community & Creativity
    • PZ Suggestions
  • PZ Modding
    • Tutorials & Resources
    • Mods
    • Items
    • Mapping
    • Mod Ideas and Requests
  • General Games Development
    • Indie Scene
  • Other Discussions
    • General Discussion
    • Forum Games & Activities

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Twitter


Interests

Found 1 result

  1. For future reference, since this was frustrating to calculate. Here is the method for all to use. it calculates the grid square that your mouse is over based on screen size and properly accounts for the Zoom level as well. using the center of the screen as a starting point. local sw = (128 / getCore():getZoom(0)); local sh = (64 / getCore():getZoom(0)); local mapx = getPlayer():getX(); local mapy = getPlayer():getY(); local mousex = ( (getMouseX() - (getCore():getScreenWidth() / 2)) ) ; local mousey = ( (getMouseY() - (getCore():getScreenHeight() / 2)) ) ; local sx = mapx + (mousex / (sw/2) + mousey / (sh/2)) /2; local sy = mapy + (mousey / (sh/2) -(mousex / (sw/2))) /2; local TheSquareYourMouseIsOn = getCell():getGridSquare(sx,sy,getPlayer():getZ());
×
×
  • Create New...