help fixing a few things...
#1
Posté 06 août 2010 - 01:31
second, having a bit of trouble with this script...
the script works fine except for a few things i can't seem to make work. first, the beams don't shut off, not sure why, i'm not a very talented scripter...
second, i'd like the pillar in this script to re-appear after the dragon has been killed, about 2 minutes after...
third, i'd like this script to only be able to work once (one instance of the dragon being summoned at a time) and finally, i'd like the script to only run again 15 minutes after the dragon as been killed, meanning the summoning runes are useless until 15 minutes after the dragon has been killed.
i hope i explained the problems enough, if not, i can try more.
here's the script.
#include "pqj_inc" // for quest check
#include "nw_i0_2q4luskan"
void main()
{
object oPC = GetLocalObject (OBJECT_SELF, "PC");
if (!GetIsPC(oPC)) return;
int nInt = RetrieveQuestState("q_helden",oPC);
if (nInt == 40)
return;
object oTarget;
oTarget = OBJECT_SELF;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_SUNSTRIKE), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_SUNSTRIKE), GetLocation(oTarget));
oTarget = GetObjectByTag("rune_pillar");
nInt = GetObjectType(oTarget);
effect eEffect;
eEffect = EffectVisualEffect(VFX_COM_CHUNK_STONE_MEDIUM);
if (nInt != OBJECT_TYPE_WAYPOINT)
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oTarget));
else
DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect, GetLocation(oTarget)));
DelayCommand(1.0, DestroyObject(oTarget, 3.0));
oTarget = GetObjectByTag("invis_rune");
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_FIRESTORM), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_FIRESTORM), GetLocation(oTarget));
location lTarget;
oTarget = GetWaypointByTag("WP_summon");
lTarget = GetLocation(oTarget);
DelayCommand(2.0, CreateObjectVoid(OBJECT_TYPE_CREATURE, "heldenguardian", lTarget));
eEffect = EffectVisualEffect(VFX_FNF_SUMMON_CELESTIAL);
DelayCommand(2.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect, lTarget));
{
effect eVFX = GetFirstEffect(OBJECT_SELF);
while(GetIsEffectValid(eVFX))
{
if(GetEffectType(eVFX) == EFFECT_TYPE_VISUALEFFECT) RemoveEffect(OBJECT_SELF, eVFX);
eVFX = GetNextEffect(OBJECT_SELF);
}
DeleteLocalInt(GetObjectByTag("rune_ice"), "Activated");
DeleteLocalInt(GetObjectByTag("rune_fire"), "Activated");
DeleteLocalInt(GetObjectByTag("rune_evil"), "Activated");
DeleteLocalInt(GetObjectByTag("rune_holy"), "Activated");
}
}
#2
Posté 06 août 2010 - 08:32
#3
Posté 07 août 2010 - 06:06
#include "pqj_inc"
void main()
{
object oPC = GetLastUsedBy();
if (!GetIsPC(oPC)) return;
if(RetrieveQuestState("q_chalice", oPC) != 40) return;
if(GetLocalInt(OBJECT_SELF, "Activated") == 1) return;
//Checktag and assign VFX
string sTag = GetTag(OBJECT_SELF);
int nBeam;
if(sTag == "rune_ice") nBeam = VFX_BEAM_COLD;
else if(sTag == "rune_fire") nBeam = VFX_BEAM_FIRE;
else if(sTag == "rune_evil") nBeam = VFX_BEAM_EVIL;
else if(sTag == "rune_holy") nBeam = VFX_BEAM_HOLY;
//Set a local int to indicate the rune is activated
SetLocalInt(OBJECT_SELF, "Activated", 1);
object oTarget = GetObjectByTag("rune_black");
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectBeam(nBeam, GetObjectByTag("rune_black"), BODY_NODE_CHEST), GetObjectByTag(sTag));
//If all four are activated activate the rune pillar
if(GetLocalInt(GetObjectByTag("rune_ice"), "Activated") == 1 &&
GetLocalInt(GetObjectByTag("rune_fire"), "Activated") == 1 &&
GetLocalInt(GetObjectByTag("rune_evil"), "Activated") == 1 &&
GetLocalInt(GetObjectByTag("rune_holy"), "Activated") == 1)
{
SetLocalObject(oTarget, "PC", oPC);
ExecuteScript("ap_rune_pillar", oTarget);
ExecuteScript("ap_pillar_summon", OBJECT_SELF);
SetUseableFlag(OBJECT_SELF, FALSE);
DelayCommand(900.0, SetUseableFlag(OBJECT_SELF, TRUE));
}
}
this script goes on the rune stones, the other two, activated by this one.
script 3:
#include "nw_i0_generic"
void main()
{
object oPC = GetLastUsedBy();
if (!GetIsPC(oPC)) return;
object oTarget;
object oSpawn;
location lTarget;
oTarget = GetWaypointByTag("watcher_one");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "heldenwatcher", lTarget);
oTarget = oSpawn;
SetIsTemporaryEnemy(oPC, oTarget);
AssignCommand(oTarget, ActionAttack(oPC));
AssignCommand(oTarget, DetermineCombatRound(oPC));
int nInt;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_EPIC_UNDEAD), oTarget));
else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_EPIC_UNDEAD), GetLocation(oTarget)));
oTarget = GetWaypointByTag("helden_two");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "heldenwatcher", lTarget);
oTarget = oSpawn;
SetIsTemporaryEnemy(oPC, oTarget);
AssignCommand(oTarget, ActionAttack(oPC));
AssignCommand(oTarget, DetermineCombatRound(oPC));
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_EPIC_UNDEAD), oTarget));
else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_EPIC_UNDEAD), GetLocation(oTarget)));
}
thanks
#4
Posté 08 août 2010 - 05:01
No but using [ code][ /code] helps with the formatting.zero-feeling wrote...
so, first of all, is there a way to post scripts in boxes yet?
Try this:first, the beams don't shut off, not sure why, i'm not a very talented scripter...
effect eVFX = GetFirstEffect(OBJECT_SELF);
while(GetIsEffectValid(eVFX))
{
if(GetEffectType(eVFX) == EFFECT_TYPE_BEAM) RemoveEffect(OBJECT_SELF, eVFX);
eVFX = GetNextEffect(OBJECT_SELF);
}
For this one, place a Waypoint where you want the pillar to spawn, then in the dragon's OnDeath script make the one of the other objects in the area (like "rune_black") execute a script.second, i'd like the pillar in this script to re-appear after the dragon has been killed, about 2 minutes after...
So, do something like this in the dragon's OnDeath:
object oRune = GetNearestObjectByTag("rune_black");
SetLocalInt(oRune, "DoOnce", 1);
ExecuteScript("spawnpillar", oRune);
Then the script "spawnpillar" should look something like this:
void main()
{
if(GetLocalInt(OBJECT_SELF, "DoOnce") == 1)
{
DeleteLocalInt(oRune, "DoOnce");
DelayCommand(120.0, ExecuteScript("spawnpillar", OBJECT_SELF));
}
else
{
CreateObject(OBJECT_TYPE_PLACEABLE, "rune_pillar", GetLocation(GetNearestObjectByTag("PillarWP")));
}
}
Just check to see if the dragon is valid at teh top of the first script (the one that calls the other two scripts).third, i'd like this script to only be able to work once (one instance of the dragon being summoned at a time)
if(GetIsObjectValid(GetNearestObjectByTag("DragonTag"))) return;
It looks like you are doing that already by making the runes usable state to FALSE then delaying the command 900 seconds (15 minutes) then setting usable to TRUE. Is this not working the way it's intended?and finally, i'd like the script to only run again 15 minutes after the dragon as been killed, meanning the summoning runes are useless until 15 minutes after the dragon has been killed.
-420
Modifié par 420, 09 août 2010 - 04:35 .
#5
Posté 08 août 2010 - 05:02
Modifié par 420, 09 août 2010 - 04:35 .
#6
Posté 09 août 2010 - 05:53
thanks
#7
Posté 09 août 2010 - 04:37
That's partly my fault. I haven't been checking the forums as often since they moved. I'll make more of an effort to check them on a daily basis.diggerplus wrote...
thanks 420, and for the record, these new forums seem to be a lot harder to get help on... are there any other forums now that are better for getting help?
thanks
-420
#8
Posté 09 août 2010 - 04:56
diggerplus wrote...
thanks 420, and for the record, these new forums seem to be a lot harder to get help on... are there any other forums now that are better for getting help?
thanks
As one of the builders said it before...
"NWN is winding down..."
I believe this to be true, so you may not find as much support...
Also, these are new forums, obviously they are not going to be as heavially used as the original, because people are lazy and don't want to move over to the new one...
I'm starting to wonder if we will even continue to see any support at all from bioware, for that matter...
Modifié par Genisys, 09 août 2010 - 04:58 .





Retour en haut







