View Single Post
Old 05-03-2012, 07:40 PM   #185
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,640
Quote:
Originally Posted by Fair Strides 2 View Post
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.
Ah I see. You had most of it right; mainly it was the last effect, which couldn't be linked to the others because of the reasons I specified.
Quote:
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!
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));
That's the unlinked version. There should be no functional difference in this case unless I'm completely wrong about the icon thing and you really do have to link them. For the record, when scripting I always assume I'm wrong and double check... the engine is a fickle and unpredictable mistress. And I do believe you're right, the linked effects in the tutorial were related to the level checks; it applies different stat bonuses depending on the character's level, with the stat bonuses nested in if/else statements, all linked to some stuff defined earlier on. Frankly I wouldn't do it that way; I'd rather use a subroutine, with the stat bonus as a variable... but that's an entirely different tutorial. And I wasn't sure if you want that or not. This is for having one spell with multiple effects that depend on your level - a 20 point bonus at level 6 and above, a 25 point bonus for level 12 and above, 30 for level 18, and so on; if you simply want to give classes access to the spell at different times, you need a 2DA for that. But if you do want the first thing, come back and I can give you that other tutorial, or you could look at Qui-Gon's.

Good luck.


JCarter426 is offline   you may: quote & reply,