Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Help with New Power - Kotor

Page: 1 of 1
 sketch42
02-02-2009, 12:54 PM
#1
Im looking to add a new power in the game and i just want to know if this is possible, basically the power would replace the targeted npc model with a different one for a specified duration (i.e 1 or 2 rounds) and add a confuse spell to the same npc the same duration

Edit: ok i know i have to do this via script, however since im at work , :rolleyes: , and i dont have access to any kotor files or scripts would the script be similiar to this

void main()
{
// This is the Object to apply the effect to.
object oTarget = OBJECT_SELF;

// Create the effect to apply: the "*" is whatever i want
effect ePoly = EffectPolymorph(POLYMORPH_TYPE_*);

// Create the visual portion of the effect. This is instantly
// applied and not persistant with wether or not we have the
// above effect.
effect eVis = EffectVisualEffect(VFX_IMP_EVIL_HELP);
effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);

// Apply the visual effect to the target
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
// Apply the effect to the object
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoly, oTarget);
// Apply the duration effect for fDuration.
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oPC, fDuration);
}


just need help figuring out how to implement the ActionCastSpellAtObject
Function to the script as well as implementing on attack of force power

Edit: ok i really need help with this script i get compile errors all over the place.
and i checked out bean's thead http://www.lucasforums.com/showthread.php?t=137498)
but unfortunayely it lefy me with more questions than answers

======================


ok i think i finally found part of the script i need , i believe this should be the script needed to transform the NPC .

Taken from k_inc_tar.nss
object TAR_TransformCreature(object oTarget = OBJECT_INVALID,string sTemplate = "")
{
if(GetIsObjectValid(oTarget) && sTemplate != "")
{
location lPlace = GetLocation(oTarget);

DestroyObject(oTarget,0.0,TRUE);
return(CreateObject(OBJECT_TYPE_CREATURE,sTemplate ,lPlace));
}
else
{
return(OBJECT_INVALID);
}
}
now i need to know where to define the sTemplate function.

-i also need to reCreate the original NPC if they havent been killed yet at the end of the battle

- Finally i need to put a confuse spell on the same NPC as well as add all the VFX for the Transformation
Page: 1 of 1