View Single Post
Old 05-05-2012, 07:54 PM   #190
Fair Strides 2
Witty Programmer
 
Fair Strides 2's Avatar
 
Join Date: Jan 2012
Location: Oregon, United States
Posts: 550
Current Game: Master of Orion 2
Helpful! 
Quote:
Originally Posted by JCarter426 View Post
Code:
object oTarget = GetSpellTargetObject(); 
effect eVFX = EffectVisualEffect(VFX_IMP_BATTLE_MED_III);
effect eConI = EffectAbilityIncrease(ABILITY_CONSTITUTION, 25);
effect eConD = EffectAbilityDecrease(ABILITY_CONSTITUTION, 15);

ApplyEffectToObject(1, eVFX, oTarget, 3.0);
ApplyEffectToObject(1, eConI, oTarget, 30.0);
SetEffectIcon(eConI, 69);
DelayCommand(30.0, ApplyEffectToObject(1, eConD, oTarget, 15.0));
Good luck.
I tried and I'm not sure how to splice that into my messed up script. On the other hand, though, My messed up script is almost fixed. One error at present.
Code:
#include "k_inc_force"

int FORCE_POWER_FINAL_STAND = 16;

void main()
{

        object oTarget = GetSpellTargetObject();        
        effect eTargetVisual;                           
        effect eBuff;                                   



        if(GetHasSpell(FORCE_POWER_FINAL_STAND))
        {
        Sp_RemoveSpellEffectsGeneral(FORCE_POWER_FINAL_STAND, oTarget);
        }

        SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId()));


        eBuff = SetEffectIcon(eBuff, 69);
        eTargetVisual = EffectVisualEffect(VFX_IMP_BATTLE_MED_III);

        eBuff = EffectLinkEffects(eBuff, EffectAbilityIncrease(ABILITY_CONSTITUTION, 25));

        ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eTargetVisual, oTarget, 3.0);
        ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBuff, oTarget, 30.0);

        fDelayInSeconds = 30.0;
        DelayCommand(fDelayInSeconds(eBuff, EffectAbilityDecrease(ABILITY_CONSTITUTION, 15))
        ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBuff, oTarget, 15.0);
}
I hit compile, and I get an error at line 32 because of the "ApplyEffectToObject" in the beginning.


Here's my attempt to splice it. Yes, I know it looks bad.

Code:
#include "K_inc_force"

int FORCE_POWER_FINAL_STAND = 16;

void main()
{
     object oTarget = GetSpellTargetObject();
     effect eTargetVisual; 


     if(GetHasSpell(FORCE_POWER_FINAL_STAND))
     {
      Sp_RemoveSpellEffectsGeneral(FORCE_POWER_FINAL_STAND, oTarget);
     }


 
     effect eVFX = EffectVisualEffect(VFX_IMP_BATTLE_MED_III);
     effect eConI = EffectAbilityIncrease(ABILITY_CONSTITUTION, 25);
     effect eConD = EffectAbilityDecrease(ABILITY_CONSTITUTION, 15);


     SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId()));
     ApplyEffectToObject(1, eVFX, oTarget, 3.0);
     ApplyEffectToObject(1, eConI, oTarget, 30.0);
     SetEffectIcon(eConI, 69);
     DelayCommand(30.0, ApplyEffectToObject(1, eConD, oTarget, 15.0));
}
With errors at line 13 for undeclared identifier for "Sp_RemoveSpellEffectsGeneral" and line 18 at undeclared identifier for "VFX_IMP_BATTLE_MED_III" and required argument missing in call to "EffectVisualEffect".
Fair Strides 2 is online now   you may: quote & reply,