Jump to content

Player greeting in quest (script?!?)


Yulliah

Recommended Posts

I want the player to say a certain thing and aim their weapon at an NPC at the start of the conversation. Instead of the normal hallo, or excuse me.

Because it makes no sense for the player to want to interrogate a raider and start that conversation politely...

Any way to make this happen?

I was thinking about making a trigger that starts a scene, but I'm not sure how to set that up, as the NPC itself is patrolling an area and is not static...

Maybe an event trigger that will check the distance between the NPC and the player? But then what event needs to run the script?!?

 

Link to comment
Share on other sites

I see you've already found Seddon4494 on YouTube (lol small world). ForceGreet seems to be for NPCs initiating conversation with player. To do the opposite on a moving target, I'm guessing you could RegisterForDistanceLessThanEvent.

 

When OnDistanceLessThan fires you could SetPlayerAIDriven and run a Say procedure in a package on player. Then set AI driven false so player is in control again.

 

I don't like the idea of grabbing control and assuming how player would act, but my personal opinion is not relevant to a code solution. I've also never used scenes, but would be interested in learning what can be done with them.

 

The script itself would be on the NPC.

Link to comment
Share on other sites

I get what you mean, though a sort of force greet isn't exactly what I'm aiming for either...

I decided I do want the player to have to choose to talk to the NPC...

So what I did now is add player dialogue that results in the scene I created...

So the player would say 'Stop right there' as a greeting, which would lead to the dialogue scene...

However, I would like the player to aim their weapon at the NPC while saying it... But there is no way to add a package to that line... Is there a way to script 'aim weapon at target'?

Link to comment
Share on other sites

If the player is set to aidriven, I think you could add a "useweapon" or "aimweapon" package to the phase right before the PC says "Stop Right There"? But when the PC is set to aidriven I'm not actually sure if your player will be able to select/say dialogue.

 

And in any case, I'm not sure there's any option at all for the 1st person dialogue camera to display the PC's weapon while it's drawn. (at least I don't remember seeing that anywhere before)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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