View Single Post
Old 05-02-2012, 04:34 PM   #182
Fair Strides 2
Witty Programmer
 
Fair Strides 2's Avatar
 
Join Date: Jan 2012
Location: Oregon, United States
Posts: 595
Current Game: Master of Orion 2
Helpful! 
Quote:
Originally Posted by JCarter426 View Post
These parts are problematic. You've defined one variable multiple times, and even used the variable in the definition. I'm not entirely sure what you're trying to do here, but for one thing you'll need to use multiple variables - eBuff1, eBuff 2, and so on (or something more appropriate - the names are entirely up to you). Anyway, it looks like you're trying to increase Constitution, and then decrease it after 30 seconds, along with some visual effects and stuff. This is a rough guess of what it should look like, then:
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(0, eConI, oTarget, 0.0);
SetEffectIcon(eConI, 69);
DelayCommand(30.0, ApplyEffectToObject(0, eConD, oTarget, 0.0);
I'm not sure what the rest is supposed to be, but I don't see anything obviously wrong - except in one case I think you used a period instead of a comma. You also have it increase by 25, then decrease by only 15, though that might be intentional. I also don't think increasing Constitution actually increases a character's current HP, so you might want to look into that. Not bad for a first attempt, in any case; Force powers are especially tricky, after all.

I believe the cost is in the 2DA, and the class level stuff is in another 2DA, not in the script - I don't think you want someone to be able to select the power and then for it to do nothing when they activate it.

I'd help you both further, but unfortunately I don't have access to my files... I can't even check NWScript. I'll get back to you... eventually.
Well, thanks for the help. I messaged Mandalore at DeadlyStream as well. He mentioned the issue of
Quote:
First problem that jumped out at me: after the

void main()

, you used ( instead of {. That's why the compier said there was a syntax error at line 6.

I'll think on the line 11 error, as that seems to be the same as the turorial one.
So, I'll check out the tut one.

Also, the object of the script at
Code:
eBuff = EffectLinkEffects(eBuff, EffectAbilityIncrease(ABILITY_CONSTITUTION, 25));
and

Code:
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBuff, oTarget, 30.0);
was to increase one's CON by 25 for 30 seconds, or 10 combat rounds, and the revert to normal, at which point this

Code:
fDelayInSeconds = 30.0;
DelayCommand(fDelayInSeconds, eBuff = EffectLinkEffects(eBuff, EffectAbilityDecrease(ABILITY_CONSTITUTION, 15));
would administer a penalty of 15 CON below the normal value for 15 seconds.
Fair Strides 2 is online now   you may: quote & reply,