N-DReW25

TSL Special Force Powers and Death script

Recommended Posts

This will be a single thread asking two separate questions.

 

The first question, can anyone be able to identify the scripts which gives the player Force Enlightenment or Force Crush depending if they completed the Enclave either Light Side or Dark Side?

The second question, I am working on a cut-scene which involves multiple "generic goon" NPCs being "killed" by another NPC in the cutscene, in my attempt to find the script I am 98% sure that "EffectDeath" is the key here. The best example of what I am referring to is that one scene where Darth Traya "kills" a bunch of Sith Assassins off screen as seen here.

kreiadrk.png.2f413ee5e46c04c33e228dc3c53

 

Would anyone be able to assist?

Share this post


Link to post
Share on other sites

How you kill an NPC depends on what the scene dictates. If there is a direct attack, either melee or ranged, then you can typically just have them engage in actual combat with the aid of some assured hits. If you want a display of Force powers, then you'll probably want to go the EffectDeath route prefaced with one or more uses of ActionCastFakeSpellAtObject, assuming you want someone to be shown actually using the power. In the Kreia case she's just doing the "too cool to look at the explosion" routine, so the mooks presumably just play the choking or whatever animation.

Share this post


Link to post
Share on other sites
21 hours ago, DarthParametric said:

How you kill an NPC depends on what the scene dictates. How you kill an NPC depends on what the scene dictates. If there is a direct attack, either melee or ranged, then you can typically just have them engage in actual combat with the aid of some assured hits. If you want a display of Force powers, then you'll probably want to go the EffectDeath route prefaced with one or more uses of ActionCastFakeSpellAtObject, assuming you want someone to be shown actually using the power. In the Kreia case she's just doing the "too cool to look at the explosion" routine, so the mooks presumably just play the choking or whatever animation.

This is a stunt module, in theory the NPCs don't technically have to 'die' because you only see the scene once, they only need to appear dead for the duration of the scene once they supposedly 'die'. But because the NPC who has the dialogue attached to them doesn't die I guess the NPCs who do need to die can die either way.

 

The way they die is a lot more exactly like what happens with the Kreia scene, the screen turns black and the NPCs just drop dead suggesting Kreia did something to them.  I checked the source script for that scene and this appears to be the script which does the trick:

Spoiler

        case 3:
            {
                int int4 = 0;
                int4 = 0;
                while ((int4 < 7)) {
                    DelayCommand((IntToFloat(int4) / 2.4), ApplyEffectToObject(2, EffectDeath(1, 0, 1), GetObjectByTag("SithAssassin", int4), 0.0));
                    (int4++);
                }
            }
            break;

 

I tried searching for some vanilla scripts where an NPC 'dies' during a cutscene, I checked the Squik scene on Nar Shaddaa and Coran Falt's death scripts but they led me no where so I ended up coming up with this down below:
(It compiles just fine but in-game it appears to have no effect, I did mash this up from a script which the 'effect' was a stealth effect so maybe that's the reason this flopped)

Spoiler

void main() {
    effect EffectDeath;
    object oSith1 = GetObjectByTag("Sith1", 0);
    object oSith2 = GetObjectByTag("Sith2", 0);
    object oSith3 = GetObjectByTag("Sith3", 0);
    object oSith = GetObjectByTag("Sith", 0);
    int nParam1 = GetScriptParameter(1);
    if ((nParam1 == 1)) {
        ApplyEffectToObject(2, EffectDeath, oSith1, 0.0);
        ApplyEffectToObject(2, EffectDeath, oSith2, 0.0);
        ApplyEffectToObject(2, EffectDeath, oSith3, 0.0);
        ApplyEffectToObject(2, EffectDeath, oSith, 0.0);
    }
    else {
        if ((nParam1 == 2)) {
            DelayCommand(1.0, DestroyObject(oSith3, 0.0, 1, 0.0, 0));
        }
    }
}

 

Share this post


Link to post
Share on other sites
20 minutes ago, N-DReW25 said:

the NPCs don't technically have to 'die' because you only see the scene once

It's actually typically less screwing around to just kill an NPC than to have them fake it.

As to your script, you are checking for script parameters. Have you set those accordingly in the appropriate DLG nodes?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.