//:://///////////////////////////////////////////// //:: Name: lightning_efx //:: FileName: lightning_efx //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* This is a script that will allow you to have a cool lightning Effects display in your mod. What it does is you place this script in a generic trigger's OnEnter slot. When the PC enters the trigger, the script will activate and give you a cool lightning display. */ //::////////////////////////////////////////////// //:: Created By: Webmaistro //:: Created On: 1/03/2003 //::////////////////////////////////////////////// // This part is where you setup the lightning sequence, You can add as many as // you like, just follow the numerical order. void next1(); void next2(); void next3(); void next4(); void next5(); void next6(); // This ends the lightning sequence setup ends. void end(); // Now for the script. void main() { // This just starts the lightning sequence. DelayCommand(1.0, next1()); } // Ok, now this is the first lightning strike. void next1() { // This is the lightning visual effect. effect eMind = EffectVisualEffect(VFX_IMP_LIGHTNING_M); // This is where you declare the tag of the target, I use an invisible object // placeable. Each target must be a unique tag for the script to work properly. object oTarget = GetObjectByTag("light_targ_001"); // This gets the location of the target. location lLoc = GetLocation(oTarget); // This is where the action takes place. ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eMind, GetLocation(oTarget)); // This is just a small delay before the next lightning strike and tells the // script to go to sequence 2. DelayCommand(1.5, next2()); } // This is the second lightning strike. void next2() { // This is the lightning visual effect. effect eMind = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1); // This is where you declare the tag of the target, I use an invisible object // placeable. Each target must be a unique tag for the script to work properly. // As you can see here, I have 2 seperate targets listed, each with a unique tag // This will give you 2 simultaneous lightning strikes. You can add as many as you // like, just be sure each one is declared in the fashion shown a,b,c,d,etc. and // each target has a unique tag. object oTargeta = GetObjectByTag("light_targ_002a"); object oTargetb = GetObjectByTag("light_targ_002b"); // This gets the location of the target. As you can see, since I have 2 targets, // I have to declare 2 locations. If you add more targets, just make sure you add // the location declaration or it won't work. location lLoca = GetLocation(oTargeta); location lLocb = GetLocation(oTargetb); // This is where the action takes place. You will also need to declare the // actions for each target seperately. ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eMind, GetLocation(oTargeta)); ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eMind, GetLocation(oTargetb)); // This tells the script to go to sequence 3. DelayCommand(1.5, next3()); } // This is the third lightning strike. void next3() { // This is the lightning visual effect. effect eMind = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1); // This is where you declare the tag of the target, I use an invisible object // placeable. Each target must be a unique tag for the script to work properly. object oTarget = GetObjectByTag("light_targ_003"); // This gets the location of the target. location lLoc = GetLocation(oTarget); // This is where the action takes place. ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eMind, GetLocation(oTarget)); // This tells the script to go to sequence 4. DelayCommand(1.5, next4()); } // This is the fourth lightning strike. void next4() { // This is the lightning visual effect. effect eMind = EffectVisualEffect(VFX_IMP_LIGHTNING_M); // This is where you declare the tag of the target, I use an invisible object // placeable. Each target must be a unique tag for the script to work properly. // As you can see here, I have 2 seperate targets listed, each with a unique tag // This will give you 2 simultaneous lightning strikes. You can add as many as you // like, just be sure each one is declared in the fashion shown a,b,c,d,etc. and // each target has a unique tag. object oTargeta = GetObjectByTag("light_targ_004a"); object oTargetb = GetObjectByTag("light_targ_004b"); object oTargetc = GetObjectByTag("light_targ_004c"); // This gets the location of the target. As you can see, since I have 2 targets, // I have to declare 2 locations. If you add more targets, just make sure you add // the location declaration or it won't work. location lLoca = GetLocation(oTargeta); location lLocb = GetLocation(oTargetb); location lLocc = GetLocation(oTargetc); // This is where the action takes place. You will also need to declare the // actions for each target seperately. ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eMind, GetLocation(oTargeta)); ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eMind, GetLocation(oTargetb)); ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eMind, GetLocation(oTargetc)); // This tells the script to go to sequence 5. DelayCommand(1.5, next5()); } // This is the fifth lightning strike. void next5() { // This is the lightning visual effect. effect eMind = EffectVisualEffect(VFX_IMP_LIGHTNING_M); // This is where you declare the tag of the target, I use an invisible object // placeable. Each target must be a unique tag for the script to work properly. object oTarget = GetObjectByTag("light_targ_005"); // This gets the location of the target. location lLoc = GetLocation(oTarget); // This is where the action takes place. ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eMind, GetLocation(oTarget)); // This tells the script to go to sequence 6. DelayCommand(1.5, next6()); } // This is the sixth lightning strike. void next6() { // This is the lightning visual effect. effect eMind = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1); // This is where you declare the tag of the target, I use an invisible object // placeable. Each target must be a unique tag for the script to work properly. // As you can see here, I have 2 seperate targets listed, each with a unique tag // This will give you 2 simultaneous lightning strikes. You can add as many as you // like, just be sure each one is declared in the fashion shown a,b,c,d,etc. and // each target has a unique tag. object oTargeta = GetObjectByTag("light_targ_006a"); object oTargetb = GetObjectByTag("light_targ_006b"); // This gets the location of the target. As you can see, since I have 2 targets, // I have to declare 2 locations. If you add more targets, just make sure you add // the location declaration or it won't work. location lLoca = GetLocation(oTargeta); location lLocb = GetLocation(oTargetb); // This is where the action takes place. You will also need to declare the // actions for each target seperately. ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eMind, GetLocation(oTargeta)); ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eMind, GetLocation(oTargetb)); }