Aller au contenu

Photo

get value of concealment


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

#1
acomputerdood

acomputerdood
  • Members
  • 219 messages
 so, checking if a target is concealed is simple:

    if(GetHasEffect(EFFECT_TYPE_CONCEALMENT, oTarget)){        SpeakString("concealed!");    }

but how do i check to see what the % of concealment is?

#2
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
Hopefully someone will correct me,

I do not think it can be done within vanilla NWN. There may be a way to do it with NWNx, Hopefully if I am not corrected, Someone will be able to tell you about a NWNx way.

#3
Kato -

Kato -
  • Members
  • 392 messages
Nwnx_funcs can do it, indeed, but it IIRC it works on effects created with the include functions. A text search for "effect" will quickly point to the functions dealing with effects in the main include file(nwnx_funcs).


Kato

Modifié par Kato_Yang, 02 mai 2012 - 10:06 .


#4
leo_x

leo_x
  • Members
  • 223 messages
If you're using linux server you can use this function in Acaos' nwnx_structs plugin:

/* Returns the internal effect integer at the index specified. The index
* is limited to being between 0 and 15, and which index contains what
 * value depends entirely on the type of effect. */
int GetEffectInteger (effect eEffect, int nIndex);

An EffectConcealment stores the % value at index 0 and the MISS_CHANCE_TYPE_* in index 4

If it's had VersusRacialTypeEffect applied to it then the race is stored in index 1, if not it will be RACIAL_TYPE_INVALID.

If it's had VersusAlignmentEffect applied to it then alignment versus law/chaos is stored in index 2, and versus alignment good/evil in index 3; if not these will be 0.

(EffectMissChance functions identically)

Modifié par pope_leo, 03 mai 2012 - 08:16 .