Jump to content

Stormy

Member
  • Posts

    64
  • Joined

  • Last visited

About Stormy

  • Birthday 07/04/1983

Profile Information

  • Gender
    Man

Recent Profile Visitors

1017 profile views
  1. Stormy

    Reloaded

    "In the current version of PZ, the code that makes up the reloading system is huge. It became a problem for both ourselves and modders to make changes" Uh... apologies. In my defence my coding has got a lot better.
  2. Stormy

    Launch Procedures

    Not gone forever. This makes me happy
  3. Last time I checked it's stored as a client side variable. It should be possible for the server to 'push' this variable to each client on connect.
  4. I'm at work so I can't see the fields but here we go... The principle of the setUpGun method is to determine whether the item that has been clicked on is a reloadable item..... It checks that there is a corresponding lua weapon type (which was created and added into ReloadUtil:addWeaponType(wepBow1)) for the item that was clicked on and uses the item name to do so. If it finds one, it looks at the lua weapon type's reloadClass field... and then sets up the item to use the corresponding lua file for performing the reload activities. It is important to remember that this is done once for an item. After the first time, it uses the item's modData (information about the item that is saved out each time PZ saves). One of the pieces of information saved is the reloadClass. What I want to do is twofold... 1. Everytime you see an if statement checking the reload class in the two functions I mentioned, print the reloadClass before the if statement so we can make sure it is correct. 2. Make sure you are using a clean save so that nothing incorrect has persisted. I'll admit the reloading stuff can be a bit confusing. I can try the script myself and see if it works. Is there anything in addition to the snippets you've posted to test this?
  5. Keep noticing something new each time I look. The command window screenshot you posted says that the error occurs in ISSemiAutoWeapon.lua. However, the file that it should be using is ISShotgunWeapon. This is determined by: reloadClass = 'ISShotgunWeapon'. Why it is using the wrong one for this weapon only I still can't understand. From a new game, put a bunch of print statements in the ISReloadUtil:setUpGun(weapon) function and the ISReloadUtil:syncItemToReloadable(item) function. Try and determine why it would be going into the ISSemiAutoWeapon branches of each of those.
  6. Ok... as a sanity check, can you just try removing the space from the item name.... 'Homemade Bow' -> 'HomemadeBow' Also, check every field in the item (I can't remember and don't have the code in front of me... apologies). My concern is that one of the reloading scripts is using the name to identify the weapon type and there is some sort of mismatch or the name is null
  7. Can you check that wepBow1 variable is assigned immediately after creating it (do a print statement or something). The complaint is that it can't find the ammoType field in a null table.... i.e the table doesn't exist. I'm concerned the assignment to the wepBow1 variable is being lost somehow.... Things to try: 1. Change the variable from local to global by removing the local keyword.... Maybe the table is being deleted. 2. Check the addWeaponType function is actually working. Put some print statments in the reload util lua
  8. Sorry. I guess I should have read the problem properly.... When writing lua scripts loops can not be used to wait for something to happen. Nor can you tell the thread to sleep for a little bit. Essentially doing so will cause the entire game to wait for the loop to finish and since the game never changes state, the game time is never increased and your while loop will always return false, waiting for eternity. What I think people tend to do is add functions into the onTick event of the game. Something like, local startTime = GameTime:getInstance():GetMinutes()local myFunction = function() local currentTime = GameTime:getInstance():GetMinutes() if(currentTime == startTime+5) print('5 minutes has passed') endendEvents.OnTick.Add(myFunction)Essentially you should think of tha game as being one massive loop. Everything in the Events.OnTick collection is executed once every cycle of that loop. There is a more complex solution in this thread: http://theindiestone.com/forums/index.php/topic/1931-how-to-delay-processing-of-a-function/
  9. Object tried to call nil is referring to the method getMinutes() which is doesn't exist in your code. The way you are calling it, you would need your own lua function called getMinutes(), wheras what I think you want to do is call: GameTime:getMinutes() or GameTime.getMinutes() I'm not sure which off the top of my head. Essentially you need to specify that you want to call the getMinutes() function on the GameTime object. In short replace line 29 with mins = GameTime:getMinutes() You may need to change the colon to a period... I've not used lua in ages.
  10. Do item files permit free text such as The CureCreated by BassairFor Steam Build 21 Where exactly is the crash? (Posting from work)
  11. It's actually "Themâ„¢" Can't infringe on that copyright. OT: What's wrong with just calling them zombies? That's what they are in the end. I think the canon for most zombie's is that the concept has never been encountered before in any context unlike vampires/werewolves which have a richer legend. I think the battery (http://www.imdb.com/title/tt2272350/) is the only one to have actually referred to them as zombies and even then it's reluctantly.
  12. Presumably the intention would be it is either an acquired skill or a very expensive feat and wouldn't be every man and his dog. This idea is very doable. The decay slightly harder due to the map streaming.
  13. Stormy

    Explosions - again

    I think in that one you're looping through the surrounding tiles without taking into account walls that might be blocking the route. I could be wrong and have been wasting my time.
  14. Stormy

    Explosions - again

    http://youtu.be/5Yqp2tpR9ws
×
×
  • Create New...