Aller au contenu

Photo

Trouble with "fx_energy_field_1" VFX


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
I'm trying to use the energy field VFX.  I am certain that the file is "fx_energy_field_1.sef".  I have tried applying it to a location and to an object and can't get it to fire.  I have tried using a waypoint, placeable, and creature as the object to apply it to.

Here's the script:


void main()
{
//object oWPT1_1 = GetWaypointByTag("2023_wpt_barrier_1_1");
object oWPT1_1 = GetWaypointByTag("testball");
object oWPT1_2 = GetWaypointByTag("2023_wpt_barrier_1_2");
object oWPT2_1 = GetWaypointByTag("2023_wpt_barrier_2_1");
object oWPT2_2 = GetWaypointByTag("2023_wpt_barrier_2_2");
effect eWall1 = EffectNWN2SpecialEffectFile("fx_energy_field_1.sef",oWPT1_1);
effect eWall2 = EffectNWN2SpecialEffectFile("fx_energy_field_2.sef");
 
location l1_1 = GetLocation(oWPT1_1);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eWall1,oWPT1_1);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eWall1,oWPT1_2);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eWall2,oWPT2_1);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eWall2,oWPT2_2);
}

#2
Orion7486

Orion7486
  • Members
  • 161 messages
There's no problem with the effect itself. If you place a creature down in the area, within the creature's appearance window, there is a field called Appearance Visual Effect. Scroll down the list and that effect is listed and will be attached to it if you select it. Just tried it.

Changed your script around to have it appear on a waypoint. To apply it to a waypoint you have to use ApplyEffectAtLocation. This is an onenter script:



void main()

{

object oPC = GetEnteringObject();

object oWPT1_1 = GetWaypointByTag("testball");

effect eWall1 = EffectNWN2SpecialEffectFile("fx_energy_field_1.sef",oWPT1_1);

location l1_1 = GetLocation(oWPT1_1);



if (!GetIsPC(oPC)) return;



ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, eWall1, l1_1);

}

#3
Guest_ElfinMad_*

Guest_ElfinMad_*
  • Guests
Try leaving the ".sef" out of the string you pass to the function. Also, passing and object in EffectNWN2SpecialEffectFile is unecessary unless the effect is a beam according to the function description.

#4
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Thanks for the help, I used the location of a waypoint and it worked as intended!