Aller au contenu

Photo

Need a starting conditional


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
archer4217

archer4217
  • Members
  • 105 messages
Hiya sweeties,

I need a starting conditional that checks to see if the PC is dazed, but the script generator doesn't give an option to check on the present condition of a PC.

Any help is greatly appreciated.

:)

#2
Fester Pot

Fester Pot
  • Members
  • 1 395 messages

int StartingConditional()
{

object oPC = GetPCSpeaker();

if (! (GetHasSpellEffect(SPELL_DAZE, oPC)) ) return FALSE;

return TRUE;
}


FP!

#3
archer4217

archer4217
  • Members
  • 105 messages
Thank you so much, sweetie! *huggles*:kissing:

#4
Xardex

Xardex
  • Members
  • 217 messages
Doesn't GetHasSpellEffect only return true if the target actually is under the effects of the specified spell?

int StartingConditional()
{
    object oPC = GetPCSpeaker();
    effect eEff = GetFirstEffect(oPC);

    while (GetIsEffectValid(eEff))
    {
        if (GetEffectType(eEff) == EFFECT_TYPE_DAZED) {return TRUE;}
        eEff = GetNextEffect(oPC);
    }

    return FALSE;
}


This should work, no matter what the source of the daze is.

Modifié par Xardex, 25 octobre 2011 - 02:56 .


#5
archer4217

archer4217
  • Members
  • 105 messages
Thank you sweetie. *huggles*