virginharvester Posted September 10, 2018 Share Posted September 10, 2018 sorry for my bad english,and sorry because its very basic,i have search in creationkit.com,but there no such as onplayerhealth(xx),my idea is createif player health is under 50%, the notification will tell it,any of you will tell me what that event called? Link to comment Share on other sites More sharing options...
SeraphimKensai Posted September 10, 2018 Share Posted September 10, 2018 You can do what you're looking for using variable conditions in the script. Mine you I'm not at a computer at the moment and only on my phone but you could try something along the lines of: Using the player's actorvalue for health and an if/else conditional that sets up if the player's health is at 50% or less do this, otherwise do this or nothing. Link to comment Share on other sites More sharing options...
TheWormpie Posted September 10, 2018 Share Posted September 10, 2018 You need to run very frequent updates using RegisterForSingleUpdate(secondstowait) and OnUpdate(), then check for what Seraphim said. Link to comment Share on other sites More sharing options...
foamyesque Posted September 10, 2018 Share Posted September 10, 2018 (edited) I would suggest, instead, adding an ability to the player, with a magic effect that has, as a condition of the effect in the spell window, GetHealthPercentage < 0.5. You can then put a script on the player (or the magic effect itself) and use OnMagicEffectApply (if on the player) or OnEffectStart (if on the magic effect) to effectively catch the event you're interested in. Edited September 10, 2018 by foamyesque Link to comment Share on other sites More sharing options...
virginharvester Posted September 10, 2018 Author Share Posted September 10, 2018 You can do what you're looking for using variable conditions in the script. Mine you I'm not at a computer at the moment and only on my phone but you could try something along the lines of: Using the player's actorvalue for health and an if/else conditional that sets up if the player's health is at 50% or less do this, otherwise do this or nothing.thanks, i will wait your script then Link to comment Share on other sites More sharing options...
virginharvester Posted September 10, 2018 Author Share Posted September 10, 2018 (edited) You need to run very frequent updates using RegisterForSingleUpdate(secondstowait) and OnUpdate(), then check for what Seraphim said.i just remember about it after you mention it, i am too focus about "onplayerhealth", thanks Edited September 10, 2018 by virginharvester Link to comment Share on other sites More sharing options...
virginharvester Posted September 10, 2018 Author Share Posted September 10, 2018 I would suggest, instead, adding an ability to the player, with a magic effect that has, as a condition of the effect in the spell window, GetHealthPercentage < 0.5. You can then put a script on the player (or the magic effect itself) and use OnMagicEffectApply (if on the player) or OnEffectStart (if on the magic effect) to effectively catch the event you're interested in.i never making ability before, is easy?, anyway thanks Link to comment Share on other sites More sharing options...
foamyesque Posted September 11, 2018 Share Posted September 11, 2018 I would suggest, instead, adding an ability to the player, with a magic effect that has, as a condition of the effect in the spell window, GetHealthPercentage < 0.5. You can then put a script on the player (or the magic effect itself) and use OnMagicEffectApply (if on the player) or OnEffectStart (if on the magic effect) to effectively catch the event you're interested in.i never making ability before, is easy?, anyway thanks It's not hard. Have you ever made any spell or magic effect before? Link to comment Share on other sites More sharing options...
TheWormpie Posted September 11, 2018 Share Posted September 11, 2018 Oh, yeah, Foamyesque is actually right, the ability method is better than what I suggested. Link to comment Share on other sites More sharing options...
virginharvester Posted September 11, 2018 Author Share Posted September 11, 2018 I would suggest, instead, adding an ability to the player, with a magic effect that has, as a condition of the effect in the spell window, GetHealthPercentage < 0.5. You can then put a script on the player (or the magic effect itself) and use OnMagicEffectApply (if on the player) or OnEffectStart (if on the magic effect) to effectively catch the event you're interested in.i never making ability before, is easy?, anyway thanks It's not hard. Have you ever made any spell or magic effect before? never, i just make new quest and put the script on it, do you have any link/guide about ability you taklking about? Link to comment Share on other sites More sharing options...
Recommended Posts