Jump to content

[LE] Unequip>Equip script


NOOBIV

Recommended Posts

The ak prefix actually does mean something -- just not to the compiler. By convention, arguments passed to events and functions are prefixed with 'a', and also by convention, objects with k. Strings get s, integers i, booleans b, and floats f.

 

It isn't followed everywhere, but it's reasonably common. This is why, for example, kmyQuest is named what it is.

Link to comment
Share on other sites

The ak prefix actually does mean something -- just not to the compiler. By convention, arguments passed to events and functions are prefixed with 'a', and also by convention, objects with k. Strings get s, integers i, booleans b, and floats f.

Â

It isn't followed everywhere, but it's reasonably common. This is why, for example, kmyQuest is named what it is.

Ooh that actually makes sense. I actually learned something for a change. Thanks.

Link to comment
Share on other sites

so the script looks like this, i made a ActiveEffect and added the script, added the "ActiveEffect" to a new Enchantment, but now, i should add this "Enchantment" to the same ring that i want to be Unequipped-Equipped, or i should add this "Enchantment" to a SilverRing to Unequip-Equip the GoldRing (With both equipped on Ahri)
What i understand, if i add this Enchantment to the same ring, when the ring is Unequipped, it will lost the ActiveEffect and don´t gonna Equip the ring again ?

Scriptname TheRingReEquip extends activemagiceffect
Actor Ahri
Armor Property GoldRing Auto
Event OnEffectStart(Actor akTarget, Actor akCaster)
Ahri = akTarget
EndEvent
Event OnLocationChange(Location akOldLoc, Location akNewLoc)
Ahri.UnequipItem(GoldRing)
Utility.Wait(0.1)
Ahri.EquipItem(GoldRing)
EndEvent

 

also, how i should set those new effect and enchantment, or this really doesn't matter?

Efecto Constante = Constantly Effect

Uno Mismo = Itself

Encantamiento = Enchantment

 

 

 

 

 

 

 

thanks :happy:

 

Edit: looks like the script doesn't work, i tested both and the ring is not being unequipped/equipped (also i set Utility.Wait(10.0) to see if it's unequipped at least) or maybe i did something wrong, or didn´t config the effect properly :sad:

 

Edit 2:

this is exactly what i did

0.Open creation kit and load Skyrim.esm Update.esm "Tailsmod.esp" (just an example)
1.Created a new "Magic Effect" and named it
ID: TheRingEquipME
name: TheRingEquipME
Effect Archetype: Value Modifier
Casting Type: Constantly Effect
Delivery: Itself
2.Added a new script named "TheRingEquipAF" and added a new Armor Property
type Armor
Name BlueTail (the armor i want to be unequipped/equiped)
initial Value: (i had to add the armor name here? i think is auto-filled)
now looks like this
Property Name Type Value
BlueTail Armor BlueTail (Object Picked = BlueTail)
3.Press Auto-Fill All and the script goes like this
Scriptname TheRingEquipAF extends activemagiceffect
Armor Property BlueTail Auto
and i added this lines manually:
Scriptname TheRingEquipAF extends activemagiceffect
Actor Ahri
Armor Property BlueTail Auto
Event OnEffectStart(Actor akTarget, Actor akCaster)
Ahri = akTarget
EndEvent
Event OnLocationChange(Location akOldLoc, Location akNewLoc)
Ahri.UnequipItem(BlueTail)
Utility.Wait(4.0) (if the follower takes some time to appear this one can be used to delay the script?)
Ahri.EquipItem(BlueTail)
EndEvent
and saved successful and press OK to create the new "Magic Effect"
4.Created a new "Enchantment" and named it "TheRingEquipEncht"
ID TheRingEquipEncht
Name TheRingEquipEncht
in the Effects window added a new Effect "TheRingEquipME"
now the Enchantment have a new Effect (TheRingEquipMe : Health)
press OK to create the new Enchantment
5.i duplicated a "JewelryRingGold" and named it "TheRingEquip"
ID "TheRingEquip"
Name "The Amazing Ring"
Enchanting "TheRingEquipEncht"
press Ok to create the new Ring
and about the BlueTail
ID: BlueTail
Name: A Amazing Blue Tail
Enchanting: NONE
now this should do:
When Ahri have the "The Amazing Blue Tail" (BlueTail) equipped and the "The Amazing Ring" (TheRIngEquip<TheRingEquipEncht<TheRingEquipME<TheRingEquipAF) equipped, when i join to the "The Bannered Mare" and Ahri follow me inside, TheRingEquip should unequip the BlueTail, and wait 4 seconds, then equip the BlueTail again, and do exactly same when i go out of "The Bannered Mare"
But nothing is happen :unsure:

Edited by NOOBIV
Link to comment
Share on other sites

Ok sorry, my post last night was incomplete (my fault). It was late and I skipped over some things.

 

The magic effect archetype should be "Script", casting type "Constant Effect", under flags you want "No Duration" "No Area" and "No Magnitude". I didn't make a script to illustrate in the screenshot but I would imagine you can handle that part on your own.

 

 

 

MeNNOA6.png

 

tqkbH7y.png

 

9BepWiv.png

 

 

 

Remember the follower is the one who needs to wear the ring to have the tail un-equipped and re-equipped.

Link to comment
Share on other sites

i appreciate you take your time to help me without looking for a reward, seriously, thanks :smile:

yes, i always equip the items on the follower (Ahri)

sorry, i don't know what exactly modify in the script, i just made everything again and use the names from your images to make it more simple (the name really dont care me XD) and this time i'll use "ClothesWeddingDress" as example instead of "BlueTail"
when i save in creation kit, it makes a new .esp and i must add the Tails.esp as Master,<--- just ignore this
First i created the Magic Effect to make the Script

rSD5J8E.jpg
49ZVmbd.jpg
TShpkpB.jpg
SpXvZ6n.jpg
C7YwUtb.jpg
HbzNtPd.jpg
2FB0E9H.jpg

And Saved the new .esp
i will give the Scripted Ring from the new .esp and the ClothesWeddingDress (from Skyrim.esm) outfit to Ahri or i should edit the Script before test ingame? :ohmy:
Edit: i'm doing something wrong, because didn't work :sad:
Edit2: i was seeing examples and looks like the script is ok, but im missing something in creationkit
Edited by NOOBIV
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...