icantevenname Posted April 20, 2018 Share Posted April 20, 2018 (edited) I want to make an item that, in addition to selfishly eat to max your stats, can revive a player. Preferably without the HP penalty. I've figured the selfishly eating part fine, but I'm struggling with making the item be able to be given to ghost to revive them. Any help? Edited April 20, 2018 by icantevenname Inconsistency to title Link to comment Share on other sites More sharing options...
RedHairedHero Posted May 17, 2018 Share Posted May 17, 2018 On 4/20/2018 at 12:06 AM, icantevenname said: I want to make an item that, in addition to selfishly eat to max your stats, can revive a player. Preferably without the HP penalty. I've figured the selfishly eating part fine, but I'm struggling with making the item be able to be given to ghost to revive them. Any help? Just going through old posts trying to help people out. The best way to find out how to accomplish this will be to pull up the Telltale Heart prefab aka reviver.lua. You can find this in the databundle folder under prefabs. Link to comment Share on other sites More sharing options...
icantevenname Posted June 17, 2018 Author Share Posted June 17, 2018 On 5/17/2018 at 5:53 PM, RedHairedHero said: Just going through old posts trying to help people out. The best way to find out how to accomplish this will be to pull up the Telltale Heart prefab aka reviver.lua. You can find this in the databundle folder under prefabs. That's the thing, I have and once more to make sure I didn't forget anything, but that file seems more focused on the heartbeat effect. If it's there, I don't see it... Link to comment Share on other sites More sharing options...
Hero Complex Posted June 19, 2018 Share Posted June 19, 2018 In the prefabs folder, take a look at player_common and player_common_extensions. There's functions throughout both of those files that are concerned with how players can be revived. I got some help with adding corpse functionality to a game mode and we went with rewriting some of those functions in an AddPlayerPostInit and by rewriting the action GIVETOPLAYER, but we could have made a custom component (which might work better in your case since it is just an item). I attached my modmain if you want to see what we did. Just look for AddPlayerPostInit (there's two that have functions relating to reviving), and one has the rewriting of the action right above it. But yeah, for an item, I would consider using a component instead and making a custom action to revive players using the functions in those player prefabs. modmain.lua Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now