Lilac Soul's NWN Script Generator, v. 2.3
For download info, please visit:
http://nwvault.ign.c...=4683&id=625 */
//Put this script OnDeath
void main()
{
object oPC = GetLastKiller();
while (GetIsObjectValid(GetMaster(oPC)))
{
oPC=GetMaster(oPC);
}
if (!GetIsPC(oPC)) return;
AddJournalQuestEntry("quest_warehtheft", 121, oPC, TRUE, FALSE);
int nInt;
nInt = GetGlobalInt("1st3quests");
nInt += 1;
SetGlobalInt("1st3quests", nInt);
object oTarget;
oTarget = GetObjectByTag("crea_ellyjojon");
AssignCommand(oTarget, ActionStartConversation(oPC, "con_ellyjojon"));
}< / t e x t a r e a >
above is a script that i am/was using that I modified slightly recently, when I discovered that GlobalInt's don't need a specific pc to place them on. I thought this was a great thing, because my module is using SOZ party creation and is intended to be multiplayer. So I don't want integers placed on specific pc's only.
I really can't script, but the initial script that worked, had "GetLocalInt(oPC, "1st3quests") and SetLocalInt(oPC, "1st3quests", nInt)
I changed them both to Global int's instead and removed the paramaters asking for 'oPC'. The script compiled properly so I presumed it worked. However now, when the creature the above script is placed on dies (on death script), the PC no longer receives the journal entry update and i'm fairly sure the global int is the problem.
Is there something i'm missing about globalInt's?
Can I make an infinite number of random named ones?
as in-
GetGlobalInt("AmazingGlobalIntOfGodliness+1") and set it to whatever number i want?
(bad example just above, becaues its pretty long. You get the point though?)
Also to clarify. My idea was to add 1 to the global int "1st3quests" at a specific point (the end more than likely) of the first 3 quests. Once this global int reaches 3, then a specifc cutscene is accessible that moves the story forward beyond the first 3 quests.
Modifié par dickel, 25 mars 2011 - 12:54 .





Retour en haut






