View Single Post
Old 05-03-2012, 05:02 PM   #184
Fair Strides 2
Witty Programmer
 
Fair Strides 2's Avatar
 
Join Date: Jan 2012
Location: Oregon, United States
Posts: 522
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));
I also realized you were trying to link the effects. You did part of it right, but some of it was out of order, or not applicable, hence my confusion.

Now, you have three effects (well, four, but visuals can't be linked) - two are fired at different times and last for different durations, and one is simply an icon. So you really don't need to link them. But if you insist on it, then it would look something like this:


Code:
object oTarget = GetSpellTargetObject(); 
effect eVFX = EffectVisualEffect(VFX_IMP_BATTLE_MED_III);
effect eConI = EffectAbilityIncrease(ABILITY_CONSTITUTION, 25);
effect eIcon = SetEffectIcon(eConI, 69);
effect eLink = EffectLinkEffects(eConI, eIcon);
effect eConD = EffectAbilityDecrease(ABILITY_CONSTITUTION, 15);

ApplyEffectToObject(1, eVFX, oTarget, 3.0);
ApplyEffectToObject(1, eLink, oTarget, 30.0);
DelayCommand(30.0, ApplyEffectToObject(1, eConD, oTarget, 15.0));
That should simply link the icon and the CON increase. I don't believe it's necessary because SetEffectIcon should already function like that, but I could be wrong.
Thanks. As was stated in my original post, I used this Which clearly stated that if I wanted to make my own buff Power, to simply substitute my stuff in. I copied and pasted the code into Notepad and saved it as a make-shift tutorial. I did so for each code box and labeled them "Buff_Power-Extended" and "Buff_Power" accordingly. Then when I did mine, I skipped the level checks, and now that I think about it, the linked effects were probably used to relate to each level check.

Hence my confusion as well. I'll re-do the script as soon as I fix my TSL game. I'm using the factory discs, no torrents, and when I insert the play disc(after Disc 4 of course),...AND MY COMPUTER EMERGENCY RESTARTS!!!

I might have to re-install Windows...


Also, how would I script that if I was to not link it, and what would be the difference between the linked and not-linked versions? Thank you, JC!
Fair Strides 2 is offline   you may: quote & reply,