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

Tatooine Anchorhead - Ambient waypoint walkers may stop walking waypoints #773

Open
1 task
DarthParametric opened this issue Dec 18, 2023 · 1 comment
Open
1 task
Labels
Minor Issue Aesthetic issue or other problem that isn't really a bug Module: Tatooine Issue occurs primarily on Tatooine Type: Module This issue involves changes to a module's properties (ARE, GIT, IFO, LYT, and VIS files). Type: Scripting This issue is related specifically to a scripting bug/error

Comments

@DarthParametric
Copy link
Contributor

1.10.0 beta test 2 observations:

  • I have encountered this previously, although it seems difficult/impossible to reliably reproduce. On occasion when entering Anchorhead, all the waypoint walkers will be standing idle. May be related to conversations, which pause all waypoint walking. Exiting to the Dune Sea requires going through a conversation, so perhaps that? Regardless, may need an OnEnter fix such as used in Taris Hidden Beks base - Post-swoop race return issues #254.
@DarthParametric DarthParametric added Minor Issue Aesthetic issue or other problem that isn't really a bug Module: Tatooine Issue occurs primarily on Tatooine Type: Scripting This issue is related specifically to a scripting bug/error Type: Module This issue involves changes to a module's properties (ARE, GIT, IFO, LYT, and VIS files). labels Dec 18, 2023
@DarthParametric
Copy link
Contributor Author

DarthParametric commented Apr 18, 2024

NPCs with the following tags are random waypoint walkers:

  • tat17_12comm_07
  • tat17_12rodia_04
  • tat17_news_06
  • tat17_news_07

Additionally, the generic Jawas, tat17_xxjawa_01, have the SW_FLAG_AMBIENT_ANIMATIONS_MOBILE OnSpawn flag, causing them to walk back and forth in a small radius from their spawn-in location.

This snippet could be added to the module's OnEnter to fix the problem:

object oWalker;
string sTag;

oWalker = GetFirstObjectInArea(OBJECT_INVALID, OBJECT_TYPE_CREATURE);

while (GetIsObjectValid(oWalker))
	{
		sTag = GetTag(oWalker);
		
		if (sTag == "tat17_12comm_07" || sTag == "tat17_12rodia_04" || sTag == "tat17_news_06" || sTag == "tat17_news_07" || sTag == "tat17_xxjawa_01")
			{
				// Run KOTOR_DEFAULT_EVENT_ON_GLOBAL_DIALOGUE_END which will fall through to GN_WalkWayPoints.
				ExecuteScript("k_ai_master", oWalker, 1011);
			}
		
		oWalker = GetNextObjectInArea(OBJECT_INVALID, OBJECT_TYPE_CREATURE);
	}

Edit: Running the command manually on individual NPCs, it doesn't appear to work on the Jawas, so they can probably be omitted. I would need to replicate the issue again to see if they even get affected by the issue in the first place.

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: Tatooine Issue occurs primarily on Tatooine Type: Module This issue involves changes to a module's properties (ARE, GIT, IFO, LYT, and VIS files). Type: Scripting This issue is related specifically to a scripting bug/error
Projects
None yet
Development

No branches or pull requests

1 participant