Darth_Robinson Posted January 20, 2006 Share Posted January 20, 2006 I'm trying to add a small part to the game that gives the player a new Force Power. I read the 'frequently asked scripting questions' thread, and there was a script there to add a new power, but I'm having a little trouble. Could anyone help me out a bit? I don't really know what this should look like. Link to comment Share on other sites More sharing options...
Darth333 Posted January 20, 2006 Share Posted January 20, 2006 Yes, it's very simple: void main() { GrantSpell( int nSpell, GetObjectByTag("my_npc_tag")); } Replace int nSpell by the corresponding row number in spells.2da and replace my_npc_tag by the tag of the npc to which you want to give the force power (look in the utc file to find the tag). Link to comment Share on other sites More sharing options...
Darth_Robinson Posted January 20, 2006 Author Share Posted January 20, 2006 I tried, but when I try to compile the script, it says that there is a syntax error at "int". *Scratches head* Link to comment Share on other sites More sharing options...
Det. Bart Lasiter Posted January 20, 2006 Share Posted January 20, 2006 That's because you need to replace 'int nSpell' with the row number of the spell in 'spells.2da'. For instance, if you wanted to grant the FP 'Death Field' to yourself, you'd compile this: void main() { GrantSpell(11, GetFirstPC()); } Link to comment Share on other sites More sharing options...
Darth_Robinson Posted January 20, 2006 Author Share Posted January 20, 2006 That would be my problem. Dumbass me left the 'int' in. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.