Daimonicon Posted July 5, 2017 Share Posted July 5, 2017 (edited) Hi, i create my own mod for "horse feeding" to expand the experience with other Survival mods.its simple generally but works fine, but i'cant get success with checking the target. i start the "feeding" with a spell: Event OnEffectStart(Actor akTarget, Actor akCaster) EndEvent at my last step i want to add an check to get sure that the "Target" is only a "PlayerHorse" and thats the point iam going complet fail :-( I test the following parts: 1.) if Target.GetFactionRank(PlayerHorseFaction) >= 0 endif2.) if Target.GetFactionOwner() == PlayerFaction endif3.) if Target.HasKeyword(ActorTypeHorse) endif---Edit--- 4.) ;Race TargetRace = Target.GetRace() ;If TargetRace == HorseRace 1.) Its says ok on the Target Horse but also on ever NPC i'v found around2.) give me nothing3.) give also nothing - The Savegame is modded (Convenient Horse) so i think thats why the Keyword "ActorTypeHorse" not exists anymore ?---Edit--- 4.) That seams also not clearly identify the Owned Horse cause NPC says also OK The only good news is thats automaticaly forbidden to use the spell on not owned Horses but NPC .. :-( Has anyone a tip that is not so complex - My experience with papyrus is not that deep. Edited July 5, 2017 by Daimonicon Link to comment Share on other sites More sharing options...
foamyesque Posted July 5, 2017 Share Posted July 5, 2017 Check #1: Are the properties filled out? Link to comment Share on other sites More sharing options...
Daimonicon Posted July 5, 2017 Author Share Posted July 5, 2017 (edited) Yes, i think so.. Faction Property PlayerHorseFaction autoFaction Property PlayerFaction auto I use this two propertys that i had seen in an example. Edit:The Wiki says ("A non-negative number equal to the actor's rank in the faction."). Logoutput give me "1" for my owned horse and my follower give me "2". 20/20 NPC in Whiterun give me "2" so nearly all. If iam getting right by checking "==1" ? The code i got from example check ">= 0" this is true for nearly all :-) Edited July 5, 2017 by Daimonicon Link to comment Share on other sites More sharing options...
foamyesque Posted July 5, 2017 Share Posted July 5, 2017 Yes, i think so.. Faction Property PlayerHorseFaction autoFaction Property PlayerFaction auto I use this two propertys that i had seen in an example. Edit:The Wiki says ("A non-negative number equal to the actor's rank in the faction."). Logoutput give me "1" for my owned horse and my follower give me "2". 20/20 NPC in Whiterun give me "2" so nearly all. If iam getting right by checking "==1" ? The code i got from example check ">= 0" this is true for nearly all :-) This answer suggests that the properties aren't filled out, because you're responding with a code snip instead of the properties window of your script. Simply declaring properties in your script's code is not enough for a script to know what's inside them. Once you've compiled your script, you need to back out to the script area of whatever object you're attaching the script to, highlight the script you want to work on, and press the "Properties" button to the right. It will bring up the Properties window, where you can then fill in your properties. Link to comment Share on other sites More sharing options...
Daimonicon Posted July 5, 2017 Author Share Posted July 5, 2017 No, the propertys are filled: https://picload.org/view/rpoilacl/properties_01..jpg.html Link to comment Share on other sites More sharing options...
Recommended Posts