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
Script Help Callback for using items on character
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: Callback for using items on character

If you mean on the player, then yes, but requires some setup. I don't think there are any quick and easy ways to check if a consumable item has been consumed, so you may have to use a repeating timer to continuously check for it with HasItem(). There are some issues with doing this however. It's much more safe and reliable to use an item combine callback.

As for run speed, easy enough with SetPlayerRunSpeedMul().

Attaching items to the player is possible, but I'm not certain how. I know it was done in one of the later The Small Horse parts, so might be worth checking. Perhaps it has something to do with the attach scripts.

Here's the example anyway (at 7:40 ish):
[video=youtube]https://youtu.be/HrDQtZ11UXQ?t=7m40s[/video]

(This post was last modified: 11-05-2017, 03:29 PM by Mudbill.)
11-05-2017, 03:21 PM
Find


Messages In This Thread
RE: Callback for using items on character - by Mudbill - 11-05-2017, 03:21 PM



Users browsing this thread: 1 Guest(s)