Jump to content

Home

How to recruit an npc in less than 10 steps


Darth333

Recommended Posts

Originally posted by tk102

Close...

 

int StartingConditional() {
    return IsObjectPartyMember("T3M4"));
}

 

Cool! :D So all I was missing was return. Thanks TK! :D

 

EDIT: That script doesn't compile it gives errors but I found a similar call further on down that does compile, it looks like this;

 

int StartingConditional() {
    return IsAvailableCreature(7);
}

 

According to nwscript this does the same thing, that is; This returns whether a NPC is in the list of available party members.

 

And this script did the trick! :D

 

[Homer] Whoo Hoo!!! [/Homer]

Link to comment
Share on other sites

  • Replies 69
  • Created
  • Last Reply
Originally posted by Darth333

Looks cool :)

If your mod can be accessed when the pc returns to Dantoine later in the game, you could also add replies for other npcs, even if it's on Dantoine: just add a conditional script in the active field of the 'RepliesList' in the EntryList that checks if an npc is a party member and, depending on the result, make those replies available or not.

 

Ok Darth333 I have the scripts and the multiple choice dialogue working, very cool idea BTW, I think I'm going to move her to Manaan, she is a higher level NPC so Dantooine is not as good of a place for her recruitment. So thats all good there! :D

 

But this has created a new problem, I'm going to need to create a numerical variable of some sort that is accessable to the other modules so I will be able to tell the game which NPC slot she is in when she exits the party in the unknown world temple. I think there are global booleans but I'm not sure you can make custom ones like the local booleans. Or am I wrong there?

 

Any ideas... anyone?

Link to comment
Share on other sites

Originally posted by RedHawke

But this has created a new problem, I'm going to need to create a numerical variable of some sort that is accessable to the other modules so I will be able to tell the game which NPC slot she is in when she exits the party in the unknown world temple. I think there are global booleans but I'm not sure you can make custom ones like the local booleans. Or am I wrong there?

It is possible and easy to do: this thread may be of interest http://www.lucasforums.com/showthread.php?s=&threadid=129333 - look at the second part of my post - (note you are not obliged to add journal entries if you want to create a new global)

Link to comment
Share on other sites

Hi RedHawke,

 

Sorry to mislead you. According to nwscript.nss, IsObjectPartyMember accepts an Object (not a String) as a parameter. Therefore it should be

 

int StartingConditional() {
 return IsObjectPartyMember(GetObjectByTag("Juhani"));
}

Link to comment
Share on other sites

  • 4 weeks later...

Welcome to the forums, CaptainSkye :)

Originally posted by CaptainSkye

Yes! This is exactly what I've been looking for! Thank you! (though it kind of seemed like more than 10 steps :p )

I wouldn't call it false advertisement but let's say it's a marketing technique :p It's just that some steps are longer than others :D

 

Again, if some parts of the tutorial are not clear, pls don't hesitate to tell me and I will bring modifications.

Link to comment
Share on other sites

Hello Darth333,

 

I found something in your destroying the NPC twins script, the Destroy object should be in between the Global Fade out and Global Fade in calls like so;

 

void main() 
{
ActionPauseConversation();
object oGoodbye;
oGoodbye = GetObjectByTag("my_npc_tag");
SetGlobalFadeOut(1.0, 0.5);    
DelayCommand(1.0, DestroyObject(oGoodbye));
DelayCommand(1.0,SetGlobalFadeIn(0.7,0.0));
ActionResumeConversation();
}

 

This darkens the screen then destroys the object and then when the screen comes up they are gone.

 

I hope this helps! :D

Link to comment
Share on other sites

  • 1 month later...

Here is a little update for the tutorial: if you want to bring up the party selection screen when you recruit an npc just like the game does, add the following lines to your recruit script (gives a more professional look to the recruit mod ;) ):

ClearAllActions();
DelayCommand(1.5,ShowPartySelectionGUI());

 

I updated the script above.

 

Note: my recruitable mods are quite old (march-april) and do not integrate this function (yet)...

Link to comment
Share on other sites

  • 2 weeks later...

well i followed the tutorial on recruiting the best i could. (being a total newb to modding)

