BasedBismuth Posted March 23, 2015 Share Posted March 23, 2015 I am currently working on a character mod that will start with a custom item that will spawn fireflies at the location the player is standing. I have this working to some degree (One hang up here is that the only way I could find to make it perform this function was to make it an equippable item that unequips after use. It works, but does not return to the inventory after being unequipped.), but that aside, I don't want this to be a free action. I would like some way of making the player lose 12 health when equipping the item (or better, a method of doing this that doesn't involve equipping the item.) Link to comment https://forums.kleientertainment.com/forums/topic/52306-need-help-creating-a-health-loss-penalty-for-a-custom-item/ Share on other sites More sharing options...
Blueberrys Posted March 23, 2015 Share Posted March 23, 2015 @BasedBismuth-- where inst is the player instance-- Use "GetPlayer()" in place of "inst" if you aren't sureinst.components.health:DoDelta(-12) Link to comment https://forums.kleientertainment.com/forums/topic/52306-need-help-creating-a-health-loss-penalty-for-a-custom-item/#findComment-624402 Share on other sites More sharing options...
BasedBismuth Posted March 23, 2015 Author Share Posted March 23, 2015 @BlueberrysThank you so much. GetPlayer( ) worked after I tried all sorts of things with inst. Link to comment https://forums.kleientertainment.com/forums/topic/52306-need-help-creating-a-health-loss-penalty-for-a-custom-item/#findComment-624423 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