I'm trying to use a script to add the flow of the Silver Sword of Gith to a weapon. The effect file it is using is fx_silversword1 or something like that and not one of the normal visual effects. creating a new special effect/particle effect and then adding the effect to object but it doesn't work. Anyone have any ideas?
I know the effect is addable throught the tool set and blueprints but i want to be able to add the effect to a weapon dynamically in game through a script.
Weapon Particle Affect
Débuté par
mchotdog33
, oct. 27 2011 04:11
#1
Posté 27 octobre 2011 - 04:11
#2
Posté 28 octobre 2011 - 04:53
This is the general idea. I am not 100% sure on the order of the parameters or the function names because I don't have the toolset in front of me. The following code will make the effect last for fDuration seconds on oTarget.
effect eSword = EffectNWN2SpecialEffectFile("fx_silversword1");
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,oTarget,eSword,fDuration);
effect eSword = EffectNWN2SpecialEffectFile("fx_silversword1");
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,oTarget,eSword,fDuration);
#3
Posté 28 octobre 2011 - 09:00
ParticleEffect is on the broken functions list, stickyed in this forum.
"These seem to cause an error, the first a runtime error, the second does not
leave an effect to remove.
EffectNWN2ParticleEffect <-- causes an error if you use it???
EffectNWN2ParticleEffectFile<- no result at all"
"These seem to cause an error, the first a runtime error, the second does not
leave an effect to remove.
EffectNWN2ParticleEffect <-- causes an error if you use it???
EffectNWN2ParticleEffectFile<- no result at all"
#4
Posté 28 octobre 2011 - 11:52
Hmm weird, i tried using
effect eSword = EffectNWN2SpecialEffectFile("fx_silversword1");
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,oTarget,eSword,fDuration);
but nothing happened at all. Guess i'll give it another go.
effect eSword = EffectNWN2SpecialEffectFile("fx_silversword1");
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,oTarget,eSword,fDuration);
but nothing happened at all. Guess i'll give it another go.
#5
Posté 29 octobre 2011 - 12:41
mchotdog33 wrote...
Hmm weird, i tried using
effect eSword = EffectNWN2SpecialEffectFile("fx_silversword1");
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,oTarget,eSword,fDuration);
but nothing happened at all. Guess i'll give it another go.
Post the entire script so we can have a look at it and see what is happening.
#6
Posté 29 octobre 2011 - 03:22
mchotdog33 wrote...
Hmm weird, i tried using
effect eSword = EffectNWN2SpecialEffectFile("fx_silversword1");
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,oTarget,eSword,fDuration);
but nothing happened at all. Guess i'll give it another go.
I think it shouldt be "fx_silversword01". I found this SEF in /vfx/NWN2_VFX_X1/fx_battle. Since you are calling an SEF (even though you don't use .sef in the filename) so there needs to be an SEF with the actual filename.





Retour en haut






