I know little to nothing about Neverwinter Nights 2 scripting. I am working on a Dimension Door spell script, but it is not working. Basically, I want it to allow the player to teleport to a space within visual range and play the teleportation VFX at the player's location, then destination once they "teleport in".
After looking at spell scripts and viewing some lists on the NWN2wiki, I put this script together. I also edited the spells.2da and iprp_spells.2da to include this spell as well. I can cast it, but nothing happens afterwords.
//::///////////////////////////////////////////////
//:: [Dimension Door]
//:: [NW_S0_DimensionDoor.nss]
//:: Copyright © 2000 Nobody.
//:://////////////////////////////////////////////
/*
Teleports caster to designated location within visual range.
*/
//:://////////////////////////////////////////////
//:: Created By: FaerzressSparkles
//:: Created On: Feb 7, 2015
//:://////////////////////////////////////////////
//:: Last Updated By: FaerzressSparkles, On: Feb 7, 2015
#include "nwn2_inc_spells"
#include "x2_inc_spellhook"
void main()
{
if (!X2PreSpellCastCode())
{
return;
}
object oPC = GetLastSpellCaster();
object oPC = OBJECT_SELF;
object oCaster = oPC;
object oTarget = oPC;
string sName = GetName(oPC);
AssignCommand(oPC, ClearAllActions());
location lTarget = GetSpellTargetLocation();
effect eVis = EffectVisualEffect(VFX_TELEPORT);
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oTarget, ActionJumpToLocation(lTarget));
effect eVis = EffectVisualEffect(VFX_TELEPORT);
}





Retour en haut







