Aller au contenu

Photo

Can't get NPC to move to location


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
anafaria10

anafaria10
  • Members
  • 27 messages
Hello.

I'm doing a cutscene involving the PC and his companions. At some point in the conversation I want another NPC (not a companion) to join the conversation. He's a little farway, and I want him to come running and start talking.
At this moment he joins the conversation, but stays in his place, instead of moving to where the party is.
Here are the things I tried so far:

1. Just include him in the conversation (setting the NPC to speaker) thinking he automatically would make his way to where the conversation is taking place; the distance is set to 0 in the campaign editor;
2. The cutscene is activated when the PC touchs an object, so in it "OnUsed" script, after firing the cutscene and a delay to make him interrupt at the right time, I used the ActionMoveToLocation function, setting the location to where the PC is, with the GetLocation function;
3. In the node where I want him to start his contribution to do conversation, used the ga_move action, but this time used a waypoint to mark the location.

None of this worked, so I'm hopping someone knows what I'm doing wrong...

#2
PJ156

PJ156
  • Members
  • 2 986 messages
Quite often when ga_move did not work for me it was because I had typo'd the tag of the destination waypoint of npc otherwise I have found ga_move to be fairly stable.

PJ

#3
Claudius33

Claudius33
  • Members
  • 258 messages
You may use ga_jump("$PC", "tag_of_moved_NPC") preferably one NPC's line above the line where the NPC shall talk. As the camera is usually focused on the talking NPC, the jump shouldn't be seen or at least should seem less strange.

Script are executed before (the player clicks) for a NPC's line and after (the player clicks) for a PC's line

Of course you can replace $PC by another NPC's tag more suitable to your convo.

#4
Morbane

Morbane
  • Members
  • 1 883 messages
Try and make a helper ga_* function using AssignCommand(object_npc, ActionMoveToLocation(.....)
AssignCommand is very helpful to "force" things to happen.

#5
anafaria10

anafaria10
  • Members
  • 27 messages
Mistery solved! I was using a note map waypont to mark the location :unsure:
Now it has the right waypont and the cutscene is working fine :)

Once again, thank you for you help!