Deleted3507349User Posted May 2, 2013 Author Share Posted May 2, 2013 This works! Now if I can just understand WHY it works....because it looks to me like Variable01 would always be 0. Wait, I think I understand. Since the first effect has the condition IsSwimming==1 the first effect never ends as long as Nemo is is the water. So I guess this accomplishes via script what IsSwimming does, so why does doing it through script work and just using ABDamageConstant with the IsSwimming condition fail? Link to comment Share on other sites More sharing options...
blacksupernova Posted May 2, 2013 Share Posted May 2, 2013 This works! Now if I can just understand WHY it works....because it looks to me like Variable01 would always be 0. Wait, I think I understand. Since the first effect has the condition IsSwimming==1 the first effect never ends as long as Nemo is is the water. So I guess this accomplishes via script what IsSwimming does, so why does doing it through script work and just using ABDamageConstant with the IsSwimming condition fail?I think it's because when the fish first spawned, in water or not, it's in its default/idle state (condition Isswimming returns false) then switches to swimming if possible. Since the fish does not immediately swim when spawned, ABDamageConstant with Iswimming ==0 condition activates instantly, killing the fish before he can switch to swimming state. The aim of the two scripts is to buy the poor thing a little time before its fate is decided. If Isswimming could be used in script, only one script would be needed. Sadly, it can only be used for condition. Link to comment Share on other sites More sharing options...
Deleted3507349User Posted May 3, 2013 Author Share Posted May 3, 2013 That makes sense, thanks for the explanation. One more question; is 'Variable01' a hard-coded engine variable or one that was created by this script? What I'm concerned about is something from another mod (or the game itself) interfering with the function of this. For instance, according to http://www.creationkit.com/Actor_Value Variable01 is 'reserved'. Would it be better to declare a unique variable instead? Link to comment Share on other sites More sharing options...
blacksupernova Posted May 3, 2013 Share Posted May 3, 2013 variable01 is a hard-coded value but don't worry, changing the variable01 is the same as changing the health of a specific actor, it's safe. However, if you are uncertain about it, you can use other actor values. there is a long list of unused AVs and plenty of AVs that slaughterfish would never use (such as magicka, crafting skills, etc.). And if you still feel that using AVs is not safe, you can just make a new blank spell/perk and change the script so that, instead of modifying and checking AV, it adds and checks whether the fish has that blank spell/perk. The aim is just to get the second script something to check before killing the fish Link to comment Share on other sites More sharing options...
Deleted3507349User Posted May 3, 2013 Author Share Posted May 3, 2013 I think I understand, thanks for all your help! I probably will do that, just to avoid any conflicts down the road in the event someone else makes a mod that uses Variable01 for something. Kudos to you. Link to comment Share on other sites More sharing options...
Recommended Posts