On Use but without mouse but with On Trigger Enter

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
HawkX
Posts: 147
Joined: Mon Feb 27, 2017 1:50 pm
Location: Quebec
Contact:

On Use but without mouse but with On Trigger Enter

Post by HawkX »

Hi Tony!

It's been quite a while!! I hope you are doing well!!

I got a new job recently as programmer for a new indy game... and I had them buy the Dialogue System because I already knew how to work with it and how easy it is to use :)

I setup pretty much everything so far, but got a question...

I am using your "Dialogue System Trigger" on an NPC, however I would like to change the trigger to use a combo of "on use" and "on trigger enter"...

Right now, if i set on trigger enter, it auto starts as soon as you get close..
And If i set "on use" then you need to have visible cursor and hover on the NPC itself to show "press (use) to talk"

I want to display the "press E to talk" overlay when the player gets in the trigger...
Is there an "easy" way to achieve this while still using your "dialogue trigger"?

Thank you for your time and have a nice day!!
-=HugoD HawkX=-
User avatar
Tony Li
Posts: 21980
Joined: Thu Jul 18, 2013 1:27 pm

Re: On Use but without mouse but with On Trigger Enter

Post by Tony Li »

Hi,

Would a Proximity Selector do what you want?

The Interaction Tutorial covers Proximity Selector at 04:00. In the video, I added a trigger collider to the player. But you can just as easy add a regular collider to the player and add the trigger to the NPC. As long as one has a trigger collider and the other has a regular collider, it doesn't matter which.

User avatar
HawkX
Posts: 147
Joined: Mon Feb 27, 2017 1:50 pm
Location: Quebec
Contact:

Re: On Use but without mouse but with On Trigger Enter

Post by HawkX »

WOW you now have cute little video tutorials!!!
This is really awesome!! and will 100% do exactly what I need! :)

I will get our UI artist to update the visual prefab and will probably use it for some "barks" when there is not a huge/real conversations!

Thank you so much as always for solving everything so quickly!

I'll most likely be back in the next few months for something else... damn i still cannot believe how amazing you are ;)
until then, take care!
-=HawkX=-
User avatar
Tony Li
Posts: 21980
Joined: Thu Jul 18, 2013 1:27 pm

Re: On Use but without mouse but with On Trigger Enter

Post by Tony Li »

Glad to help!
User avatar
HawkX
Posts: 147
Joined: Mon Feb 27, 2017 1:50 pm
Location: Quebec
Contact:

Re: On Use but without mouse but with On Trigger Enter

Post by HawkX »

Got kind of a followup question...

Anyway to disable the "Reticle In Range" and "out of range" without editing the scripts you made?

even with the mouse cursor "hidden", the cursor is "still there" and it shows up when the cursor is moved over the trigger collider...
User avatar
Tony Li
Posts: 21980
Joined: Thu Jul 18, 2013 1:27 pm

Re: On Use but without mouse but with On Trigger Enter

Post by Tony Li »

Hi,

Yes, just delete the UI elements.
User avatar
HawkX
Posts: 147
Joined: Mon Feb 27, 2017 1:50 pm
Location: Quebec
Contact:

Re: On Use but without mouse but with On Trigger Enter

Post by HawkX »

MAN you are so insanely fast to answer!! :)

but... if i delete the 2 ui elements in the prefab, then the script "StandardUISelectorElements.cs" will have 2 invalid references?

I actually set the 2 ui elements scale to 0,0,0 and disabled the "image" component... and it worked ;)
User avatar
Tony Li
Posts: 21980
Joined: Thu Jul 18, 2013 1:27 pm

Re: On Use but without mouse but with On Trigger Enter

Post by Tony Li »

You can just unassigned those references in your UI prefab. The selector UI will only use them if they're assigned.
Post Reply