Well, now that I get more familiar with the "attach property" and the "event triggering" things, I manage to write some valid compil-able scripts! HOORAH! ...BUT as I try it in-game, nothing happens. Here is my two setups for it.
First way: my "external" script is attached to a dialogue topic in a quest:
Scriptname ChooseNPCOutfit extends Actor
{choose NPC armor clothes default outfit}
Armor property ClothesFarmClothes04 Auto
Actor property akActor1 Auto
Actor property akActor2 Auto
Event OnStoryDialogue(Location akLocation, ObjectReference akActor1, ObjectReference akActor2)
akActor2.EquipItem(ClothesFarmClothes04)
Debug.Trace(akActor1 + " is talking to" + akActor2)
endEvent
I think these instructions are not running in-game 'cause I don't see any debug message!
Second way : End Papyrus fragment of the dialogue topic (localy edited). This code do not compile:
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 5
Scriptname TIF__01088B9B Extends TopicInfo Hidden
;BEGIN FRAGMENT Fragment_4
Function Fragment_4(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
Event OnStoryDialogue(Location akLocation, ObjectReference akActor1, ObjectReference akActor2)
akSpeaker.EquipItem(ClothesFarmClothes04)
endEvent
;END CODE
EndFunction
;END FRAGMENT
;END FRAGMENT CODE - Do not edit anything between this and the begin comment
Armor Property ClothesFarmClothes04 Auto
l
the compiler returns:
Here I am for now, stucked with this errors that I d'on't anderstand. I can't find a way out only reading the CK online Wiki refence by myself, so I need help again.