moda Posted April 19, 2009 Share Posted April 19, 2009 i am working on a series of force powers based on the idea of bathing in either the light or the dark sides of the force these powers also have powerful effects with the power attached to focusing on the darkside supposed to increase your maximum force points by 5 but disabling your automatic health regen however i have encountered an issue whereby i cannnot make the script add bonus forcepoionts any help would be greatly appreciated void main() { object oPC = GetSpellTargetObject(); AdjustAlignment(GetFirstPC(), ALIGNMENT_DARK_SIDE,9); AddBonusForcePoints(oPC, 25); if (!GetIsInCombat(oPC)){ DelayCommand(1.0, AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_MEDITATE, 1.0, 6.0 ))); DelayCommand( 3.0, ApplyEffectToObject( DURATION_TYPE_INSTANT, EffectVisualEffect(1010) , oPC)); AssignCommand(oPC, ClearAllActions()); AssignCommand(oPC, ClearAllEffects()); int nHealAmount = GetMaxForcePoints(oPC) - GetCurrentForcePoints(oPC); if( nHealAmount > 0 ) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHealForcePoints(nHealAmount), oPC); } } Link to comment Share on other sites More sharing options...
Malxados Posted April 19, 2009 Share Posted April 19, 2009 More information would be useful. Is this for K1 or TSL? And is your problem that it won't compile or that it won't work in game? Link to comment Share on other sites More sharing options...
moda Posted April 19, 2009 Author Share Posted April 19, 2009 for tsl and i gave you the exact error it gives me on compile attempt im sorry but i thought anyone replying would know that already based on the error message and the function i was attempting to use Link to comment Share on other sites More sharing options...
Malxados Posted April 19, 2009 Share Posted April 19, 2009 Thats what I thought, but it compiles fine for me using Kotor Tool. What are you using to compile? EDIT: Also, not sure if it will help, but I found this in the function filter: // RWT-OEI 02/06/04 // 801: SetBonusForcePoints - This sets the number of bonus force points // that will always be added to that character's total calculated // force points. void SetBonusForcePoints( object oCreature, int nBonusFP ); Link to comment Share on other sites More sharing options...
moda Posted April 20, 2009 Author Share Posted April 20, 2009 im using kotor tool Link to comment Share on other sites More sharing options...
moda Posted April 20, 2009 Author Share Posted April 20, 2009 funny i reqrote it from scratch and it works fine is there anyway to apply a bonus to the force points for a timed duration ie increase the force points total by 200 for 30 seconds Link to comment Share on other sites More sharing options...
Exile007 Posted April 20, 2009 Share Posted April 20, 2009 im using kotor tool The only problem that I can see is that you may be selecting "script is for Kotor 1" instead of "Kotor 2." Like Malxados said, the script compiles fine for me as well. If you are compiling for K2, maybe restarting Windows would help? That has actually worked for me before. Link to comment Share on other sites More sharing options...
Malxados Posted April 20, 2009 Share Posted April 20, 2009 Im not sure what it does, but there's an effect I found called "EffectTemporaryForcePoints" Link to comment Share on other sites More sharing options...
moda Posted April 20, 2009 Author Share Posted April 20, 2009 I rewrote the script from scratch and that worked trying to work out what are the best bonuses for the two meditation abilities i am using so far light increases your light_side aliggnment as well as giving a small experience bonus (the whole use it for knowledge and defense thing) wheras the darkside one gives additional force points (ie the whole faster easier ) and it gives a large darkside alignment change, currently they can easily be abused to change your alignment but the idea is for a of a more roleplay element you bath in the lightside you get a bonus you bath bin the darkside and you get a bonus was going to make a neutral meditation power but theres no set alignment function which does indeed annoy me Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.