Aller au contenu

Photo

Displaying Hellfire VFX in multiplayer.


  • Veuillez vous connecter pour répondre
Aucune réponse à ce sujet

#1
DanEzra633

DanEzra633
  • Members
  • 6 messages
Similar to the sneak animation, the VFX for hellfire blast and hellfire shield are not seen by other players in persistant worlds. I'm very new to scripting and trying to figure out the best way to detect if either mode was active and if so, apply the VFX for everyone to see.

I'm not sure if the best way to accomplish this would be putting the code on an object that would sit in the PC's inventory or if there's a better way.

Here's the non-functioning code I've been playing with.

void main()
{
object  oPC = GetOwnedCharacter()
effect    eBlast = EffectNWN2SpecialEffectFile("fx_spell_hellfire_blast");
effect    eShield = EffectNWN2SpecialEffectFile("fx_spell_hellfire_shield");

    if (GetActionMode(oPC,ACTION_MODE_HELLFIRE_BLAST)==TRUE)
        {ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBlast, oPC);}
    if (GetActionMode(oPC,ACTION_MODE_HELLFIRE_SHIELD)==TRUE)
        {ApplyEffectToObject(DURATION_TYPE_PERMANENT, eShield, oPC);}   
    if (GetActionMode(oPC,ACTION_MODE_HELLFIRE_BLAST)==FALSE)
    {RemoveSEFFromObject(oPC,"fx_spell_hellfire_blast");}
    if (GetActionMode(oPC,ACTION_MODE_HELLFIRE_SHIELD)==FALSE)
    {RemoveSEFFromObject(oPC,"fx_spell_hellfire_shield");}
}

Any advice on how I'd go about accomplishing this on a PW?

Modifié par DanEzra633, 04 octobre 2010 - 05:19 .