View Single Post
Old 09-23-2012, 02:01 PM   #229
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,636
Quote:
Originally Posted by bead-v View Post
It does heal them if they have max VP, but for 0 points and then you get the floating green zero and a report in the feedback screen. You might not want that in some situations.
Aaaaaaaah, I hadn't considered that.


Quote:
Originally Posted by Fallen Guardian View Post
Okay, so I'm making a script for KotOR II to work in the onEndRound field for a character. Basically, this would make it so that every time you're in combat, and someone is currently attacking you, then you get a decrease to your attack stats and accuracy (dexterity). But, if you're in combat and no one is attacking you, then you get a bonus to your to your attack stats and accuracy (dexterity). And if you're not in combat, it returns your stats to their normal state.
All right, interesting premise.
Quote:
What I would like to know is if this script is actually set up correctly to do that, and if there are any holes in my scripting.
All right, first thing that comes to mind is ClearAllEffects might clear stuff you don't want cleared. There are a few ways to get around that, though.

Second thing that comes to mind is these are permanent effects but the OnEndRound script fires every three seconds during combat. This would lead to a slippery slope, with more and more bonuses or penalties applied until they're ridiculously high or low in a matter of seconds. Change those duration types to temporary and set a duration of three seconds and you should be fine.

Third thing is I'm not sure if OnEndRound ever fires if you aren't in combat, so the reset might never happen. I could be wrong though.

Last thing is GetGoingToBeAttackedBy. The notes say not to use it. But maybe it works like it seems.


JCarter426 is offline   you may: quote & reply,