Jump to content

Strange AI-Controlled Player Behavior


Recommended Posts

Hi everyone. I'm working on a quest where, at one point, the player’s control is taken over by AI, and the character is supposed to walk down a staircase. They’re supposed to do this slowly, i.e., walking, but a strange problem has arisen. The character starts to walk very slowly (as if I set their speed to 5 instead of 100) and begins to shake. However, if I set the player to run instead of walk, everything works fine.

I thought the problem might be due to the NavMesh (the action takes place in a location I created, so I also made the NavMesh myself), so I tried reworking it in different ways. I tried extending it further into the staircase and placing it directly over the stairs, but that didn’t produce any results.

Has anyone encountered a similar issue? Other NPCs walk down the stairs without any problems.

Link to comment
Share on other sites

Guest deleted156886133

The NavMesh isn't your problem. Which you already knew, of course. But you said changing it didn't produce any results yet it did. Backed up by the evidence of other NPCs being able to negotiate the staircase without issue, it showed that you need to look elsewhere for the cause. I don't play Skyrim so I can't speak with authority about specific game mechanics but I can say from my experience modding and playing Morrowind that my best guess would be that there's something afoul with a related script. But you said the player's control gets taken over by AI. How advanced is Skyrim now? Are you sure the PC isn't taken over by scripting? That's a sort of an AI, I suppose. 

1 hour ago, AlimAge said:

The character starts to walk very slowly (as if I set their speed to 5 instead of 100) and begins to shake. However, if I set the player to run instead of walk, everything works fine.

This is a clue as well but I'm not sure what it means. Could be related to game mechanics, could be scripting. Are you saying that you're setting the speed in-game or in the Creation Kit?

Also, is the quest provided by a mod or is it a vanilla quest? If the former, I'd check for conflicts. For the latter, you'll have to wait for someone more knowledgeable about Skyrim. 

Link to comment
Share on other sites

Thanks for the response.
I don't even know where to start.
In short, I haven't been able to solve the problem, even though I've considered different options, from changing the stairs to altering the character's height. In general, none of that worked.

I disable player control and switch it to the game AI. Simply put, at that moment, the player becomes an NPC, who is then controlled by the quest scene in which they participate.

As I mentioned, I'm creating a quest, so yes, it's a mod and not a vanilla game.

And no, I don't change the player's speed with scripts. I just activate the AI package in the scene that tells the player to move to a specific point with a "preferred speed" of walking.

The problem is strange because it only occurs when the AI controls the player but doesn't appear with NPCs.
If I manually controlled the character as a player and walked slowly down the stairs, there would be no problem.

The only thing I haven't tested yet is creating another scene with a different descent in a different location to check whether this problem is consistent or just local.

Link to comment
Share on other sites

And yes, I want to add that changing the character's speed through a script causes the same issue. So the problem is specifically related to the character's speed, which, for some reason, triggers this issue when moving slowly.

Link to comment
Share on other sites

Guest deleted156886133
On 8/10/2024 at 11:34 PM, AlimAge said:

As I mentioned, I'm working on a quest

Hah! Yes, of course. I took that to mean... ah, never mind. I misunderstood that part.

You're welcome for the response even though it wasn't that helpful. I found your issue intriguing and was trying to help diagnose it based on my general knowledge about modding but it's now clear you need a specialist. 

6 hours ago, AlimAge said:

So the problem is specifically related to the character's speed, which, for some reason, triggers this issue when moving slowly.

That's what I'm thinking too. But why, right? There's another unseen variable at play here. Creating a different scene, descent, etc., is actually a great idea as it may provide some additional clues. At least you'll be able to determine if the issue is consistent or local.

Good luck... and where the heck are all the Skyrim modding gurus? You'd think that with community membership in the thousands there'd be more hits on your thread.

Anyways, cheers.

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...