Jump to content

Search the Community

Showing results for tags 'Type'.

  • 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 3 results

  1. While coding my mod I faced with another problem. I'm trying to make a character say a phrase when dressing a certain item. I tried to implement this with Events.OnClothingUpdated.Add(). When this event was called, it was checked whether this item (CI141.KRNDHazmat) was dressed. I did this through a method getBodyLocation() ~= "". But every time it gave an error. I suspect that the problem is that item CI141.KRNDHazmat belongs to a different class, but getBodyLocation() method belongs to the class Clothes. But no matter how hard I tried, I couldn't determine the class of the object CI141.KRNDHazmat. I need help from someone who understands. I paste code below. Script [media/scripts/CI141_items.txt] item KRNDHazmat { DisplayCategory = Clothing, Type = Clothing, DisplayName = KRND Hazmat Suit, ClothingItem = CI141_KRNDHazmat, BodyLocation = FullSuitHead, Icon = KRNDHazmat, BloodLocation = Trousers;Jumper, Icon = Hazmatsuit, RunSpeedModifier = 0.75, ScratchDefense = 25, BiteDefense = 25, Insulation = 0.65, WindResistance = 0.9, WorldStaticModel = Hazmat_Ground, } the .xml file works fine, so I don't see the point in attaching it here LUA [media/lua/client/CI141_maincore.lua] function HazmatvoiceFc(player) local hazmat = "CI141.KRNDHazmat" if player:getInventory():contains(hazmat) then if hazmat:getBodyLocation() ~= nil then <- Error comes from this line player:Say("TESTPHRASE") end end end Events.OnClothingUpdated.Add(HazmatvoiceFc)
  2. This has been suggested years ago, and never really got any play.... so I thought I'd suggest it again, along with the quick fix that I'm using. I've always found that before I could start playing the game, I'd have to resize the "TYPE" column in the inventory window because it was too narrow and did not show the quantity of most long named items (such as ORGM ammo names)... However, every once in awhile, more often than not, closing and reopening the inventory window later would reveal the column width had reset back to default.... So rather than wait for a fix, I just made a simple mod to change the default size of the "TYPE" column width. Presto!!! columns are sized correctly and do not revert back to backwards mode.... Yay!!
  3. I found a Class Radio in the javadocs. Is this still alive? If i wanted to create an item out of it, what entry do i need for 'Type = ...' in the txt.file? Or even better: How would i use setClass()/setCat() via lua correctly?
×
×
  • Create New...