Function to play VFX
#1
Guest_dewkl_*
Posté 01 avril 2010 - 05:16
Guest_dewkl_*
#2
Posté 01 avril 2010 - 05:23
#3
Guest_dewkl_*
Posté 01 avril 2010 - 08:13
Guest_dewkl_*
Engine_ApplyEffectAtlocation(int nDurationType, effect eEffect, location lLocation, float fDuration, object oCreator, int nAbilityId)
How do you get the actual visual effect? Do you have to get the ability/effect itself that is linked to the VFX? I thought the effect type was gameplay/mechanical, something that altered the numeric properties of an object. I'm confused. Could someone make a short example with this function?
Modifié par dewkl, 01 avril 2010 - 08:14 .
#4
Posté 01 avril 2010 - 08:37
dewkl wrote...
How do you get the actual visual effect? Do you have to get the ability/effect itself that is linked to the VFX?
effect eMyEffect = EffectVisualEffect(nVfxId); //create a variable for the visual effect with the ID you want
Engine_ApplyEffectAtLocation(duration_type, eMyEffect, location, etc);
Modifié par Barrett R, 01 avril 2010 - 08:37 .
#5
Posté 02 avril 2010 - 07:05
I'm trying to have a creature explode with a mind blast animation and knock back when it dies, as a new creature is spawned from the blast. I've gotten the new creatures to spawn, so the basic mechanics of my creature intercept script are working. But the vfx and knockback effect don't seem to be firing. Any ideas? Here is the relevant script:
#include "spell_constants_h"
case EVENT_TYPE_DYING:
{
location lWisp = GetLocation(OBJECT_SELF);
effect eBlast = EffectVisualEffect(1526); //1526 = Mind Blast in vfx_base.xls
CreateObject(OBJECT_TYPE_CREATURE, R"wh_wisp.utc", lWisp);
ApplyKnockbackAoe(OBJECT_SELF);
Engine_ApplyEffectAtLocation(EFFECT_DURATION_TYPE_INSTANT, eBlast, lWisp, MIND_BLAST_DURATION);
Modifié par Qutayba, 02 avril 2010 - 07:05 .
#6
Posté 02 avril 2010 - 11:12
The knockback effect is likely being removed on death, making it more or less irrelevant. If you really want to use it you would likely have to make the creature immortal and fake the death, then destroy the creature or set it inactive.
Modifié par Craig Graff, 02 avril 2010 - 05:27 .
#7
Posté 06 avril 2010 - 09:17
#8
Posté 03 octobre 2010 - 02:11
am i to understand that if i've created a custom vfx... i can't use this? i can't just call up the local resource vfxproj or whatever and spawn it? it has to have a 2da line entry as an identifier? GAH!
oh heh... maybe i'll apply it on a placeable... :X wait... can i apply it to a placeable just from local? GAH!
and can somebody expand the wiki tutorials to include this end part -- how to USE the vfx you've created? that'd be handy. thanks!





Retour en haut






