Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Scripting: animation loops

Page: 1 of 1
 VarsityPuppet
11-07-2009, 11:11 AM
#1
Hi all, I've started early production on more force powers, and I'm having trouble with this one in particular.

//Healing Trance
//
//Script by: VarsityPuppet

#include "k_inc_force"

void main(){

effect eStay = EffectEntangle();
object SelfPlace = GetObjectByTag("invis_mark");

//This is to stop the PC from moving during the duration of the animation.
//It's currently rigged to last 10 seconds, because I can't figure out how to
//apply it and remove it at will.
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eStay, OBJECT_SELF, 10.00);

if(GetIsObjectValid(SelfPlace) == FALSE){

//THis is the sitting down to meditate animation
AssignCommand(OBJECT_SELF, ActionPlayAnimation(10456, 1.00));

//just my little way to make a in-game boolean object
object oSelfPlace = CreateObject(OBJECT_TYPE_PLACEABLE, "invis_mark", GetLocation(OBJECT_SELF));

//The meditation loop. It only lasts about 1 second and then it stops
DelayCommand(0.75, AssignCommand(OBJECT_SELF, ActionPlayAnimation(10457, 1.0, -1.0)));
}

else{
//assuming the meditation loop WOULD HAVE WORKED, this is the getting
//up animation.
AssignCommand(OBJECT_SELF, ActionPlayAnimation(10456, -1.00));

//The effect is never removed.
RemoveEffect(OBJECT_SELF, eStay);
DestroyObject(SelfPlace);
}
}




So, there are 3 things that I need help with, if you didn't read the script comments

1 - How do I make looping animations play continually?

2 - How do I apply/remove the entangle effect on the PC?

3 - I forgot the third thing
Page: 1 of 1