Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taris North Apartments - Sith Commander plays spurious animation when the attack starts #326

Closed
Salk73 opened this issue Nov 6, 2019 · 6 comments
Labels
Minor Issue Aesthetic issue or other problem that isn't really a bug Module: Taris Issue occurs primarily on Taris Type: Scripting This issue is related specifically to a scripting bug/error

Comments

@Salk73
Copy link

Salk73 commented Nov 6, 2019

This is very minor but I thought of reporting it anyway.

If the party enters the room while the Sith are searching they attack after a brief conversation. The commander moves forward but at a certain point he plays the get low animation (10) which is used when searching by all the three Sith soldiers but only seems to be played one last time by the Sith Commander when they are hostile

@DarthParametric
Copy link
Contributor

They all use the same OUD, which gets signalled to turn them hostile, and the commander is the first one signalled, so not sure what the specific issue is there, assuming it is repeatable.

@Salk73
Copy link
Author

Salk73 commented Nov 7, 2019

I uploaded a video for you to see so that you can check for yourself: https://youtu.be/ckuZtTEdMfE

@DarthParametric
Copy link
Contributor

DarthParametric commented Nov 7, 2019

It doesn't really make any sense. The trigger that fires when entering the apartment that starts the convo should flag their local booleans to stop searching. Their action stacks should have been cleared, and the OnHeartbeat event making them search shouldn't even trigger once they have been set to STANDARD_FACTION_HOSTILE_1, even without the search flag being changed.

I suppose it would be worth trying to directly set them hostile in the attack script that fires at the end of the DLG, rather than just signalling their OUDs like the vanilla version does. Try this and see if it makes any difference:

#include "k_inc_utility"
#include "k_inc_generic"

void BerserkMode(string sTag, int nIndex) {
	
	object oSith = GetObjectByTag(sTag, 0);
	
	// Just to make doubly sure, set their OnHeartbeat search flag to false again
	SetLocalBoolean(oSith, nIndex, FALSE);
	
	AssignCommand(oSith, ClearAllActions());
	DelayCommand(0.1, AssignCommand(oSith, ActionEquipMostDamagingRanged(OBJECT_INVALID)));
	DelayCommand(0.2, ChangeToStandardFaction(oSith, STANDARD_FACTION_HOSTILE_1));
	DelayCommand(0.5, AssignCommand(oSith, GN_DetermineCombatRound(OBJECT_INVALID)));
}

void main() {
	
	BerserkMode("tar02_sithcommander", SW_PLOT_BOOLEAN_01);
	BerserkMode("tar02_sithtrooper", SW_PLOT_BOOLEAN_02);
	BerserkMode("tar02_sithtrooper2", SW_PLOT_BOOLEAN_03);
}

k_ptar_sithatk.zip

@Salk73
Copy link
Author

Salk73 commented Nov 7, 2019

I can confirm your solution works perfectly. This can be closed.

Thanks, DP.

@DarthParametric DarthParametric added Minor Issue Aesthetic issue or other problem that isn't really a bug Module: Taris Issue occurs primarily on Taris Type: Scripting This issue is related specifically to a scripting bug/error labels Nov 7, 2019
@DarthParametric
Copy link
Contributor

DarthParametric commented Oct 29, 2021

A related issue. The third trooper that is tucked into the corner of the room doesn't actively engage in combat until the player enters the room. Presumably because the player is out of sight in the corridor when combat is initiated. This can lead to the player killing both of the other two troopers while the third is still standing stock still in the room, even though combat is still active. Either the Trooper needs his spawn position changed, or the attack script needs to command him to move to the player.

@Salk73
Copy link
Author

Salk73 commented Oct 29, 2021

I'd lean towards having it move to the player and attack. If I am not mistaken the action will work only if the NPC is neutral?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Minor Issue Aesthetic issue or other problem that isn't really a bug Module: Taris Issue occurs primarily on Taris Type: Scripting This issue is related specifically to a scripting bug/error
Projects
None yet
Development

No branches or pull requests

2 participants