Salk

[KotOR] Force wounded animation

Recommended Posts

Hello!

I am witnessing the Kolto Control scene where the scientist activates the depressurizing procedure, which will kill the protagonist within 60 seconds.  I don't much like the fact that that after the initial chocking animation (nice) there seems to be no visible consequences on the player. The control is exactly normal. I have made so that every 6 seconds a sixth of the current HPs are drained and I am thinking of slowing the movements down but I'd like to have a permanent visual cue about the distress so I was wondering if there was a way to just force the protagonist's animation to wounded independently from the hit points count. It would need to stay so both when standing and moving until the oxygen is back.

Thanks.

Share this post


Link to post
Share on other sites

There's no ideal way to do it while still allowing active player control. The hacky approach would be to set them to min 1HP, set their HP to 1 (or progress it down like you are doing, but perhaps more aggressively), then either restore them when they turn off the forcefield or kill them within some time limit.

  • Like 1

Share this post


Link to post
Share on other sites

DP,

I have been doing the job and I am satisfied with the result too except that the sequence is tied to the area's heartbeat which means it starts anywhere between 0 and 6 seconds after the dialogue with the scientist ends and I wanted instead to have a consistent delay (I chose 1 second).

For this purpose I moved the script from area's heartbeat to User Define and recalled the script every 6 seconds, simulating the heartbeat delay from hence forth. 

The problem comes if the Player saves during the countdown. The script will be running while the game is being loaded and that is not good but I fear there is no way to disable saving the game?

Cheers!

Share this post


Link to post
Share on other sites

That's how I did initially but then I wouldn't get the wounded animation which I want to have right from the start.

This solution is not ideal but is the closest to what I imagined.

I'm actually even more bothered by some inconsistencies that I cannot do anything about (still part of this scene):

1: The VO talking to the player in plural, even if no party members can follow in there

2: The VO mentioning opening a door when instead it's a force field 

Oh well, cannot have everything... :cheers:

 

Share this post


Link to post
Share on other sites
On 3/1/2020 at 5:30 PM, Salk said:

The problem comes if the Player saves during the countdown. The script will be running while the game is being loaded and that is not good but I fear there is no way to disable saving the game?

You could use the onEnter script to temporarily disable the script while the module is loading.

Something like

void main(){
    if(GetLoadFromSaveGame()){
        SetLocalBoolean(GetArea(OBJECT_SELF), 50, FALSE); /// Disables the behavior
        DelayCommand(2.0, SetLocalBoolean(GetArea(OBJECT_SELF), 50, TRUE)); /// Continue behavior after two seconds
    }
}

 

If GetLoadFromSaveGame() works as described, it might even work if you put this directly into your UD script.

  • Like 1

Share this post


Link to post
Share on other sites

bead-v,

thanks for the suggestion but I took another route. I used SetPlayerRestrictMode() which suits me even better in this particular case.

DP,

I followed your advice and now there is a choke effect for every HP loss. Of course if the player enter the conversation already with very low HPs there won't be additional damage thus no extra chocking  animation other than the initial and final ones.

  • Like 2

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.