View Full Version : Scripting questions...
Revan81790
06-25-2008, 12:59 AM
Hey.. I'm new to scripting
1. What is the script for certain dialog not be shown until a condition is met?
2. What is the script that makes the npc attack after dialog?
JediMaster76
06-25-2008, 01:34 AM
Umm... well, for question 1, I'd need to know which game you're modding and what type of conditional script you need (journal entry, boolean, item, etc.). I can answer #2 though.
void main() {
// make main NPC go hostile; replace sir_pwns with your NPC tag
object oNPC=GetObjectByTag("sir_pwns");
ChangeToStandardFaction(oNPC, 1);
// give them kick to make them start attacking you
ExecuteScript("k_ai_master",oNPC,1005);
}
Revan81790
06-25-2008, 11:15 AM
Umm... well, for question 1, I'd need to know which game you're modding and what type of conditional script you need (journal entry, boolean, item, etc.). I can answer #2 though.
void main() {
// make main NPC go hostile; replace sir_pwns with your NPC tag
object oNPC=GetObjectByTag("sir_pwns");
ChangeToStandardFaction(oNPC, 1);
// give them kick to make them start attacking you
ExecuteScript("k_ai_master",oNPC,1005);
}
Thank you for your answer of question 2.
As for question 1, the game is KotOR 2, and the conditional would be a journal entry...
Does that sound right?
Stream
06-25-2008, 12:15 PM
int StartingConditional() {
return (GetJournalEntry("JOURNAL")==STATE);
}
Replace JOURNAL with the name of the journal entry and replace STATE with whatever the number of that journal needs to be at.
--Stream
vBulletin®, Copyright ©2000-2013, Jelsoft Enterprises Ltd.