Jump to content

MisterInSayne

Member
  • Posts

    187
  • Joined

  • Last visited

Everything posted by MisterInSayne

  1. Sleeeep...... *moans like a zombie*

  2. Sooo... somehow in trying to rework the 'fence climbing' stuff... I may have made the dogs master the power of no-clipping. Fun times!..... In other news, most systems (along with the fence climbing) are waiting for me to fully code the new pathfinding system... which I keep postponing to do as it's such a big thing... I know how I want to do it, but it's going to take a ton of testing and researching. But yeh... I kinda have to start on it now... So wish me luck!
  3. Fun with pathfindfinding: https://gyazo.com/2c1708a711ed171a095551455ceb852f
  4. try rotating it with R, it might be that it doesn't have sprites for 2 of it's sides. Let me know if it works.
  5. if testItem:getCategory() ~= "Literature" or testItem:getCategory() ~= "Drainable" or testItem:canBeWrite() then isAllLiterature = false;end^ this is your problem. this means: if the item is not literature or not drainable then. if the item is a drainable, it's not a literature, so doesn't get through. same vica versa. also, try doing: if ( testItem:getCategory() == "Literature" or testItem:getCategory() == "Drainable" ) and testItem:canBeWrite() then canBeWrite = testItem; endinstead of if testItem:getCategory() == "Literature" or testItem:getCategory() == "Drainable" and testItem:canBeWrite() then canBeWrite = testItem; end
  6. I know that for lua (mods) it's located at "ProjectZomboid\media\lua\server\Seasons\" maybe you can find something there?
  7. A pupil of mine, who I play zomboid with and teach basic scripting, is actually making a mod with me to give hugs ingame Coincidence? I think not!
  8. Does "java.lang.ClassCastException: zombie.inventory.types.InventoryContainer cannot be cast to zombie.inventory.types.Clothing" mean it's currently impossible? There is no such thing as impossible in coding. "Impossible" is a term used to describe a situation where "something takes more effort and time than it's worth". Your error means the item type "Clothing" is the only 'java object class' that can be equiped on the torso etc in the way your code currently works.
  9. The problem is we dont have a lot of nature as right now (until your mod fixes that) to actually pose a threat in PZ, the only threat at the moment are zombies (and with the whole low population, that will go down fast) and cold that you pretty much have to play with clothes until you find the max stats for those. Also water and food, cant see a way to keep it up in a cold environment. Boil snow.
  10. I'd love an alaska map! Low population density, lots of nature <3 Have you ever seen/played the game "The Long Dark"?
  11. Okay. First of all, testItem shouldn't be at line 330, line 330 is a different function that doesn't have that variable. it should be at line 140.
  12. Well, it might be usefull to explain what it is that does go wrong, and in what way it isn't working. Error, crash, not doing anything, only working sometimes, it's not showing x on y, etc. If it gives an error, show us what error is in your log.
  13. Yes, lua isn't module based, if 2 mods have the same scriptname, it'll overwrite one even. but, items are all loaded in for lua to use, and lua can do anything with all items from all modules
  14. The fun way to learn the basics of lua or other coding languages is http://codecombat.com Make sure to put it on lua when you create a character. Once you're though the forest level, you should understand the basics enough to get into the lua of PZ modding
  15. My first reaction was "Oh god...". My second was "wait... what?!"... Don't take that as an offence, you're doing a good effort, but your code is... well, first of all dangerous: while true do ^ This will loop forever, which means you're telling the code to never go to the next script. Freezing the game, and everything... forever... if(function(TRAUMAKIT)==true){}then^ this isn't lua, and... possibly calls itself, creating another infinite loop. there are the 2 critical things. the rest of the code... well... Please... PLEASE do not take this offensive. I'm not trying to be mean... but... there is litterally not a single thing in it that could work or isn't wrong... I'm not giving this as deconstructive critisism, or to tell you off. And please don't let this demotivate you, but instead take it as a sign that you should do some more learning about how coding works. Specifically lua. Here is your code, but pleaaase put some time in learning the basics of coding... ;___; because, it's nearly impossible to even see what you're trying to do in your code, and I'm still not sure if I did want you "expected" the code to do. But this is what your code would do, if it was working. I think... function giveTraumaKit() local spawnedLargeTraumaKit = getPlayer():getCurrentSquare():AddWorldInventoryItem("TRAUMAKIT.LargeTraumaBag", 0.0, 0.0, 0.0); local spawnedLargeTraumaKitContainer = spawnedLargeTraumaKit:getItemContainer(); local medSuppliesTable = { "Base.Bandaid" = 100, "Base.AlcoholBandage" = 100, "Base.Disinfectant" = 100, "Base.AlcoholWipes" = 100, "Base.SutureNeedle" = 75, "Base.SutureNeedleHolder" = 75, "Base.PillsBeta" = 50, "Base.PillsAntiDep" = 50, "Base.PillsSleepingTablets" = 50, "Base.Splint" = 11 }; for item,chance in pairs(medSuppliesTable) do if chance > ZombRand(0, 100) then spawnedLargeTraumaKitContainer:AddItem(item); end end print("TRAUMAKIT: SuburbsDistributions added. ");endEvents.OnGameBoot.Add(giveTraumaKit);Edit: I'm really trying to be nice, I really am... So please please don't take this the wrong way.
  16. "Do you remember how to put up sheetropes again? Do I just press E or something?"... I learned quickly from that. My friends reaction was priceless as my body flopped on floor right in front of her. So I guess it was worth it XD
  17. I have had a pet rat before. They are great pets. I got mine at the end of 5th grade since it was the class pet. Since it was around kids all day it was super docile. They are very smart creatures and I swear acted more like a dog than a rodent. My rat lived a long and happy life. It was one of the best pets I ever had. At the bottom of my pet list are hamsters, they can get MEAN! The story of how I got my first rat (the one in the picture) is one that one that could be applied to the way I want the pet rats to work in the mod. Everyone take a seat, it's story time! Some of you may not believe me, but I promise you, all of this is exactly how it happened (aside from not using my real name in this). It happened as I was staying at my grandma's for a weekend. And somewhere along the day my grandma yelled for me from the basement "Sayne, come look at what I found!". I hurried down, and all I saw was my grandma bend over the washing machine, making an awkward attempt to move it... She moved out of the was as I came closer and said "There is a rat behind it... But, I think it's a tame one!". And there she was, scared, skin over bones, her ears were showing signs of necrosis at parts... She looked like she had been through hell. She was cornered, and petrified, she didn't even move as I moved the washing machine, and didn't really try to escape when I grabbed her. And thats when I noticed she was covered in fleas, which we're jumping all over the place. We quickly took her upstairs, and put her on a plastic sheet on the table. My grandma still had some anti-flea stuff (from around 1980 hahaha, but it did the trick) which we put on her, gave her some food and water, which she couldn't get to fast enough. My mom didn't want to hear any of it at first, and told me I couldn't keep her. but, still took me to the vet, and slowly changed her oppinion, and before we left the vet, she told me I could keep her anyway. She lived for at least 2 years, one day she just had no energy, I stayed up all night holding her, and she passed away very peacefull and quiet in my arms. I cried so much. :< She was the sweetest, most gentle creature I've ever seen. She never bit anyone, loved to be pet and given attention, she was very curious and intelligent compared to other rats, but also very calm, unless she wanted to play. And like hydro noticed with his rat, I noticed too, they behave a lot like dogs. TLDR; found a tame rat in my gandma basement, and kept it as a pet. The idea I have for the rats ingame is split them into "tame" and "wild" rats. Tame rat's won't survive on their own for long, and will get more and more rare over the first few months in game. Untill it's impossible to find them at all. Wild rat's won't be able to be tamed, or it's very very hard to do so if I decide to even add the possibility. If you do find a tame rat ingame, it'll be in a bad shape, and will need immidiate medical attention and feeding. But yes, I am all for having pet rats ingame, and making it worth the effort required to get one. ^__^ <3
  18. Is it me, or does 'rarely encountering other survivors' seem like a very logical scenario in a zombie appocalypse?
  19. No teasers today or tomorrow unfortunetly, however, I've started on the behaviour control systems which in it's current state already is a massive upgrade to how the animals work, and visually present themselves to the player <3
  20. Ice chests don't keep food colder, longer? Well frag. /player 1 dumps out 300 melon slices from the coleman. They are rotten. Hahahaha, yep, I had the same reaction. I've send Hydro the code to make it work howeve! So, it should be implimented to work soon ^__^
  21. easier way is: getPlayer():getCurrentSquare(); -- single player onlyor getSpecificPlayer(player):getCurrentSquare(); -- for multiplayer and single playerwhere 'player' is the number provided it most cases. with using ethanwdp's example you get: function ayyLmao(player) local sq = getSpecificPlayer(player):getCurrentSquare(); for i=0, sq:getObjects():size()-1 do local obj = sq:getObjects():get(i); print(obj:getSprite():getName()) endend
  22. Seeing a pack of dogs mow down a horde of zombies is very satisfying...

  23. Yes it's just a normal backpack with the sprite of a fridge. It's all about the lua stuff that gives things functionality. And no, that wouldn't make sense seeing it's not plugged in. XD Yeah I know , but I have been wanting to make a functional ice chest / cooler that keeps food cold in a bag. I know, and I just found a way... I want full credit for it however.
  24. You can't, you'll need do use lua for that. :/ here is a reference in a different post; http://theindiestone.com/forums/index.php/topic/16669-lua-spawning-an-item-using-oncreate/
×
×
  • Create New...