Jump to content

Final

Trade With Caution
  • Posts

    464
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by Final

  1. Sorry, I'm failing to see where you've specified your childhood nickname...
  2. Just a general observation, wouldn't it be easier for you and the user to be able to select an activity/task and then be capable of selecting a stopping condition/goal? So users could have more complex stopping conditions, rather than yourself creating specific task types.
  3. I wouldn't use this. Just because the user has a gold bar doesn't mean that he's smelting, something such as a level up or unwanted interaction could disrupt this, furthermore it's a while loop and there's clear reasons of why not to use a while loop within a script (a while loop).
  4. As many have stated previously, this is a logical error, I've posted on your original thread with the suitable fix for such an issue. The brief period in between the animation actually is no animation, the animation value returns to -1, meaning the player is no longer animating. However just because the player is no longer animating, does not mean by any margin mean that the player is not actively interacting with an object or is not queued to interact with the object more. I'd also recommend not sleeping your thread, that's lazy and bad practice for the solution you are looking to solve.
  5. EDIT: The following eliminates the issue of sleeping while proceeding with an action, as well as eliminating the issue of animations occurring only for a short period of time. When crafting you expect an experience gain every few seconds, let's use this to build a predetermined time in the future which we can check our previous crafting experience with our current crafting experience. We simply cache our crafting experience every 'check' before we are going to gain any new experience, every check, we get the current system time and add 4 - 6 seconds (the timeout essentially) to get our time for the next 'check'. In pseudo code the following would be it's own method: IF bar count = 0 THEN RETURN false END IF IF CurrentTime > LastCheckedTime + timeout THEN IF CurrentCraftingXP > PreviousCraftingXP THEN PreviousCraftingXP = CurrentCraftingXP LastCheckedTime = CurrentTime RETURN TRUE ELSE RETURN FALSE END IF ELSE RETURN TRUE END IF
×
×
  • Create New...