Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

My Scripting Question's

Page: 1 of 1
 Scorge
10-22-2011, 3:18 PM
#1
Instead of making a hundred threads for some weird scipting questions im just gonna put them all in this thread.



1. How do you make a script that checks if the player has Already talked to an npc? Example: Mandalore: I have a hideout, go to the Crystal Caves on Dantooine and meet me there. After talking with mandalore you talk with him again and he says "Go to the crystal Caves on Dantooine. How do i do this?



2. Make an NPC leave your party. (I've searched the forums and cant find anything like this)



3. Make an npc Check if you have an item through Dialog.



4. Make an Npc spawn in a different module. EXAMPLE: Your in the Dxun mandalorian camp and you talk to a mandalorian, after you talk to the mandalorian an NPC spawns in the jungle.
 TimBob12
10-22-2011, 3:30 PM
#2
Welcome to the forums and


Instead of making a hundred treads for some weird scipting questions im just gonna put them all in this thread.


Thank you Thank you Thank you :D
Question 1: Use this method - http://www.lucasforums.com/showthread.php?t=206642)

Question 2: Use this function 'RemovePartyMember'

Question 3:

int StartingConditional()
{
int iResult;

object oW1 = GetObjectByTag("your item);

iResult = GetIsObjectValid(oW1);

return iResult;
}


Use the first link to try and work this one out as well.

Question 4: Use the things from the first link and see if you can work out how to use IF statements to combine scripting and global variables and make things happen based upon them.
 UltimateHK47
11-18-2011, 4:50 PM
#3
is it possible if you guys told me a script to check if you have completed a quest because i dont get conditional
 Scorge
11-21-2011, 6:30 PM
#4
5. Script to start a dialog right after entering module, DeNCS doesnt work for me to decompile the OnEnter NCS file.
 Scorge
11-28-2011, 6:53 PM
#5
Im trying to make NPC's walk randomly using this script, but when I compile its say's "----.nss - error Syntax error at "}" , Compilation Aborted with errors.

void main()
{
AssignCommand(OBJECT_SELF,ActionRandomWalk())
}

Can someone help me with this?
 harIII
11-28-2011, 7:41 PM
#6
Im trying to make NPC's walk randomly using this script, but when I compile its say's "----.nss - error Syntax error at "}" , Compilation Aborted with errors.



Can someone help me with this?

I think this is a simple fix, you forgot the semicolon at the end of the line. I haven't tested this but I think this will work:


void main()
{
AssignCommand(OBJECT_SELF,ActionRandomWalk());
}
 Scorge
10-20-2012, 9:53 AM
#7
I think I may have asked this before, but I can't remember. What is the script to make an npc give you an item and the item pops on your Character. [Like you talking with droid and a robe appears on your character.] Thanks
 Ferc Kast
10-20-2012, 11:23 AM
#8
This should be exactly what you're looking for.

void main()
{
string sRobe = "clothes_uti_name_here";
object oPC = GetFirstPC();
AssignCommand(oPC, ActionEquipItem(CreateItemOnObject(sRobe, oPC, 1, TRUE), INVENTORY_SLOT_BODY, TRUE));
}
Page: 1 of 1