Jump to content

Home

Throw Lightsaber - caster animation problem


Sikon

Recommended Posts

So the following line:

 

		ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectLightsaberThrow(GetFirstPC()), caster, 1.0);

makes the caster throw his lightsaber at the PC. Everything goes as normal, but while the lightsaber is flying, the caster is seen holding an identical lightsaber; the original lightsaber then returns to him and disappears.

How to make it work properly (TSL)?

Link to comment
Share on other sites

I tried using ActionUseTalentOnObject(TalentSpell(FORCE_POWER_LIGHT_SABER_THROW), GetFirstPC()), but in this case, he just swings the lightsaber in the air without actually throwing it. And yes, he does have the necessary Force power.

Link to comment
Share on other sites

The only thing I can think of is to compare the script to that of one in an existing cutscene that uses the same animation. Then also check and compare the utc files for items and possibly even the friendly hostile status. Those are the only suggestions I have that may help.

Link to comment
Share on other sites

The only thing I can think of is to compare the script to that of one in an existing cutscene that uses the same animation.
Well, the cutscene where Bastila throws her lightsaber at Malak uses the second solution. And what do you mean by the friendly hostile status? His status is Hostile_1.
Link to comment
Share on other sites

Well, when I changed the caster's alignment to friendly, the throwing animation played correctly (I used ActionCastSpellAtObject)... except that in the end, when he was supposed to catch the lightsaber, it disappeared just after reaching his hand. :(

Link to comment
Share on other sites

Just a little something that may shed some light on what is happening. The throw lightsaber has 3 animations (animations.2da):

69 throwsab: throw lightsaber which is the preparation move where the npc swings the lightsaber

70 throwsablp: npc animation waiting for the saber when it's flying (lightsaber is removed from hand)

71 catchsab: catch animation

 

and when using the EffectLightsaberThrow it shows only the lightsaber in the air, no npc animation. For some reason, ActionCastSpellAtObject only shows the npc animations.

 

However, UseTalentOnObject works. This is what the game uses in the cutscene with Malak and Bastila on the Leviathan (decompiled k_plev_finale1.ncs):

 

void main() {
object oBastila = GetObjectByTag("bastila");
object oDarthmalak400 = GetObjectByTag("darthmalak400");
talent talSpell = TalentSpell(FORCE_POWER_LIGHT_SABER_THROW);
AssignCommand(oBastila, ActionUseTalentOnObject(talSpell, oDarthmalak400));
DelayCommand(1.0, SetDialogPlaceableCamera(30));
ActionPauseConversation();
ActionWait(1.9);
ActionResumeConversation();
}

I got Mira to attack me with this and all the animations were ok. There's no need to tweak factions.

Link to comment
Share on other sites

saberthrow.jpg

Well, here is a picture of Darth Sion before, during and after the throw. After the throw, he acts as if the lightsaber was in his hand (at least the flourish animation suggests it), but it is invisible. When I make him hostile, though, the lightsaber appears just as he rushes to attack the player. Changing his Dark Jedi lightsaber to a regular one doesn't help.

Link to comment
Share on other sites

saberthrow.jpg

Well, here is a picture of Darth Sion before, during and after the throw. After the throw, he acts as if the lightsaber was in his hand (at least the flourish animation suggests it), but it is invisible. When I make him hostile, though, the lightsaber appears just as he rushes to attack the player. Changing his Dark Jedi lightsaber to a regular one doesn't help.

 

I believe this is a bug with the saber throw effect when used during "cutscene camera mode". I've noticed in my arena mod that if you watch jedi fight through the spectator cameras their saber often disappears visually after they have thrown even though they still fight with it, but the visuals show correctly again after you exit the camera.

 

If you are using this during a cutscene or dialog, try briefly exit and re-enter the dialog/cutscene when he throws the saber.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...