View Single Post
Old 05-02-2012, 03:11 PM   #181
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,636
Quote:
Originally Posted by Fallen Guardian View Post
Do you know if I were to change the "Lightsaber" to say Blaster Pistol, if it would work or not?
I don't thinks o. I believe it's checking the actual name of the item - i.e. what it is called in the inventory, determined in the UTI somewhere - and it only works in this instance because every lightsaber has "Lightsaber" somewhere in its name. This isn't true of all blasters - the plasma thrower and mining lasers, for example. Since you want to check for any sort of blaster, you'll need to use something else.
Quote:
Originally Posted by Fair Strides 2 View Post
#include "k_inc_force"

int FORCE_POWER_FINAL_STAND = 16;

void main()
(

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



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

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


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 = EffectLinkEffects(eBuff, EffectAbilityDecrease(ABILITY_CONSTITUTION, 15));
}
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.
Quote:
Originally Posted by Fair Strides 2 View Post
I want to add in the following:
Jedi Guardian, Weaponmaster, and Sith Marauder need to be level 20.
Jedi Sentinel, Watchmen, and Sith Assassin need to be level 16
Jedi Consular, Master, and Sith Lord need to be level 14.
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.



Last edited by JCarter426; 08-17-2012 at 10:25 PM.
JCarter426 is offline   you may: quote & reply,