Hi
This is my first post but i was woundering if you could help. What i did was i spawned an npc and recruited him through a dialog file i created. Everything works, i have my new recruited npc following me, but also the same npc i talked to is standing in front of me, they are the same npc. So i was woundering how to delete the npc standing in front of me when i recruit the npc.
Also the dialog file i created has a problem the script i attached to the file to recruit the npc is still within the dialog how do i remove that part of the dialog once i have recruited the npc as npc still uses that dialog file when i talk to the npc.
Thanks for listening n1gamer
Well, the reason why your recruited character is still in front of you i because you need some sort of vanishing script, when i make recruitment mods i use this script:
void main () {
object oNPC=GetObjectByTag("g_zaenbenax");
float x=15.29;
float y=152.89;
float z=7.28;
int bRun=FALSE;
vector vExit=Vector(x,y,z);
location lExit=Location(vExit,0.0f);
ActionDoCommand(SetCommandable(TRUE,oNPC));
AssignCommand (oNPC,ActionForceMoveToLocation(lExit,bRun));
AssignCommand (oNPC,ActionDoCommand(DestroyObject(oNPC)));
ActionDoCommand(SetCommandable(FALSE,oNPC));
}
Replace g_zaenbenax with your own non recruited npc,
Use the wherami cheat to get the x,y and z co ordanites for where you want the npc to run to and your npc will run away and vanish.
And to your other question for the dialog, well that is because you are recruiting the same .utc file, you need to create a seperate one for the party version of your npc, that way he has an empty dialog box meaning you can create your new party member a new party dialog.
This is my first post but i was woundering if you could help. What i did was i spawned an npc and recruited him through a dialog file i created. Everything works, i have my new recruited npc following me, but also the same npc i talked to is standing in front of me, they are the same npc. So i was woundering how to delete the npc standing in front of me when i recruit the npc.
If you know the tag of the original character that remains after recruiting it you can delete it from the script that adds the character to the party, by adding a line like this to the script...
DestroyObject(GetObjectByTag("TagOfNPC"));
...where you change the part in Yellow to the Tag of the character (as set in its UTC template).
Also the dialog file i created has a problem the script i attached to the file to recruit the npc is still within the dialog how do i remove that part of the dialog once i have recruited the npc as npc still uses that dialog file when i talk to the npc.
If I understand you correctly you can do that either by using a separate dialog file for when then the NPC has been recruited and another before it's recruited.
Or you can set a Local Variable on the NPC when it's recruited and then check for this in a conditional script on the dialog node to block out that node when the variable is set. (Global variables can also be used for this if you need to check elsewhere if the NPC has been recruited as well.)
If you know the tag of the original character that remains after recruiting it you can delete it from the script that adds the character to the party, by adding a like like this to the script...
DestroyObject(GetObjectByTag("TagOfNPC"));
...where you change the part in Yellow to the Tag of the character (as set in its UTC template).
If I understand you correctly you can do that either by using a separate dialog file for when then the NPC has been recruited and another before it's recruited.
Or you can set a Local Variable on the NPC when it's recruited and then check for this in a conditional script on the dialog node to block out that node when the variable is set. (Global variables can also be used for this if you need to check elsewhere if the NPC has been recruited as well.)
Thanks for all your help. Well i tryied both ways and they work thanks again
n1gamer :)