Jump to content

RoboMat

Member
  • Posts

    3439
  • Joined

Everything posted by RoboMat

  1. RoboMat

    Automatic Doors

    Hm that means you'd have to remove the closed state and add the open state ... I've never played around with tile objects, but I'm sure it is doable. How tricky it is has to be answered by someone else though :S
  2. RoboMat

    Automatic Doors

    If I had to guess I'd say it shouldn't be too hard. You could check the adjacent tiles around a player and check if the doors are of the required type. The opening part might be more tricky. It's been a while since I played the game so I am not sure about this: Are those two different tile-objects in your image?
  3. I want one NPC to build a moonbase purely from wheelie bins ... One may dream after all
  4. I remember writing a custom item spawner for my story mod back in the day and IIRC they are generated in a certain radius around the player (opening the container isn't necessary for items to spawn).
  5. Praise the CSS gods and ugly hacks!
  6. You probably mean OSX. iOS is the operating system for Apple's mobile system (iPhone, iPad, etc.). This should still be accurate for the latest version of PZ: If you are using steam you can install mods via workshop.
  7. Also here's a small code hint (I used to do this all the time back when I started): function LogSledTest() if getPlayer():getInventory():contains("LogSled") ~= false then return true else return false end end Can be replaced with: function LogSledTest() return getPlayer():getInventory():contains("LogSled") ~= false end Since the evaluation already spits out the necessary boolean
  8. Wow ... the code preview of the new forum is ugly as hell Instead of using get( i ) have you tried iterating over the items? for i = 1, item in ipairs( getPlayer():getInventory():getItems() ) do -- Do some really cool things here, like saving the world or eating sushi. end Not sure if you'll find anything specifically related to your mod, but I am doing some inventory operations in: Might be worth a look
  9. The mod is released under the MIT license. Feel free to add it on steam workshop (I'll gladly pull the necessary changes into the repo)
  10. I am not sure what you are trying to do with local bar = i() but basically what the stack trace is telling you, that you tried calling a table like a function. That's only possible if the table you are trying to call has a __call metamethod which it doesn't in this case. That's why it is crashing.
  11. Looks good (Also the new forum confuses me)
  12. RoboMat

    Moveables

    Not sure if I understand your question correctly, but you probably need to write some Lua code. IIRC the RainCollector barrel scripts are a good place to learn.
  13. Ah I see. Sounds good to me Nice idea.
  14. What if a player kills another player for self defense?
  15. Foo/media/lua/shared/Translate/EN/UI_EN.txt
  16. Funny how many people don't know how a discussion works :D

  17. Well I didn't say you don't have no clue ... !? I just answered your question as to why your comment sparked some negative vibes. It's just a hollow argument. It's for example like saying "why can't this plane go to space? This spaceship can do it too". If you really want to educate yourself on A* I'd recommend http://theory.stanford.edu/~amitp/GameProgramming/
  18. If I had to guess it's because the "it's 2d" argument is used most often by people who have no clue about programming games.
  19. Also last time I checked A* doesn't require recursion. Even if it would, it is up to you to implement a limit.
  20. Comparing apples and oranges here. How many entities does Minecraft compute in one chunk? How many of those are actively doing pathfinding? Now compare those numbers to the zombies PZ is simulating. Now ask yourself how many of the NPCs in Minecraft do boid-like behavior. Now compare those numbers to the zombies PZ is simulating. Now ask yourself how many of the NPCs in Minecraft are doing complex behavior (knocking on doors, crawling through windows, getting distracted by stuff, punching walls). Now compare those numbers to the the zombies PZ is simulating ... I guess you get the idea. Pathfinding can be a huge bottleneck even in modern games (and still is in many games). I'd say PZ is closer to a Strategy game when it comes to pathfinding. Huge number of actors, large map and very long paths. You can't do that without some tricks and hacks. It has nothing to do with the A* algorithm itself. If you read about pathfinding in general and educate yourself on the problems that come with it you will see that PZ and Minecraft have more or less completely different goals for their pathfinding. TLDR: I am impressed with the zombie simulation that is going on in PZ.
  21. The devs should call it Dijstarboids just to f*** with people Also:
  22. I think we need some kind of boids simulation. Not because it works well for swarms, but because the name fits perfectly. \o/
  23. Check my old sleeping overhaul. You can grab the spritename of each tile.
  24. player:getCurrentSquare():AddWorldInventoryItem(item, 0.0, 0.0, 0.0);
×
×
  • Create New...