Jump to content

Home

Delayed Force Power effect


Ferc Kast

Recommended Posts

I just created a Force Power today. However, the Force Push effect in it seems to be delayed too long (judging by how long the target is in the air). How would I change it in my script below:

 

void main () {
  [color=PaleGreen]/********************************************/
  /*Defines the caster and the target*/
  /********************************************/[/color]
    object oCaster = OBJECT_SELF;
    object oTarget = GetSpellTargetObject();
  [color=PaleGreen]/**************************/
  /*Defines the effects*/
  /**************************/[/color]
   effect eLightning = EffectBeam(VFX_BEAM_LIGHTNING_DARK_L, oCaster, BODY_NODE_HAND_LEFT);
   effect eCrush = EffectCrush(); 
   effect eDrop = EffectForcePushed();
   effect eDamage = EffectDamage(40, DAMAGE_TYPE_ELECTRICAL);
  [color=PaleGreen]/**************************/
  /*Applies the effects*/
  /**************************/[/color]
   ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLightning, oTarget, 2.0f);
   ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eCrush, oTarget, 2.0f);
   DelayCommand( 0.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDrop, oTarget, 2.0f) );
   ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget);
}

 

 

EDIT: Never mind, I just had to change the 4.0f to 2.0f; Problem solved. I changed the above script to match my solution.

 

Here's a pic of the force power in-action:

k200436iv7.png

Link to comment
Share on other sites

I just created a Force Power today. However, the Force Push effect in it seems to be delayed too long (judging by how long the target is in the air). How would I change it in my script below:

 

void main () {
  [color=PaleGreen]/********************************************/
  /*Defines the caster and the target*/
  /********************************************/[/color]
    object oCaster = OBJECT_SELF;
    object oTarget = GetSpellTargetObject();
  [color=PaleGreen]/**************************/
  /*Defines the effects*/
  /**************************/[/color]
   effect eLightning = EffectBeam(VFX_BEAM_LIGHTNING_DARK_L, oCaster, BODY_NODE_HAND_LEFT);
   effect eCrush = EffectCrush(); 
   effect eDrop = EffectForcePushed();
   effect eDamage = EffectDamage(40, DAMAGE_TYPE_ELECTRICAL);
  [color=PaleGreen]/**************************/
  /*Applies the effects*/
  /**************************/[/color]
   ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLightning, oTarget, 2.0f);
   ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eCrush, oTarget, 2.0f);
   DelayCommand( 0.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDrop, oTarget, 2.0f) );
   ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget);
}

 

 

EDIT: Never mind, I just had to change the 4.0f to 2.0f; Problem solved. I changed the above script to match my solution.

 

Here's a pic of the force power in-action:

k200436iv7.png

 

I saw this when you first posted it, went out to walk my dog, came back meaning to point it out, and realized you'd saved me the effort! :p

 

It's things like this that make me wish I had TSL...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...