Hi this is What I am trying to do.
Firstly I speak to an NPC, I want to hire an archer. So it cost me 1 gold.
Game.GetPlayer().RemoveItem(Game.GetForm(0x000000f),1) ;This remove 1 gold
Game.GetPlayer().placeActorAtMe(0Archer,1) ; This place an Archer next to me. Please note this is incorrect, I want to spawn this actor
on the Papyrus fragment in the Dialogue of a quest. PLEASE HELP ME on what is the correct
coding to use
0Archer is an NPC I have created.
Once the Archer is created, I wish to give this archer an item. Now I have a problem, if I need to give him an item I need a variable which had stored his information to call on.
To store the information of an object into a variable, I think you do this.
Objectreference A1= Game.GetPlayer().PlaceAtMe(Game.GetForm(0x0106eaf))
A1 is the variable, and the object,0106eaf, the formlist of my archer is stored in A1
Now, if I want to used this A1 variable on another quest, dialogue and papyrus fragment, how can this information be tranfer across, so for example I can go to a different quest, create this dialogue I can talk to the Archer, and give him a bow.
So if Objectreference A1= Game.GetPlayer().PlaceAtMe(Game.GetForm(0x0106eaf))
is created in a different quest, and papyrus fragment, how can this object information, stored in a variable can be transfer across.
One way is to use a Global Variable, but I don't know how to do it.