Help appreciated.
#1
Posté 22 novembre 2010 - 10:51
appreciated.
#2
Posté 23 novembre 2010 - 02:19
For specific questions about scripting, head on over to the Scripting forum. If you need help crafting scripts, a good beginner's tool is Lilac Soul's NWN Script Generator
#3
Posté 23 novembre 2010 - 03:15
#4
Posté 23 novembre 2010 - 02:50
/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.3
For download info, please visit:
http://nwvault.ign.c...&id=4683&id=625 */
int StartingConditional()
{
object oPC = GetPCSpeaker();
int nInt;
nInt=GetLocalInt(oPC, "NW_JOURNAL_ENTRY1");
if (nInt < 1)
return FALSE;
return TRUE;
}
#5
Posté 23 novembre 2010 - 06:00
{
object oPC = GetPCSpeaker();
int nInt=GetLocalInt(oPC, "NW_JOURNAL_ENTRY1");
if (nInt < 1)
{
return FALSE;
}
else
{
return TRUE;
}
}
#6
Posté 23 novembre 2010 - 11:19
That's a spurious error. I cut and pasted your code into a new mod and it compiled just fine. It happens sometimes. Try making a new script, copying the text over and saving it under the same name, overwriting the old script.customwinternights wrote...
I downloaded that script generator and generated some scripts, but i keep getting compiling errors in the Toolset. I get the ERROR: PARSING VARIABLE LIST error. Here's the script I generated:
Here is the same code with a slightly cleaner format:
int StartingConditional()
{
object oPC = GetPCSpeaker();
int nInt = GetLocalInt(oPC, "NW_JOURNAL_ENTRY1");
if (nInt < 1) return FALSE;
return TRUE;
}
-420
Modifié par 420, 23 novembre 2010 - 11:21 .
#7
Posté 24 novembre 2010 - 06:06
#8
Posté 24 novembre 2010 - 06:13
/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.3
For download info, please visit:
http://nwvault.ign.c...&id=4683&id=625 */
//Put this on action taken in the conversation editor
#include "nw_i0_generic"
void main()
{
object oPC = GetPCSpeaker();
object oTarget;
oTarget = GetObjectByTag("01");
AdjustReputation(oPC, oTarget, -100);
SetIsTemporaryEnemy(oPC, oTarget);
AssignCommand(oTarget, ActionAttack(oPC));
AssignCommand(oTarget, DetermineCombatRound(oPC));
oTarget = OBJECT_SELF;
AdjustReputation(oPC, oTarget, -100);
SetIsTemporaryEnemy(oPC, oTarget);
ActionAttack(oPC);
DetermineCombatRound(oPC);
}
Dont know if it's the right one. It's for making a creature attack a nonplayable after he's done talking with the hero. The creature kills the nonplayable, and it then attacks you.
#9
Posté 25 novembre 2010 - 12:01
Not quite sure what you mean by this. You want the PC so say something when they open a door? You can try putting this in the door's OnOpen event.customwinternights wrote...
It compiled! Turns out the
main() at the beginning was the error. But where do i put the text that
shows when the door's opened?
void main()
{
object oPC = GetLastOpenedBy();
if(GetLocalInt(OBJECT_SELF, "DoOnce") != 1)
{
SetLocalInt(OBJECT_SELF, "DoOnce", 1);
AssignCommand(oPC, ActionSpeakString("I opened the door."));
}
}
I think this may be what you're looking for:customwinternights wrote...
Dont know if it's the right one. It's for making a creature attack a nonplayable after he's done talking with the hero. The creature kills the nonplayable, and it then attacks you.
void main()
{
object oPC = GetPCSpeaker();
object oNPC = OBJECT_SELF;
object oAttacker = GetNearestObjectByTag("01");
AdjustReputation(oPC, oAttacker, -100);
AdjustReputation(oNPC, oAttacker, -100);
AssignCommand(oAttacker, ActionAttack(oNPC));
}
The attacker should automatically attack the PC after the NPC is dead. -420
#10
Posté 25 novembre 2010 - 01:19
If you want the speech before opening the door rather than when opening the door you'll need a trigger area where you want the speech to occur and use the same 420 script OnEnter.customwinternights wrote...
For example, first, I want my main hero say something before opening a door.





Retour en haut






