Question about "flat-footed"
#1
Guest_Scrotok_*
Posté 25 novembre 2012 - 07:06
Guest_Scrotok_*
Is there a way to determine whether someone is "flat-footed" via scripting?
http://nwn.wikia.com/wiki/Flat-foot
Thanks!
JP
#2
Posté 25 novembre 2012 - 08:03
#3
Posté 26 novembre 2012 - 12:52
action_invalid is returned alsoi in case of using healers kit, but that makes char flatfooted so no prob, question is what is the return of this function when character is walking via keyboard and not mouse (which makes no action in queve)
it is cetainly not reliable, but without NWNX you hardly can do better
NWNX related, I have developd both function getisflatfooted and getisflanked, sent source to the Terra777 as I added it into his nwnx_funcs, don't know if he already released a new version though
#4
Posté 29 novembre 2012 - 01:32
there is a custom function inside NWScript. Its definitely not 100% reliable and there might be some other circumstances I have missed or misinterpreted.int GetIsFlatfooted(object oCreature=OBJECT_SELF)
{
if(GetHasFeat(FEAT_UNCANNY_REFLEX,oCreature))
{
return FALSE;
}
switch(GetCurrentAction(oCreature))
{
case ACTION_DISABLETRAP:
case ACTION_EXAMINETRAP:
case ACTION_FLAGTRAP:
case ACTION_INVALID:
case ACTION_LOCK:
case ACTION_OPENLOCK:
case ACTION_RECOVERTRAP:
case ACTION_REST:
case ACTION_SETTRAP:
case ACTION_SIT:
case ACTION_TAUNT:
case ACTION_WAIT:
return TRUE;
}
int bBlindFight = GetHasFeat(FEAT_BLIND_FIGHT,oCreature);
effect e = GetFirstEffect(oCreature);
while(GetIsEffectValid(e))
{
switch(GetEffectType(e))
{
case EFFECT_TYPE_ENTANGLE:
case EFFECT_TYPE_CUTSCENEIMMOBILIZE:
return TRUE;
case EFFECT_TYPE_BLINDNESS:
if(!bBlindFight) return TRUE;
break;
}
e = GetNextEffect(oCreature);
}
return GetMovementRate(oCreature) < 2;
}
Im unsure whether the creature is already flatfooted when she has the action to open lock assigned, but she is running towards locked object. As well I dont even know if its ACTION_OPENLOCK returned in such moment. Also I dont know whether cutscene immobilize effect type ID is correctly returned by the function GetEffectType - lexicon says nothing about any weirdness so I guess it does.
Modifié par ShaDoOoW, 01 décembre 2012 - 09:15 .





Retour en haut






