Jump to content

Home

scripting woes undeclared identifier addbonusforcepoints


moda

Recommended Posts

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

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

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

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. :p

Link to comment
Share on other sites

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...