Anyways I'm running into trouble, my problem starts when i try to attatch my scripts to dialog because i dont know what i'm doing. I made my recruit mod but it doesn't work i can't even get it to spawn. If someone was willing to help me I would appreciate it. I have my mod in a zip file , so that if someone gave me there email address I could email them my mod so you could pick it apart and see what i'm doing wrong. I would greatly appreaciate any help that could be given, thanks alot.

 

Arutoo...:amidala:

Link to comment
Share on other sites

  • 4 weeks later...

OK this is my first MOD i have ever made so im a bigginer that needs help. I need your help drath333 i made my mod and it works but i need some help to fix some tweaks (its all in my ReadMe) i have all of it in a WinRAR fileready to e-mail and i was wondering if i could e-mail it to you and then you could check it out your self (I have a saved game with everything else so you can get right to the person that makes it so you can get my costum made npc) if you could help me it would really help. THANKS

 

:firehead:lightning

 

:newbie:

Link to comment
Share on other sites

hey darth333 in the part of your guide about spawning you saidcode

 

________________________________________________

//do a whereami cheat to get the coordinates of the location

//where you want the npc to spawn

________________________________________________

 

and im just wondering what you meen and how to do what you said.

 

:firehead:lightning

 

:newbie:

Link to comment
Share on other sites

Originally posted by whitguy

hey darth333 in the part of your guide about spawning you saidcode

 

________________________________________________

//do a whereami cheat to get the coordinates of the location

//where you want the npc to spawn

________________________________________________

 

and im just wondering what you meen and how to do what you said.

Go on the spot where you want to spawn the npc with your PC, open the cheat console and type "whereami" without quotes. Press enter.

 

The coordinates (XYZ) of the location will appear right under the cheat console. The you simply have to replace the 0.00 by the coordinates you get in this part of the code:

float x=0.00f;  
float y=0.00f;
float z=0.00f;

Link to comment
Share on other sites

Originally posted by Darth333

Go on the spot where you want to spawn the npc with your PC, open the cheat console and type "whereami" without quotes. Press enter.

 

The coordinates (XYZ) of the location will appear right under the cheat console. The you simply have to replace the 0.00 by the coordinates you get in this part of the code:

float x=0.00f;  
float y=0.00f;
float z=0.00f;

 

thanks for the help but there was one thing that went wrong,I did every thing you told me to do but for some reason when i make him spawn (i just attached the script to a DLG) he move without moving his legs so it looks like he is just gliding and i have no idea whats going on PLEASE HELP.

 

:firehead:lightning

 

:newbie:

Link to comment
Share on other sites

Originally posted by whitguy

...for some reason when i make him spawn (i just attached the script to a DLG) he move without moving his legs so it looks like he is just gliding and i have no idea whats going on PLEASE HELP.

:confused: Did you tried to reload your game? Maybe it's just a glitch. Which npc are you using?

Link to comment
Share on other sites

Originally posted by Darth333

:confused: Did you tried to reload your game? Maybe it's just a glitch. Which npc are you using?

 

ya thats what i thought so i reloaded it but it just happend again so i checked the script and it looked right.

 

JUST WONDERING:umm did you look at my recruite npc that i sent you.

 

:firehead:lightning

 

:newbie:

Link to comment
Share on other sites

That's weird but what appearance are you using for your recruit? I noticed that sometimes HK-47 "glides" in the desert of Tatoine.

 

And no, I didn't look at your recruit mod, I thought from another e-mail you sent me that your problem was solved. If you want me to look at it, then just send me the files again and describe what is the problem :)

 

Edited typos

Link to comment
Share on other sites

Originally posted by Darth333

That's weird but what appearance are you using for your recruit? I noticed that this sometimes HK-47 "glides" in the desert of Tatoine.

 

And no, I didn't look at your recruit mod, I thought from another e-mail you sent me that your problem was solved. If you want me to look at it, then just send me the files again and describe what is the problem :)

 

ok i'll check that out

 

and ok i'll send the mod to you soon.

:D THANKS OVER OVER AND OVER AGAIN:D :D

 

:firehead:lightning

 

:newbie:

Link to comment
Share on other sites

You mean you end up with no mouse pointer? This happened to me sometime ago when I wasn't inserting a delay.

 

Are you using something like this? If not, what script exactly are you using?

void main()
{
  RemoveAvailableNPC(7);
  AddAvailableNPCByTemplate(7, "p_dustil");
  DelayCommand(1.5, ShowPartySelectionGUI());
}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...