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?
get value of concealment
Débuté par
acomputerdood
, mai 01 2012 01:09
#1
Posté 01 mai 2012 - 01:09
#2
Posté 01 mai 2012 - 02:48
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.
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
Posté 02 mai 2012 - 10:01
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
Kato
Modifié par Kato_Yang, 02 mai 2012 - 10:06 .
#4
Posté 03 mai 2012 - 07:59
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)
/* 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 .





Retour en haut






