BioWare Forums: View Post For Code Display


You are viewing a single post. Please do not take this post out of context.
Read the full topic: Post Working Scripts Here

Author Sticky: Post Working Scripts Here
Todmaerin Posted: Sunday, 23 June 10:25PM
Creating NPC Statues for effect, inspired by, god, I wish I could remember who it was in the DM forum. Instructions within.

EDIT: I was just playing a bit more with the script and found that replicating the statue (for a gallery of them) would require more instances of the script due to unique tags. Changed "GetObjectByTag" to "OBJECT_SELF" in the object declaration, and the instructions in the header. CTL-C/CTL-V replicating works much better now, and with only once instance of the script in the module. Silly me.


NWScript:
//:: Name: NPC Statues
//:: FileName: npc_statue
// Used to make a sort of "living statue" prop to
// add a bit of eerie ambience to an area.
// 1. Create a custom NPC
// 2. Place whatever you wish in its inventory--
//    torches/light items recommended
// 3. Remove all scripts from NPC
// 4. Place this script in OnSpawn
// 5. Place NPC in area
//
// Created By:  Todmaerin
// Created On:  6/23/02
void main()
{
 // Target NPC
 object oTarget = OBJECT_SELF;
 
 // Don't want this wearing off now, do we?
 int nDurationType = DURATION_TYPE_PERMANENT;
 
 // Declare effect1, the paralyze.
 effect eEffect1 = EffectParalyze();
 
 // Declare effect2, the stoneskin visual
 effect eEffect2 = EffectVisualEffect (VFX_DUR_PROT_STONESKIN);
 
 // now apply it, and keep it.
 ApplyEffectToObject (nDurationType, eEffect1, oTarget);
 ApplyEffectToObject (nDurationType, eEffect2, oTarget);
 SetPlotFlag(oTarget, TRUE);
}


Compiled, tested. Drop me a line if you have any problems.

[ Edited By Todmaerin: Sunday, 23 June 10:26PM (GMT) ]

[ Edited By Todmaerin: Sunday, 23 June 10:53PM (GMT) ]

This post taken from the BioWare Forums
Powered by BioBoards Version 2.05.006
Please read our Copyright and Trademark Information