neahxx Posted October 24, 2018 Share Posted October 24, 2018 (edited) Hello fellow modders and DST players, I'm looking to check if a targeted player is a ghost. This is for a resurrection ability on a healing cane I'm working on. I'd be thankful for any advice! Edited October 24, 2018 by neahxx Link to comment Share on other sites More sharing options...
Ultroman Posted October 24, 2018 Share Posted October 24, 2018 I've been using this to check if people are dead. if self.inst.components.age and self.inst.components.age.last_pause_time then Link to comment Share on other sites More sharing options...
neahxx Posted October 24, 2018 Author Share Posted October 24, 2018 Thanks, I'll try that out. Then update this comment with the results. Link to comment Share on other sites More sharing options...
Ultroman Posted October 24, 2018 Share Posted October 24, 2018 Cool I'd like to know if there's a better way as well. Link to comment Share on other sites More sharing options...
Leonardo Cox Posted October 24, 2018 Share Posted October 24, 2018 (edited) Or you could just check if they have the "playerghost" tag. Alternatively theres also inst.components.health:IsDead() Edited October 24, 2018 by DarkKingBoo Link to comment Share on other sites More sharing options...
neahxx Posted October 24, 2018 Author Share Posted October 24, 2018 (edited) That sounds like a more efficient way indeed. Thanks, I'll try it. Edit: Example of how to check if player is ghost. In this case using target as player. if target:HasTag("playerghost") then "Stuff here" end Edited October 25, 2018 by neahxx Example of how to use. 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