This Weapon Is Equipped Unequip It and Try Again
#1
Posted 29 Oct 2017 - 09:58 PM
lamentable my bad english, and lamentable if this is the wrong forum
how-do-you-do, i desire to make a script that makes: all actors wearing a specific item makes to unequip>equip that/a item when changing cells
simply like, i give a scripted ring to Cicero that makes to unequip>equip a sword(or the band) each time i change cells
the reason because i want to make this script is considering i'1000 using a Ten mod (HDT items) that add together tails,ears,etc, everything works fine, only when i change to some other cells, the tails/ears looks really weird on npcs, and only unequip and re-equip fix that, so this is the only mode to set up the mod i constitute, making a script, but i have 0 knowledge of scripting â , i was reading the Cosmos kit wiki, only basically i don´t empathise what im reading
if someone can help me how to make that script, i already take the empty script and the object with the empty script (the but phase that my brain could understand ), or links with the necessary to brand this script or merely hold my hand and guide me to the manner to make this script
, i will capeesh every help
-
Dorsum to top
#2
Posted 30 Oct 2017 - 05:57 PM
Are y'all by adventure using a skeleton mod? I'm quite certain mods that change that could be a conflict with your mod that adds ears and stuff.
Perhaps someone else tin help you further with your script! only I do suggest to remove that skeleton mod and try with a clean save.
-
Back to top
#3
Posted 30 October 2017 - 07:26 PM
thanks for the tip! im using XMPSE (XP32 Maximum Skeleton Extended) so i cant just remove information technology, it will break the game , anyways ears/tails doesn´t look really really weird (only becomes shorter than normal and HDT is unnoticeable) besides i don´t think is a skeleton effect, i think is a HDT upshot, because if i remove the XML attached in the .nif (ears/tails) it doesn´t look weird anymore, but lost HDT, if i adhere the XML over again and load the game, it looks weird once more until i re-equip information technology each load screen
Virtually the script, i think it should looks like this. Alarm, blench script inside
Spoiler
Event OnCellLoad()
endEvent
Part UnequipItem(Form akItem, bool abPreventEquip = false, bool abSilent = false) native
Game.GetPlayer().UnequipItem(The Ring)
endFunction
Function EquipItem(Form akItem, bool abPreventRemoval = faux, bool abSilent = false) native
Game.GetPlayer().EquipItem(The Band)
endFunction
how i can change Game.GetPlayer for Followers only? also what ways AkActor?, any player ?
also i should add "Armor belongings "The Ring" Auto"
"Actor property "Follower?" Machine" at the top?.
For what i understand, this script should practice
1Event: when the actor modify to another cells the functions will start
2Function: will unequip the ring from the followers wearing it
3Function:will equip the ring on all Followers that take the ring in his inventory
Those are the correct scripts? or i should add together more scripts to make it work â ?, also please assist me to modify information technology correctly
.
-
Back to acme
#4
Posted 30 October 2017 - 07:42 PM
This is a basic script, its non tested or anything. Im guessing y'all need this script active at all times so.. put it on alias quest
Spoiler
Histrion Property PlayerRef Motorcar ; references the thespian "you"
Armor Holding Item Machine ; references the item below. Property "Item" you lot can modify item to whatever, every bit long every bit its matching the script below. same with player
Event OnCellLoad()
PlayerRef.UnequipItem(Detail)
Utility.Look(0.ane)
PlayerRef.EquipItem(Item)
-
Dorsum to top
#5
Posted 30 October 2017 - 08:06 PM
ooh thanks, it should be similar this?
Spoiler
Actor Property PlayerRef Automobile
Armor Property TheRing Auto
Event OnCellLoad()
endEvent
Function UnequipItem(Form akItem, bool abPreventEquip = false, bool abSilent = false) native
PlayerRef.UnequipItem(TheRing)
endFunction
Utility.Wait(0.1)
Role EquipItem(Grade akItem, bool abPreventRemoval = false, bool abSilent = faux) native
PlayerRef.EquipItem(TheRing)
endFunction
i desire to make this script to impact followers but, and then is there a manner to modify the "Thespian Property"? like this
Actor Property FollowersRef Auto
FollowersRef.UnequipItem(Detail)
Utility.Wait(0.1)
FollowersRef.EquipItem(Detail)
Edited by NOOBIV, thirty October 2017 - 08:08 PM.
-
Dorsum to top
#6
Posted 30 October 2017 - 09:06 PM
But a bit more than scriptness. Maybe information technology is helpful for understanding. You need both scripts for the workaround you lot like to have.
NOOBIV_ItemPlayerAliasScript
Spoiler
Scriptname NOOBIV_ItemPlayerAliasScript extends ReferenceAlias {written by ReDragon 2017} ; attach this script to the actor alias, that is a office of a new created quest FormList fml ; empty formlist ; -- EVENTs -- 2 EVENT OnCellLoad() ;; Debug.Notification("new Cell has been loaded!") ;; myF_Item() ENDEVENT ; Outcome that is triggered when this player changes from 1 location to some other EVENT OnLocationChange(Location akOldLoc, Location akNewLoc) gotoState("Busy") Debug.Trace("PlayerAlias: one-time = " +akOldLocation+ ", new = " akNewLocation) myF_Item() gotoState("") ENDEVENT ;================================== country Busy ;yous have to cover the same event in no country ;========= EVENT OnLocationChange(Location akOldLoc, Location akNewLoc) ENDEVENT ;======= endState ; -- FUNCTIONs -- three ;----------------------------------------- FUNCTION myF_AddMe(NOOBIV_ItemEUScript ps) ; add to formlist, external called past "NOOBIV_ItemEUScript" ;----------------------------------------- ; https://www.creationkit.com/index.php?title=AddForm_-_FormList fml.AddForm(ps as Form) ENDFUNCTION ;-------------------------------------------- Office myF_RemoveMe(NOOBIV_ItemEUScript ps) ; remove from formlist, external chosen past "NOOBIV_ItemEUScript" ;-------------------------------------------- ; https://www.creationkit.com/index.php?title=RemoveAddedForm_-_FormList fml.RemoveAddedForm(ps as Form) ENDFUNCTION ;------------------ Role myF_Item() ;------------------ int i = fml.GetSize() WHILE (i > 0) i = i - 1 NOOBIV_ItemEUScript ps = fml.GetAt(i) as NOOBIV_ItemEUScript IF ( ps ) ps.myF_Action() ENDIF ENDWHILE ENDFUNCTION
NOOBIV_ItemEUScript
Spoiler
Scriptname NOOBIV_ItemEUScript extends ObjectReference {written past ReDragon 2017} ; adhere this script to the baseobject of your item, which should exist equipped/unequipped if thespian is changing the cell ; https://forums.nexusmods.com/index.php?/topic/6114328-unequipequip-script/ ; NOOBIV wrote: "I give a scripted ring to Cicero that makes to unequip/equip a sword(or the ring) each fourth dimension I change cells" NOOBIV_ItemPlayerAliasScript PROPERTY ps machine ; Exercise Not FORGET !!! to fill the property with NOOBIV_ItemPlayerAliasScript Actor myOwner ; -- EVENTs -- ; Event received when this object enters, exits, or changes containers Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) IF (akNewContainer as Actor) ELSE gotoState("Washed") ; ### STATE ### myOwner = None ps.myF_RemoveMe(self) Return ; - Stop - ring is thrown away or placed into barrel, sack or similiar container ENDIF ;--------------------- IF (akNewContainer equally Histrion == Game.GetPlayer()) gotoState("Done") ; ### STATE ### myOwner = None ps.myF_RemoveMe(self) Return ; - Finish - ring was given to the role player, exercise not equip by the player ENDIF ;--------------------- gotoState("Waiting") ; ### Land ### myOwner = akNewContainer as Actor ; make new owner persistent for a while ps.myF_AddMe(self) ENDEVENT ;============================== state Done ; exercise not track annihilation, in that location is no owner of this item ;========= endState ;============================== land Waiting ;============ ; Result received when this object is equipped by an thespian Issue OnEquipped(Thespian akActor) int i = (self as ObjectReference).GetFormID() Debug.Notification("Item " +i) ; info only ENDEVENT ; Event received when this object is unequipped by an histrion EVENT OnUnequipped(Actor akActor) ; int i = (self every bit ObjectReference).GetFormID() ; Debug.Notification("Item (un) " +i) ; info just ENDEVENT ;======= endState ; -- FUNCTION -- ;; Forces this actor to equip the specified item, preventing removal if requested ;Function EquipItem(Form akItem, bool abPreventRemoval = false, bool abSilent = false) native ;; Unequips the specified item from this actor ;Function UnequipItem(Form akItem, bool abPreventEquip = faux, bool abSilent = false) native ;-------------------- FUNCTION myF_Action() ; external called past "NOOBIV_ItemPlayerAliasScript" ;-------------------- IF ( myOwner ) myOwner.EquipItem(cocky as Course) Utility.Wait(0.1) myOwner.UnequipItem(cocky as Form) ENDIF ENDFUNCTION
posting edited 31-10-2017
Edited by ReDragon2013, 31 Oct 2017 - 06:13 AM.
-
Back to top
#7
Posted 30 October 2017 - 09:08 PM
I'k a fair fleck concerned about triggering this on "cell" changes. Walking around in the worldspace will cause this to happen A LOT! More specifically it sounds similar yous only want something that happens betwixt load doors. Sadly I don't accept a expert method for detecting and reacting to that. The all-time solution there I accept is monitor for location alter and check each fourth dimension if the reference went FROM an interior to an outside or the other way effectually or changed world spaces. There might too be times where you go from an exterior to an interior and the "Location" equally the game knows it is the same.
Now for your content posts to a higher place. The actual proper name of the holding makes no deviation. You could leave it PlayerRef. Yous tin change information technology to Alibaba if you want. It doesn't matter what information technology's called. What matters, is when you attach the script to an object in CK, that you assign the right affair to the property yous want the script to human activity on. If you have it named PlayerRef and use the autofill button (you accept to press the push on the backdrop window) so information technology volition fill the holding for you lot with the PlayerRef object. You tin can alter it later that equally well, just y'all volition need to do then before the mod is loaded and broiled into a save game. At the aforementioned fourth dimension if you renamed it to FollowersRef and hit autofill it will exercise naught, unless you have an actual object with the editor ID of FollowersRef. And so it will put that object in the holding. Otherwise if it fails to autofill and then yous have to manually fill up the holding or the script will get a "None" value.
Every bit y'all wrote the changes to the script it won't compile. You have calls to things in the context of the script exterior functions or events (Utility.Await) which are invalid. You likewise take the script events declared equally functions which are invalid. Y'all also take those same events doing redundant things. When unquipping, unquip? Then you're telling the script, when y'all unequip the ring from the object the script is running on, unequip information technology from the reference of the property. This is redundant considering information technology's already done, unless yous put the script on a different object and and then want it to trigger when you unequip from one object, also unequip from another.
In that location'due south another issue in that y'all accept the script reacting to different objects. If you have the script running on the player detecting when you alter areas and then trying to equip/unquip on another role player, you need to make certain that actor is nearby. Followers sometimes accept a while to move through load doors. You need the script to actually run on the follower itself and notice when the follower changes areas.
Unfortunately for what you're trying to do there's no existent elegant solution, merely crude hacks. Ane would be to run a quest with an allonym. Identify a script on the allonym to detect the movement changes and and then unequip/re-equip the item you lot desire on itself (the alias). So you put whatever reference you want in the alias. Information technology could exist the player, or a follower, whatever. However only 1 at a time. Though you tin can create multiple aliases and use the aforementioned script. Another solution that would support multiple objects at in one case would be to apply a magic effect. This would go something like, make ring with enchantment. The enchantment has a script that gets the call/area change. Then it equip/unequips an object divers by a property from the object the magic issue is on (the player).
My preferred method to endeavour and pull this off would exist the magic effect script. It would go something like this. Note: This script uses OnLocationChange to notice the move between areas and has no checking of any kind. This is a bad thought in practice because information technology will trigger more than necessary. This is but intended for example usage not for actual game play usage.
Scriptname TestEffect extends ActiveMagicEffect Actor myActor ; holder for the actor this script is affecting Armor Holding RecycleArmorObject auto ; the armor record to unequip and so re-equip Upshot OnEffectStart(Thespian akTarget, Histrion akCaster) myActor = akTarget ; this is necessary and so that other events tin act upon the actor the effect is running on EndEvent Outcome OnLocationChange(Location akOldLoc, Location akNewLoc) myActor.UnequipItem(RecycleArmorObject) Utility.Wait(0.1) ; this may be unnecessary and should be tested with and without information technology to meet which works every bit desired myActor.EquipItem(RecycleArmorObject) EndEvent
I don't believe the OnCellLoad() would work for what y'all're trying to exercise. Y'all would need to attach the script to an object other than the histrion or the follower that would be in the cell you're going into which would then become the effect when information technology loads. I don't come across an piece of cake way to accomplish that in any meaningful manner. The other effect is every bit I stated before, the follower you desire to act on may non be at that place yet when the event fires. I could be wrong, information technology would need more testing. If it does piece of work then my script above could be modified to use such.
Edit: changed the RecycleArmorObject to a holding. Oops.
Edited by BigAndFlabby, 31 October 2017 - 06:42 AM.
-
Back to top
#8
Posted 30 October 2017 - x:02 PM
thank you guys, i really capeesh your help , i don't want to exist abrasive, but u guys are my last hope. I volition try to exam/understand/change/accommodate both a postal service what i can go
-
Back to top
#nine
Posted 31 Oct 2017 - 01:45 AM
Spoiler
Just a bit more than scriptness. Maybe information technology is helpful for agreement. You need both scripts for the workaround you like to have.
NOOBIV_ItemPlayerAliasScript
Spoiler
Scriptname NOOBIV_ItemPlayerAliasScript extends ReferenceAlias {written by ReDragon 2017} ; attach this script to the histrion alias, that is a part of a new created quest FormList fml ; empty formlist ; -- EVENTs -- 2 EVENT OnCellLoad() ;; Debug.Notification("new Cell has been loaded!") myF_Item() ENDEVENT ; Event that is triggered when this actor changes from one location to another EVENT OnLocationChange(Location akOldLoc, Location akNewLoc) ;; Debug.Trace("PlayerAlias: one-time = " +akOldLocation+ ", new = " akNewLocation) ENDEVENT ; -- FUNCTIONs -- 3 ;----------------------------------------- FUNCTION myF_AddMe(NOOBIV_ItemEUScript ps) ; add to formlist, external called by "NOOBIV_ItemEUScript" ;----------------------------------------- ; https://world wide web.creationkit.com/index.php?championship=AddForm_-_FormList fml.AddForm(ps as Class) ENDFUNCTION ;-------------------------------------------- FUNCTION myF_RemoveMe(NOOBIV_ItemEUScript ps) ; remove from formlist, external called by "NOOBIV_ItemEUScript" ;-------------------------------------------- ; https://world wide web.creationkit.com/index.php?title=RemoveAddedForm_-_FormList fml.RemoveAddedForm(ps equally Form) ENDFUNCTION ;------------------ Part myF_Item() ;------------------ int i = fml.GetSize() WHILE (i > 0) i = i - 1 NOOBIV_ItemEUScript ps = fml.GetAt(i) equally NOOBIV_ItemEUScript IF ( ps ) ps.myF_Action() ENDIF ENDWHILE ENDFUNCTIONNOOBIV_ItemEUScript
Spoiler
Scriptname NOOBIV_ItemEUScript extends ObjectReference {written by ReDragon 2017} ; attach this script to the baseobject of your item, which should be equipped/unequipped if thespian is changing the cell ; https://forums.nexusmods.com/alphabetize.php?/topic/6114328-unequipequip-script/ ; NOOBIV wrote: "I give a scripted ring to Cicero that makes to unequip/equip a sword(or the ring) each time I change cells" NOOBIV_ItemPlayerAliasScript PROPERTY ps auto ; Do NOT FORGET !!! to fill the holding with NOOBIV_ItemPlayerAliasScript Player myOwner ; -- EVENTs -- ; Outcome received when this object enters, exits, or changes containers EVENT OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) IF (akNewContainer as Role player) ELSE gotoState("Washed") ; ### STATE ### myOwner = None ps.myF_RemoveMe(self) RETURN ; - Terminate - ring is thrown away or placed into barrel, sack or similiar container ENDIF ;--------------------- gotoState("Waiting") ; ### Country ### myOwner = akNewContainer as Thespian ; brand new owner persistent for a while ps.myF_AddMe(self) ENDEVENT ;============================== state Washed ; do not track anything, there is no owner of this item ;========= endState ;============================== state Waiting ;============ ; Event received when this object is equipped by an thespian Consequence OnEquipped(Actor akActor) int i = (self as ObjectReference).GetFormID() Debug.Notification("Item " +i) ; info only ENDEVENT ; Consequence received when this object is unequipped by an actor EVENT OnUnequipped(Actor akActor) ; int i = (cocky equally ObjectReference).GetFormID() ; Debug.Notification("Detail (united nations) " +i) ; info but ENDEVENT ;======= endState ; -- FUNCTION -- ;; Forces this actor to equip the specified item, preventing removal if requested ;Part EquipItem(Class akItem, bool abPreventRemoval = fake, bool abSilent = imitation) native ;; Unequips the specified item from this histrion ;Function UnequipItem(Grade akItem, bool abPreventEquip = false, bool abSilent = simulated) native ;-------------------- Role myF_Action() ; external called by "NOOBIV_ItemPlayerAliasScript" ;-------------------- IF ( myOwner ) myOwner.EquipItem(self as Form) Utility.Wait(0.i) myOwner.UnequipItem(self as Grade) ENDIF ENDFUNCTION
i appreciate your hard work, simply i don´t know how to adapt those scripts to what i need, thanks anyways, all info and examples are useful for me
Spoiler
BigAndFlabby
I'm a off-white bit concerned about triggering this on "cell" changes. Walking around in the worldspace will cause this to happen A LOT! More specifically it sounds similar y'all only want something that happens betwixt load doors. Sadly I don't take a practiced method for detecting and reacting to that. The best solution there I have is monitor for location change and cheque each fourth dimension if the reference went FROM an interior to an exterior or the other manner around or changed world spaces. There might as well be times where you lot go from an exterior to an interior and the "Location" as the game knows it is the same.
Now for your content posts above. The bodily proper name of the property makes no divergence. You could leave it PlayerRef. Yous can change it to Alibaba if yous want. It doesn't matter what it'due south called. What matters, is when you attach the script to an object in CK, that you assign the right matter to the property you desire the script to act on. If you accept it named PlayerRef and use the autofill button (you accept to press the push on the properties window) then it volition fill the property for y'all with the PlayerRef object. You lot can modify information technology after that likewise, just you will demand to do so before the mod is loaded and broiled into a save game. At the same time if you renamed it to FollowersRef and hit autofill it will do zero, unless you have an actual object with the editor ID of FollowersRef. Then it will put that object in the belongings. Otherwise if it fails to autofill then yous have to manually fill the property or the script will become a "None" value.
As you lot wrote the changes to the script it won't compile. You take calls to things in the context of the script exterior functions or events (Utility.Look) which are invalid. You also have the script events declared as functions which are invalid. You also have those same events doing redundant things. When unquipping, unquip? So you're telling the script, when you unequip the ring from the object the script is running on, unequip it from the reference of the belongings. This is redundant because it'south already washed, unless y'all put the script on a different object and so want information technology to trigger when you lot unequip from one object, also unequip from another.
There'south another issue in that you lot have the script reacting to different objects. If you have the script running on the thespian detecting when you lot change areas and then trying to equip/unquip on another actor, you demand to brand sure that actor is nearby. Followers sometimes take a while to move through load doors. You need the script to actually run on the follower itself and observe when the follower changes areas.
Unfortunately for what you're trying to do there's no real elegant solution, only rough hacks. I would be to run a quest with an alias. Place a script on the alias to detect the movement changes and so unequip/re-equip the particular you want on itself (the alias). So you put whatsoever reference you want in the alias. It could exist the player, or a follower, whatever. However only ane at a fourth dimension. Though you can create multiple aliases and use the same script. Another solution that would back up multiple objects at once would be to use a magic effect. This would become something similar, make ring with enchantment. The enchantment has a script that gets the phone call/surface area change. Then information technology equip/unequips an object defined by a property from the object the magic effect is on (the actor).
My preferred method to try and pull this off would be the magic effect script. Information technology would go something like this. Note: This script uses OnLocationChange to detect the motion betwixt areas and has no checking of any kind. This is a bad idea in practice considering it volition trigger more than than necessary. This is just intended for example usage non for actual game play usage.
Scriptname TestEffect extends ActiveMagicEffect
Actor myActor ; holder for the histrion this script is affecting
Armor RecycleArmorObject ; the armor tape to unequip and then re - equip
Upshot OnEffectStart ( Actor akTarget , Actor akCaster )
myActor = akTarget ; this is necessary so that other events can act upon the player the upshot is running on
EndEvent
Event OnLocationChange ( Location akOldLoc , Location akNewLoc )
myActor . UnequipItem ( RecycleArmorObject )
Utility . Wait ( 0.1 ) ; this may be unnecessary and should be tested with and without it to encounter which works equally desired
myActor . EquipItem ( RecycleArmorObject )
EndEvent
I don't believe the OnCellLoad() would piece of work for what you're trying to do. Yous would need to attach the script to an object other than the role player or the follower that would be in the cell you're going into which would then get the result when it loads. I don't see an like shooting fish in a barrel way to attain that in any meaningful manner. The other issue is as I stated earlier, the follower you lot want to act on may not be in that location yet when the outcome fires. I could be wrong, information technology would need more testing. If information technology does work and then my script in a higher place could be modified to use such.
yous opened my optics most the script, this info is really useful for me, you fabricated to jump my understanding from 3% to l%, besides you answered a lot of questions that i forget to inquire, thanks!
So this line is unnecessary
Part UnequipItem(Grade akItem, bool abPreventEquip = false, bool abSilent = simulated) native
and deplorable, i had other understanding about "OnCellLoad" i will apply "OnLocationChanged" so.
this is what i understand and did
Spoiler
1.Added a Thespian Property (Ahri)
1.png 14.38KB 1 downloads
2.Added a Armor Holding (TheRing)
ii.png 13.22KB 0 downloads
iii.And pressed "Auto-Fill All", at present the Script Looks like this
Scriptname ReEquipRing extends ActiveMagicEffect
Actor Property Ahri (My Follower) Machine
Armor Property TheRing (JewelryRingGold the existent object name with this script attached) Auto
Event OnEffectstart(Actor akTarget, Actor akCaster)
Ahri = akTarget
EndEvent
Upshot OnLocationChange(Location akOldLoc, Location akNewLoc)
Ahri.UnequipItem(TheRing)
Utility.Wait(0.1)
Ahri.EquipItem(TheRing)
EndEvent
and Saved without a fault message.then this script should do
1.When the Player (Ahri) change to another prison cell (Event OnLocationChange)
2.The Ring (TheRing"JewelryRingGold") volition be unequipped from Player (Ahri)
3.The Ring (TheRing"JewelryRingGold") volition exist Equipped to Player (Ahri)
But before test it in game i accept some questions
what means akTarget, akOldLoc, i mean, what ways "ak"? what i understand it ways "AnyTarget, AnyOldLocation"
Also i should 1. attach the Script to the Particular that should be Unequipped-Equipped?, or two. Attach the Script to an Item that makes another detail to be Unequipped-Equipped?
what i mean, i should make a Scripted GoldRing to Unequip-Equip the same GoldRing with the Script. or i should brand a Scripted SilverNecklace to Unequip-Equip the GoldRing
Please take patience, im not a english speaker, and then i retrieve this will add some walls in the manner
-
Back to top
#10
Posted 31 October 2017 - 06:49 AM
To start with your questions:
The ak prefix doesn't hateful annihilation special. Variable names can be named simply nigh anything you want.
Effect OnEffectstart(Actor akTarget, Actor akCaster)
This means that when the result is triggered then inside the event telescopic it volition accept a variable named akTarget which is of type role player and another variable named akCaster which is too of type actor. The names akCaster and akTarget are completely capricious. They could merely as hands be "me" and "y'all" though that would be really disruptive to the programmer I would think. Typically programmers volition name their variables with descriptive names then they don't forget what they are. In this case the ak prefix doesn't actually mean annihilation particular. In the future y'all may meet other scripts where people may proper name the variables with b or i prefixes, similar bTargetDead which would typically be a boolean type or iCounter for an integer. In truth the variables can be named just about anything you want every bit long as information technology isn't a reserved name or i that is already used. But since nearly people either copy and paste from the wiki or the base script definition they usually leave them every bit Bethesda wrote them. Bethesda decided that when the event is called it volition be passed 2 parameters. The starting time beingness the target actor and the second existence the casting actor. Depending on what the magic effect does they may be the same reference. Similar casting a self healing, the target and caster is the aforementioned actor reference.
The script every bit I wrote it would go on a magic effect. You lot would create a magic effect, attach the script to that. Then create an object enchantment which uses that magic effect. Then on an armor or weapon attach the enchantment. You can look at the StaffFirebolt "Staff of Firebolts" weapon to see how the hierarchy goes. That weapon has an enchantment named StaffEnchFirebolt "Firebolt" which has a magic effect FireDamageFFAimed "Firebolt" which has a script on it. A similar thing tin be done for armor. You lot can expect at whatsoever armor with the kickoff name Ench to see how the object effect is attached and then linked to a magic effect.
Only to reiterate, this script will proceed a magic consequence that needs to be on the follower since it sets the actor to equip/unquip from as the target of the magic effect. So you lot would brand a band with an enchantment that the follower will and then equip. If you're trying to make a ring that y'all vesture then this script will not piece of work without some adequately major and probable complex changes.
At that place's no need for Ahri to be a property prepare in CK since yous're assigning the value in the OnEffectStart effect. Using a local script variable would exist better. Changing the line to merely this will practise exactly the aforementioned thing and does not classify the extra memory required for a holding
Actor Ahri
-
Back to top
campbellthellesto.blogspot.com
Source: https://forums.nexusmods.com/index.php?/topic/6114328-unequipequip-script/
Post a Comment for "This Weapon Is Equipped Unequip It and Try Again"