s_f Posted July 11, 2021 Share Posted July 11, 2021 (edited) EDIT: nvm. solved it myself. The solution is as follows (for people who might need it) ---- -- Assume that we have a scriptItem we get from getSCcriptManager():getAllItems() local scriptItem = ... -- the way to access some properties/methods like MaxAmmo and MagazineType is to use the id to create an InventoryItem local item = InventoryItemFactory.CreateItem(scriptItem:getFullName()) -- then we can access those properties local magazineType = item:getMagazineType() local maxAmmo = item:getMaxAmmo() Hope this is useful for somebody ---- I supposed that getScriptManager():getAllItems() returns all item definitions in the game as a Item type. However, it does not seem to have some methods/properties that the in-game InventoryItem type does for example getMagazineType()/MagazineType getMaxAmmo()/MaxAmmo Both the methods and the properties are undefined. How could I get such properties from the Item type (returned by getAllItems)? Thanks in advance Edited July 16, 2021 by s_f Link to comment Share on other sites More sharing options...
s_f Posted July 14, 2021 Author Share Posted July 14, 2021 seems like the modding community (for scripting) is either not very active, or this forum isn't the place? If anybody know of a better place to get help on scripting, please give me the directions. It will be very much welcomed. Or it may seem that my foray into PZ modding have to be ended prematurely... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now