Frictional Games Forum (read-only)
Script that checks AMOUNT of an item - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+--- Thread: Script that checks AMOUNT of an item (/thread-56754.html)



Script that checks AMOUNT of an item - Rednie - 04-06-2020

Hi

I really need help with a script.
I want to create a function that checks the AMOUNT of an item (say: check if inventory has 10 of laudanum or if there is <10 of laudanum) in inventory.
Is it even possible in HPL2?


RE: Script that checks AMOUNT of an item - Mudbill - 04-07-2020

I don't think this is currently possible. You can hack a way to count how many have been picked up, but it would be hard to know if the player has used any. Technically with a looping timer, you could compare player health over time to see if it jumps by 25 at any points, and assume one has been used, but this is a lot of fiddling.


RE: Script that checks AMOUNT of an item - Rednie - 04-08-2020

(04-07-2020, 05:38 PM)Mudbill Wrote: I don't think this is currently possible. You can hack a way to count how many have been picked up, but it would be hard to know if the player has used any. Technically with a looping timer, you could compare player health over time to see if it jumps by 25 at any points, and assume one has been used, but this is a lot of fiddling.

Alright thanks! Smile