Jump to content

Checking Ingredient Count


LegendofThunder

Recommended Posts

I have a script that pushes every ingredient in the vanilla game through a counter:

Function ingCount(Ingredient iCur, Int stage, Int max, Int pLot)
    float CurrentCount = Game.GetPlayer().GetItemCount(iCur)
    
        if pLot == 0
            if CurrentCount > max
                CurrentCount = max
            endif
            pLOT01AbeceanLongfinCount.Value = CurrentCount
            UpdateCurrentInstanceGlobal(pLOT01AbeceanLongfinCount)
        endif

This is for the Abecean Longfin, if this was the Bear Claws then pLot would be 1 and the rest self explanitory. The end result also increases a global variable counting off how many ingredients have been maxed. Total should be 92.

Function CountAll()
    ingCount(pAbeceanLongfin, 30, 3, 0)
    ingCount(pBearClaws, 40, 1, 1)
    ingCount(pBee, 50, 2, 2)

This works completely and will count all ingredients off to the variable 'max' which is separate for each ingredient on how many are required. As I said, this works almost flawlessly, as when the script starts it begins with the Abecean Longfin.

 

This seems to be where the problem lies, as although every single other ingredient works without fail, the Abecean Longfin seems to get skipped, if I drop enough of them and then pick them up it counts but I need it to check these at the start of the quest in case the player has enough pre-questing to tick off the objective.

 

When the entire thing runs in game it ticks off every ingredient except the Abecean Longfin and the Total is set to 91 which is one short. The Abecean Longfin is the last step here and I can pretty much release this, which I am truly looking forward to as I've spent a good many hours developing this over the last week http://tesalliance.org/forums/public/style_emoticons/default/aa_smile.gif

 

Before anyone suggests it, I have also added the line: ingCount(pAbeceanLongfin, 30, 3, 0) onto the end of the function CountAll() and it still seems to get overlooked.

 

Can anyone help here? I'm fairly certain I've provided enough information but if not please ask me for what you may need http://tesalliance.org/forums/public/style_emoticons/default/aa_smile.gif

 

Thank you so much in advance

LoT

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...