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);
}
Trouble with "fx_energy_field_1" VFX
Débuté par
M. Rieder
, févr. 04 2011 07:31
#1
Posté 04 février 2011 - 07:31
#2
Posté 04 février 2011 - 08:09
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);
}
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_*
Posté 04 février 2011 - 08:38
Guest_ElfinMad_*
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
Posté 05 février 2011 - 12:06
Thanks for the help, I used the location of a waypoint and it worked as intended!





Retour en haut






