Let's say I have a climbing system - any kind of climbing system that allows a player to go from point A to point B by making checks will do. Now let's say I would like to change the way the checks are handled visually by adding delays to account for the amount of combat rounds it would take to get from point A to point B. I know I could disable player movement using whatever available cinematic commands, I could use waits or something to create the pauses. All that's stuff I could easily look up on nwnlexicon when it comes time to script it.
But what I'd like to do is change the way combat would be handled while this particular set of actions is going on. Without adding anything and just using the wait system, assuming the PC stays right where he initiated the climb and we "pretend" the climb is happening (in other words, click "climb", player stays put and it says "climbing... 10 feet climbed... 20 feet climbed..." etc.), NPCs will be able to attack the player. I like this concept because it lets me play with all kinds of ways to interrupt the climbing, cause the player to fall down, etc.. However what I'd like to do is essentially disable melee attacking during this time, and furthermore, disable attacks of opportunity reprisals from the PC.
Now from my previous thread about Attacks of Opportunity, I understand that combat is all hardcoded, and I therefore cannot disable anything directly. I need to use some kind of trick.
My most immediate thought is to 1) prevent player from climbing while melee engaged (to avoid having to deal with the enemy NPCs being in melee range in the first place) and 2) use ActionEquipMostDamagingRanged(oPC) on all enemies nearby. However it occurs to me that doing this would only work for the initial combat rounds during which the ranged attack is used, and if at any time the foe's attention is grabbed and it would happen to prefer a melee attack, it could easily revert to attacking the PC.
Other than overriding the combat system altogether by jumping the player and enemies to another room and handling it all with a complicated series of cinematic scripting and custom checks, or perhaps placing an invisible barrier placeable between oPC and his enemies upon initiating the climb (which has a high chance of glitching in my estimation given the way locations and creating objects works), I am positively stumped as to what I could do that is simple and elegant. I suppose I might be able to create a trigger on the pallete and then spawn it in x/y location relative to the PC that would have an OnEnter script which affects targetting AI and how it's handled. If that's the best option I would need some tips on how to do this.
I appreciate everyone's help, as usual. Feel free to tell me what I'm trying to do is impossible.
Modifié par Sarcose, 24 février 2012 - 01:09 .





Retour en haut






