Scene Portal - how to use through interaction?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
tohaMem
Posts: 21
Joined: Sat Oct 07, 2023 9:05 am

Scene Portal - how to use through interaction?

Post by tohaMem »

Hello!!

So...I want the usable to be triggered first when approaching the portal.
This is what I did. But it doesn't work...
Image
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Scene Portal - how to use through interaction?

Post by Tony Li »

Hi,

That should work. What is the Usable supposed to do?
tohaMem
Posts: 21
Joined: Sat Oct 07, 2023 9:05 am

Re: Scene Portal - how to use through interaction?

Post by tohaMem »

maybe I didn't explain it correctly, sorry...
When a character enters a portal trigger, he is teleported immediately. I want to press, for example, E before entering.
There is also a proximity selector on the portal, yea..
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Scene Portal - how to use through interaction?

Post by Tony Li »

Hi,

In that case, here are two ways to do it:

1. Move the Scene Portal to a child GameObject that doesn't have a trigger collider. (The main GameObject with the Usable component should still have whatever type of collider is necessary for the Proximity Selector to detect it.) Configure the Usable's OnUse event to call the ScenePortal's UsePortal method.

2. Or remove the Scene Portal, and add a Dialogue System Trigger set to OnTriggerEnter. Select Action > Play Sequence, and set the Sequence to:

Code: Select all

LoadLevel(Hostel, Spawnpoint2)
Post Reply