Originally Posted by arsenalforever
I compiled the script, got no errors and saved an nss file on the desktop (got an ncs file too). Now how do I get it to run in the game? I just want to test if it's working correctly. Also, can you tell me what GetFirstPc() does?
The .nss file is the source code that you just compiled; the .ncs("c" is compiled, "s" in .nss is source) is what the game will need.
The function GetFirstPC() starts cycling through the party, and selects the first player character(which is whoever you are controlling when the script runs). The partner function GetNextPC() continues to cycle through and gets the second party member. One uses those together if they wanted to select a certain party member based on their position in the party, for instance.
If all you want to do is test the script, then you'll need the person with the tag "dgon", which is done in the .utc file
, to exist by spawning him/her.
Follow the tutorial link up above, by editing an existing file the way you want and saving it as something new, and when you get to the scripts, put the name of the modified version of your script in the OnSpawn section.
Your modified script:
object ONPC = OBJECT_SELF;
AssignCommand(ONPC, ActionAttack(GetFirstPC(), bPassive));
Then edit the spells.2da
file, preferably the one in your override folder if it exists, and copy an armband line and copy it into the bottom row(hint: double-click on the asterisk to add a new blank line). edit the entry in the "impactscript" column to be a script named something like "create_dgon"(NO extension!).
For the script create_dgon, I would use this:
string sDgon = ;\\ Whatever the template for dgon is(see .utc tutorial above)
object oDgon = CreateObject(OBJECT_TYPE_CREATURE,sDgon, GetLocation(GetFirstPC()));
Then have an armband made
with a property to activate an item and select the row you added to spells.2da. To be able to see the added row, you need to turn on an option to use .2da files found in override.
P.S: Sorry for the absurdly long post, but I know it'll help you, especially the links. If you have any questions, feel free to ask.
P.P.S: I know perl.