Page 1 of 1

Scene Portal - how to use through interaction?

Posted: Sun Jun 02, 2024 8:58 pm
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

Re: Scene Portal - how to use through interaction?

Posted: Sun Jun 02, 2024 9:30 pm
by Tony Li
Hi,

That should work. What is the Usable supposed to do?

Re: Scene Portal - how to use through interaction?

Posted: Mon Jun 03, 2024 5:11 am
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..

Re: Scene Portal - how to use through interaction?

Posted: Mon Jun 03, 2024 8:12 am
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)