lfnetwork.com mark read register faq members calendar

Thread: Force Power Script
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 10-28-2007, 05:35 AM   #1
Marius Fett
Frigged if I know!
 
Marius Fett's Avatar
 
Join Date: May 2007
Location: Wales
Posts: 3,379
Force Power Script

I'm Trying To Make A Custom Force Power But The Script Won't Compile

Here Is The Script I Am Using:

Code:
void main() 
{ 
    SWFP_DaMAGE_TYPE = DAMAGE_TYPE_FIRE; 

    object oSource = OBJECT_SELF; 
    object oTarget = GetSpellTargetObject(); 
 
    effect eBeam = EffectBeam(2053, oSource, 3);
    effect eVFX = EffectVisualEffect(
    effect eDamage = EffectDamage(50);
 
    ApplyEffectToObject(1, eBeam, oTarget, Duration 04.0f);
    ApplyEffectToObject(1, eVFX, oTarget, Duration 04.0f);
 
}
Is There Something Wrong With It?

-DarthDingDong




Visit the new JediKnight.net!
Marius Fett is offline   you may: quote & reply,
Old 10-28-2007, 08:04 AM   #2
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by DarthDingDong
I'm Trying To Make A Custom Force Power But The Script Won't Compile
Here Is The Script I Am Using:
Is There Something Wrong With It?
Yes the script has a number of mistakes. I've added descriptions of them in the green colored code comments above the line in the fixed variant of your script below:
Code:
void main() { 
    // ST: This variable has not been declared, and is not used for anything
    //     anyway, so might as well remove it.
    // SWFP_DaMAGE_TYPE = DAMAGE_TYPE_FIRE; 

    object oSource = OBJECT_SELF; 
    object oTarget = GetSpellTargetObject(); 
 
    effect eBeam = EffectBeam(VFX_BEAM_FLAME_SPRAY, oSource, BODY_NODE_HAND_LEFT);
    
    // ST: The below line was incomplete, no visualeffect index set
    //     and missing closing paranthesis and ending semicolon.
    effect eVFX = EffectVisualEffect(VFX_IMP_FLAME);
    
    // ST: Damage type was not set to fire, while the visuals used are flames.
    //     This effect was never applied to anything either. Added line for that below.
    effect eDamage = EffectDamage(50, DAMAGE_TYPE_FIRE);
 
    // ST: The duration value had "Duration" on front of them on both lines below,
    //     which is not a valid float value.
    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam, oTarget, 4.0f);
    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVFX, oTarget, 4.0f);

    // ST: Added line to apply damage effect created above.
    ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget);
 
}

stoffe is offline   you may: quote & reply,
Old 10-28-2007, 09:23 AM   #3
Marius Fett
Frigged if I know!
 
Marius Fett's Avatar
 
Join Date: May 2007
Location: Wales
Posts: 3,379
Thanks Stoffe

I Have A New Problem Now

I Granted Myself The Power Through KSE To Test It Out And It Worked

Though When I Went To The Power Screen To See If The Icon Showed Up Ok But The Power Isn't There!

Any Advice?




Visit the new JediKnight.net!
Marius Fett is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > Force Power Script

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:13 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.