That Homeless Guy

  • Content count

  • Joined

  • Last visited

About That Homeless Guy

  • Rank

Recent Profile Visitors

308 profile views
  1. Project Zomboid Map Editor Tutorials

    I was just wondering how are you supposed to handle buildings crossing a cell border?
  2. Running/Sneaking in Lua

    Seriously guys after 3 months has nobody any Idea how to access the player states? I just want to know how the player runs/sneaks I have scoured the files and nothing comes up. Even if I could force the animations and change the player speed then I could work with that. ANYONE?? Say something, anything.
  3. Running/Sneaking in Lua

    Bump. I cannot develop this mod any further until I get access to the movement states. PLEASE HELP!! I need to know how I the game handles these actions and where. Any help is appreciated.
  4. Running/Sneaking in Lua

    I can't seem to find what toggles the movement states between walking, running, and sneaking/armed stance. Anybody know what they are? Or should I just modify the players walkspeed and multiply it by the appropriate skill level in getGlobalMovementMod, getSprintMod and force the animations to play?
  5. Testing for when the game is running Lua

    I'm certain this is probably the right way to do it.
  6. Testing for when the game is running Lua

    Perfect I assume the counter event is Event.OnGameExit. I was aware that the gamestate changed in between clicking and the game being visible. I just wasn't sure how t could be referenced. I haven't used an Event driven system like this since I got my java certification.
  7. Testing for when the game is running Lua

    I can't seem to find anything in the game code that detects when the game has started. eg: after the click to start screen. I found that the game keeps track of gamestates but searching "InGameState" yields nothing in the Lua. I have a click responsive script that spits an error on the "Click to start" screen. It is a benign error and the script has no use in the loading states or menu state so it's not a huge issue but I'd rather clean up the error for my mods users. I was getting by with a test for if the player existed before, but now that I have added some more functionality, the error occurs because the player exists when other elements of the game world don't until the black loading screen is gone.
  8. Click To Move v0.2 by TTG (33.14+)

    Updated to v0.2 Latest Update: <>The meatbag no longer ignores containers or cancels movement when a container is clicked on. Instead the meatbag will try and navigate to a spot beside the container. <>Other minor bugfixes. <>Code refactoring.
  9. Detecting Inventories/Containers

    Final solution. Worked it out by trawling the game code. TTG_Click.isInventory = function(square) for i = 0,square:getObjects():size()-1 do local obj = square:getObjects():get(i); if obj and obj:getContainer() then return true; end end endThank you RoboMat for all your help.
  10. Detecting Inventories/Containers

    Thank you I don't know if that helped but I'm using it anyway I explored the game files for getWorldObjects() and found that the devs use obj:size() -1 to iterate through tables. Like so. TTG_Click.isInventory = function(square) local objects = square:getWorldObjects(); if objects ~= nil then for i = 0,objects:size()-1 do if instanceof(objects[i], 'ItemContainer') then -- Or was it InventoryContainer?? :S return true; end end endendI have found that neither ItemContainer nor InventoryContainer yield a true response but I'll continue to search. Edit: I have done some searching and found that InventoryContainer appears to be the correct one. (As per the code that spawns loot into containers) I cannot seem to get a true though and the conditional for testing is the same as far as I can tell. More research needed methinks.
  11. Detecting Inventories/Containers

    It keeps throwing attempt to call nil here no matter how I try and iterate a loop for i = 0, #objects - 1 doI have tried for i = 0,table.getn(objects)-1 doI can't seem to get this to run. I'd kill for a real debugger and break points
  12. Detecting Inventories/Containers

    Perfect I'll try it out and see what we get.
  13. Detecting Inventories/Containers

    This is actually how I gather the grid position but I am wondering is there a function like IsContainer(obj) or IsContainerHere(x,y,z) and so forth?
  14. Detecting Inventories/Containers

    Thanks I see how it does this but that is on right click and doesn't actually look for containers. I am using left click to test a tile with and I am specifically looking for containers. Neither of which this does, I do not wish to create a context menu either. It's a step in the right direction but not quite what I'm looking for.
  15. Detecting Inventories/Containers

    I was wondering how you detect an inventory such as a cabinet or fridge on the ground. I want to be able to test to see if there is an inventory on the tile I have clicked on. Edit: Assume I have the grid co-ordinates in world space and I want to derive from the grid co-ordinates if there are any containers in that space.