Thanks, Craig. I just overrided
rules_core.nss, but I am not getting what I want... I can stop the player from using abilities and items and such, but they are still allowed to move around. In fact,
EVENT_TYPE_COMMAND_PENDING isn't even called when attempting to walk/run. However,
EVENT_TYPE_COMMAND_COMPLETE is...
I have found something else that is interesting however... I was looking at some of the core modal spell scripts, and came across this line for the Combat Magic implementation. In it, there is a comment from Georg stating that they are disabling the use of the function,
SetEffectFlags. Here's a snippet:
case ABILITY_SPELL_COMBAT_MAGIC:
{
eEffects[0] = EffectModifyProperty(PROPERTY_ATTRIBUTE_ATTACK, COMBAT_MAGIC_ATTACK_BONUS + MaxF(GetCreatureSpellPower(stEvent.oCaster)/5.0,0.0) );
// -----------------------------------------------------------------
// Georg: One of the earlier designs for the spell called for it
// to disable spellcasting. This was found not working well
// so instead we're now balancing through increased fatigue
// -----------------------------------------------------------------
// eEffects[0] = SetEffectFlags(eEffects[0], EFFECT_FLAG_DISABLE_SPELLS);
eEffects[0] = SetEffectEngineInteger(eEffects[0], EFFECT_INTEGER_VFX, Ability_GetImpactObjectVfxId(stEvent.nAbility));
}
I never even knew of this
SetEffectFlags function. I of course started to look up the various flags, and tried adding it to my code. Here is a snippet (this code essentially increases the spellpower of the user):
//apply effect
eEffects[0] = EffectModifyProperty(PROPERTY_ATTRIBUTE_SPELLPOWER, 100.0);
eEffects[0] = SetEffectEngineInteger(eEffects[0], EFFECT_INTEGER_VFX, Ability_GetImpactObjectVfxId(stEvent.nAbility));
//eEffects[1] = EffectRoot();
eEffects[0] = SetEffectFlags(eEffects[0], EFFECT_FLAG_DISABLE_MOVEMENT);
eEffects[0] = SetEffectFlags(eEffects[0], EFFECT_FLAG_DISABLE_COMBAT);
eEffects[0] = SetEffectFlags(eEffects[0], EFFECT_FLAG_DISABLE_INPUT);
eEffects[0] = SetEffectFlags(eEffects[0], EFFECT_FLAG_DISABLE_ITEMS);
eEffects[0] = SetEffectFlags(eEffects[0], EFFECT_FLAG_DISABLE_SKILLS);
eEffects[0] = SetEffectFlags(eEffects[0], EFFECT_FLAG_DISABLE_SPELLS);
eEffects[0] = SetEffectFlags(eEffects[0], EFFECT_FLAG_DISABLE_TALENTS);
eEffects[0] = SetEffectFlags(eEffects[0], EFFECT_FLAG_DISABLE_TURNING);
So, the spellpower addition works just as before. When I try to use a spell, I can click on the target, but nothing happens. I assume it would be the same for skills/talents. However, I am still able to move around and such. Is there anything I am missing? Is there some other local/global variable that has to be set in order to make these flags work?
Thanks.
Modifié par Challseus, 25 novembre 2009 - 04:36 .