The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to detect when player uses or drinks potion
Andris Offline
Junior Member

Posts: 3
Threads: 2
Joined: May 2019
Reputation: 0
#1
How to detect when player uses or drinks potion

Scenario in my custom story:  the player finds a health potion (laudanum) and when they drink it a specific event happens. I just don't know how to detect the moment when player drinks that potion. AddUseItemCallback() function (where asItem is health potion and asEntity is Player) is doesn't work even if player's health isn't full. Or it is not possible to do?
06-01-2019, 03:09 PM
Find


Messages In This Thread
How to detect when player uses or drinks potion - by Andris - 06-01-2019, 03:09 PM



Users browsing this thread: 1 Guest(s)