Vissual ffects and stuff..
#1
Posté 22 août 2013 - 06:38
Any ideas?
Andy.
#2
Posté 22 août 2013 - 06:48
#3
Posté 22 août 2013 - 07:29
I made a conversation script to create a VFX at the location of an object using the name of its SEF. You could put a waypoint in the place where you want the creature to spawn, and use one ga_ script to spawn it at the waypoint, and my ga_ script to put the VFX there.
//////////////////////////////////////////////////////////////////////////////
//
// ga_vfx
// by Tchos
//
// Applies a VFX .sef at a location (for waypoints).
//
//////////////////////////////////////////////////////////////////////////////
void main(string sFX, string sObjectTag, int iDurType=0, float fDuration=0.0f)
{
object oFXloc = GetObjectByTag(sObjectTag);
if ((oFXloc == OBJECT_INVALID) || (sObjectTag == "")) { oFXloc = OBJECT_SELF; }
location lFXloc = GetLocation(oFXloc);
effect eFX = EffectNWN2SpecialEffectFile(sFX);
ApplyEffectAtLocation(iDurType, eFX, lFXloc, fDuration);
}
/*
DURATION_TYPE_INSTANT = 0;
DURATION_TYPE_TEMPORARY = 1;
DURATION_TYPE_PERMANENT = 2;
*/
My note "for waypoints" might be ambiguous. In my experience, you can't apply a VFX directly to a waypoint, or it won't show up, so I have the script apply the effect at the location of the objects whose tag is specified. The object doesn't have to be a waypoint for the script to work. By default, it applies the effect to the location of the conversation owner.
I use the VFX browser part of the PowerBar plugin to look through the effects and get the names of their SEFs.
Modifié par Tchos, 07 novembre 2015 - 09:47 .
- kamal_ aime ceci
#4
Posté 22 août 2013 - 09:36
#5
Posté 22 août 2013 - 11:33
I've created a similar conversation script to Tchos, although I've included the option to apply the effect to either a location or an object.
#6
Posté 23 août 2013 - 01:21
I also wrote a function to apply a VFX directly to an object rather than its location, but I never added that functionality to the conversation version of the script.
A script like this could also be combined with a spawning script to make a more convenient "spawn creature with effect" script.
Modifié par Tchos, 23 août 2013 - 01:23 .
#7
Posté 23 août 2013 - 08:39





Retour en haut






