Jump to content

Nathan55

Members
  • Posts

    12
  • Joined

  • Last visited

Nexus Mods Profile

About Nathan55

Nathan55's Achievements

Apprentice

Apprentice (3/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. Scriptname EN_Actor_Interaction_Script extends activemagiceffect {Handles all interaction with NPCs.} Actor Property PlayerRef Auto GlobalVariable Property EN_GLO_PlayerDetected Auto Keyword Property ClothingBody Auto Keyword Property ArmorCuirass Auto Armor Property ClothesPrisonerRags Auto ReferenceAlias Property NakedNPC_01 Auto ReferenceAlias Property NakedNPC_02 Auto ReferenceAlias Property NakedNPC_03 Auto ReferenceAlias Property NakedNPC_04 Auto ReferenceAlias Property NakedNPC_05 Auto ReferenceAlias Property NakedNPC_06 Auto ReferenceAlias Property NakedNPC_07 Auto ReferenceAlias Property NakedNPC_08 Auto ReferenceAlias Property NakedNPC_09 Auto ReferenceAlias Property NakedNPC_10 Auto Actor thisActor int waitTime = 10 Event OnEffectStart(Actor akTarget, Actor akCaster) if !akTarget.WornHasKeyword(ClothingBody) && !akTarget.WornHasKeyword(ArmorCuirass) thisActor = akTarget if NakedNPC_01.GetRef() == none NakedNPC_01.ForceRefIfEmpty(thisActor) utility.wait(waitTime) while thisActor.GetItemCount(ClothesPrisonerRags) < 1 thisActor.AddItem(ClothesPrisonerRags) utility.wait(0.5) endwhile while !thisActor.WornHasKeyword(ClothingBody) && !thisActor.WornHasKeyword(ArmorCuirass) thisActor.EquipItem(ClothesPrisonerRags) utility.wait(0.5) endwhile NakedNPC_01.Clear() endif ;checkRef() elseif PlayerRef.IsDetectedBy(akTarget) EN_GLO_PlayerDetected.SetValue(1) endif EndEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) GoToState("DeadState") EndEvent State DeadState EndState Function checkRef() if NakedNPC_01.GetRef() == none NakedNPC_01.ForceRefIfEmpty(thisActor) utility.wait(waitTime) thisActor.AddItem(ClothesPrisonerRags) while !thisActor.WornHasKeyword(ClothingBody) && !thisActor.WornHasKeyword(ArmorCuirass) thisActor.EquipItem(ClothesPrisonerRags) utility.wait(0.5) endwhile NakedNPC_01.Clear() return elseif NakedNPC_02.GetRef() == none NakedNPC_02.ForceRefIfEmpty(thisActor) utility.wait(waitTime) while !thisActor.WornHasKeyword(ClothingBody) && !thisActor.WornHasKeyword(ArmorCuirass) thisActor.EquipItem(ClothesPrisonerRags) utility.wait(0.5) endwhile NakedNPC_02.Clear() return elseif NakedNPC_03.GetRef() == none NakedNPC_03.ForceRefIfEmpty(thisActor) utility.wait(waitTime) while !thisActor.WornHasKeyword(ClothingBody) && !thisActor.WornHasKeyword(ArmorCuirass) thisActor.EquipItem(ClothesPrisonerRags) utility.wait(0.5) endwhile NakedNPC_03.Clear() return elseif NakedNPC_04.GetRef() == none NakedNPC_04.ForceRefIfEmpty(thisActor) utility.wait(waitTime) while !thisActor.WornHasKeyword(ClothingBody) && !thisActor.WornHasKeyword(ArmorCuirass) thisActor.EquipItem(ClothesPrisonerRags) utility.wait(0.5) endwhile NakedNPC_04.Clear() return elseif NakedNPC_05.GetRef() == none NakedNPC_05.ForceRefIfEmpty(thisActor) utility.wait(waitTime) while !thisActor.WornHasKeyword(ClothingBody) && !thisActor.WornHasKeyword(ArmorCuirass) thisActor.EquipItem(ClothesPrisonerRags) utility.wait(0.5) endwhile NakedNPC_05.Clear() return elseif NakedNPC_06.GetRef() == none NakedNPC_06.ForceRefIfEmpty(thisActor) utility.wait(waitTime) while !thisActor.WornHasKeyword(ClothingBody) && !thisActor.WornHasKeyword(ArmorCuirass) thisActor.EquipItem(ClothesPrisonerRags) utility.wait(0.5) endwhile NakedNPC_06.Clear() return elseif NakedNPC_07.GetRef() == none NakedNPC_07.ForceRefIfEmpty(thisActor) utility.wait(waitTime) while !thisActor.WornHasKeyword(ClothingBody) && !thisActor.WornHasKeyword(ArmorCuirass) thisActor.EquipItem(ClothesPrisonerRags) utility.wait(0.5) endwhile NakedNPC_07.Clear() return elseif NakedNPC_08.GetRef() == none NakedNPC_08.ForceRefIfEmpty(thisActor) utility.wait(waitTime) while !thisActor.WornHasKeyword(ClothingBody) && !thisActor.WornHasKeyword(ArmorCuirass) thisActor.EquipItem(ClothesPrisonerRags) utility.wait(0.5) endwhile NakedNPC_08.Clear() return elseif NakedNPC_09.GetRef() == none NakedNPC_09.ForceRefIfEmpty(thisActor) utility.wait(waitTime) while !thisActor.WornHasKeyword(ClothingBody) && !thisActor.WornHasKeyword(ArmorCuirass) thisActor.EquipItem(ClothesPrisonerRags) utility.wait(0.5) endwhile NakedNPC_09.Clear() return elseif NakedNPC_10.GetRef() == none NakedNPC_10.ForceRefIfEmpty(thisActor) utility.wait(waitTime) while !thisActor.WornHasKeyword(ClothingBody) && !thisActor.WornHasKeyword(ArmorCuirass) thisActor.EquipItem(ClothesPrisonerRags) utility.wait(0.5) endwhile NakedNPC_10.Clear() return endif EndFunction Good citizen, foamyesque! I do believe you were barking up the right tree! This is the new script. I have placed the gathering of the clothes and the equipping of said clothes in while loops so it absolutely does equip clothing BEFORE the clear event. Seems that sometimes the clothing was not being equipped before the .clear() adding the NPC back to the alias, then stuff was happening that didn't release the actor from the alias even though they had clothing equipped.(I figured this out when I found multiples of the clothing in the NPC's inventory.) Also, I realize that .wait() is really not the best option and fully intend to remove it for a singleupdate once I wrap my head around how to do this with more than one alias.(I have RegisterForSingleUpdateGameTime()s in the other scripts that i've been working on.)(also, i understand that the checkRef() function is totally broken in the new script. It's still a work in progress.) I thank you for the first time, and then again. (P.S. Don't do that, you need those teeth. :laugh:)
  2. I think I'll replace ForceRefTo() with ForceRefIfEmpty() and see what happens.
  3. The "refNPC == None" should have prevented a double fill of the alias.(at least I think it should.) the conditions are: GetDead None == 0 HasMagicEffect "this magic effect" == 0 GetIsPlayableRace None == 1 Edit: the conditions are all set to "and" as well. Edit: Would a call for .Clear() not clear all fills anyway?
  4. Scriptname EN_Actor_Interaction_Script extends activemagiceffect {Handles all interaction with NPCs} Actor Property PlayerRef Auto GlobalVariable Property EN_GLO_PlayerDetected Auto Keyword Property ClothingBody Auto Keyword Property ArmorCuirass Auto Armor Property ClothesPrisonerRags Auto ReferenceAlias Property thisNPC_01 Auto ObjectReference refNPC Event OnEffectStart(Actor akTarget, Actor akCaster) refNPC = thisNPC_01.GetRef() if !akTarget.WornHasKeyword(ClothingBody) && !akTarget.WornHasKeyword(ArmorCuirass) && refNPC == none thisNPC_01.ForceRefTo(akTarget) utility.wait(5) akTarget.AddItem(ClothesPrisonerRags) akTarget.EquipItem(ClothingPrisonerRags) ;This action is completed thisNPC_01.Clear() elseif PlayerRef.IsDetectedBy(akTarget) EN_GLO_PlayerDetected.SetValue(1) endif EndEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) GoToState("DeadState") EndEvent State DeadState EndStateThat's the entire script. All properties are filled. I'm trying to get npcs to have a little self awareness when you steal their clothes and do something about it. Edit: this post was edited due to errors in the script(this was a recreation of the one originally used that didn't have these errors.) I also should mention that this is applied via a cloak.
  5. I'm trying to place actors into quest aliases to change their packages using "refAlias.ForceRefTo(akTarget)" from a magic effect. I can get them into the alias just fine, and the package is working. But, when I call refAlias.Clear(), nothing seems to happen.{the script compiled with the extends magiceffect so I figured it would work}{also, I had to manually fill the alias properties in the properties window.} akTarget just continues using the alias package. I've checked to see if the alias really wasn't clearing with "refAlias.GetRef() == none" as a condition on other actors and they were unable to enter the already filled alias.{was worried that the package had stuck onto the actor for some reason instead of the alias not clearing.} So i know .clear() isn't clearing the alias from the same magic effect that I used to fill it. I've also changed things up with where the ".clear()" script is located. If it's placed inside of the reference alias the alias will clear just fine. However, the way I'm using the alias, it would be much easier to just clear it with the same magic effect that filled it. Edit: The quest alias was tagged as optional as well. So, can I .clear() an alias from a magic effect? If not, can i clear them from the Quest Script? What is the standard for clearing multiple aliases in a quest one at a time?
  6. I only know of "onupdate()" polling. But you would have to "catch" the actor in the water for this to work. (Just an FYI, if you didn't already know, IsSwimming() is SKSE only.)
  7. @cdCooley: Weather.GetCurrentWeather().GetClassification() > 1 is exactly what I was wanting for the weather check. and it's so easy that I'm going to implement a clear weather check too. for the FindWeather(): It sounds like if i'm standing in Riften and run: Weather rainChk = Weather.FindWeather(2) it would return, rainChk = SkyrimOvercastRain ;or another type of rain that can be found at that location and if so; if I ran (still in Riften): Weather snowChk = Weather.FindWeather(3) would it return snowChk = None? @maxarturo This is some handy info, as i'm also wanting to cause the npcs around the player to bundle up if it's cold. Thanks bunches.
  8. I've started a simple temperature mod and want to check if it is currently raining or snowing. I've tried Weather.IsRaining(), Game.Weather.IsRaining(),Weather.GetCurrentWeather.IsRaining(), (weather, int, bool, float) weaChk = "all of the above" It doesn't say what to run this on in the CK wiki. Also, how exactly does findWeather() work? Does this mean that if the weather were bad right now, this would return what that would be.(e.g. Snowing, Raining) This could simplify the climate check because sometimes you're on a mountaintop and it would snow(cold climate), but rain at the mountain's base(warmer climate).
  9. Can you check to see if you're interacting with the navmesh? Edit: Not really sure if this will help, but. https://www.creationkit.com/index.php?title=OnCombatStateChanged_-_Actor If you read the notes on that page, it states: Combat state changes can only be detected by an Actor that is on the ground in contact with a navmesh. State changes cannot be detected on dragons while still in flight.
  10. Thanks for answer. I have SKSE, I'll look into that. Cheers!
  11. I'm thinking about making a combat mod that removes the damage applied directly through a number to your health bar, and instead adds wounds(bleeding damage) that will slowly chip at your health until you're too wounded and bleed out or you're out of combat and heal up. I also want to make it compatible with mods that delevel skyrim. To do this I have been thinking about solutions to bring OP enemies, and weak ones, in line with each other so that you can kill them in a similar amount of time. (armor and weapons being the factor instead of level) This is where spell magnitude comes into play. Is there a way to adjust the bleed damage of a spell so that you can remove a percent of health, instead of a hard number? (at 10%, an enemy with 100 health would lose 10hp per tic, and one with 1000 would lose 100 per tic). Also, is there a way to interrupt the vanilla application of damage to the player and NPCs? I think it's silly that a giant can kill a dragon so easily.
×
×
  • Create New...