Frictional Games Forum (read-only)

Full Version: Callback for using items on character
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello again, is it possible to make item that can be used on character himself and for example he begins to move at double speed? Is it possible to make callback for using items on character himself? Is it possible to attach an item to character like a second lantern(Penumbras light rod)? Huh
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]
Thank you!
I think it also has to do with a certain kind of objects that move to the side when you grab them.
(In ModelEditor go to Settings-> User Defined Variables -> Type:Object -> SubType: Grab, scroll down and check "Grab Use Offset" and then play around with the numbers below)
How the object keeps being held without player's input is a mystery to me. Perhaps some rare script was used.