Sequence to change scenes
-
- Posts: 76
- Joined: Wed Sep 25, 2024 11:26 pm
- Location: New York City
- Contact:
Sequence to change scenes
Is it possible to change the trigger to load the sequence to change scenes from OnUse to On Collision Enter or On Trigger Enter?
I note this message in Demo Scene 1. I tried to change the method from On Use to On Trigger Enter or On Collision enter to change to Demo Scene 2 but it didn't work. Any help is appreciated. I added a rigidbidy to the door. Checked is kinematic. Checked is trigger on the collider.
"When this Usable's Dialogue System Trigger gets the message OnUse from the Player's Selector, it runs a LoadLevel() sequencer command to change scenes to DemoScene2."
I note this message in Demo Scene 1. I tried to change the method from On Use to On Trigger Enter or On Collision enter to change to Demo Scene 2 but it didn't work. Any help is appreciated. I added a rigidbidy to the door. Checked is kinematic. Checked is trigger on the collider.
"When this Usable's Dialogue System Trigger gets the message OnUse from the Player's Selector, it runs a LoadLevel() sequencer command to change scenes to DemoScene2."
Re: Sequence to change scenes
Hi,
I believe you're also using Grid Controller. If so, use Grid Controller's Scene Portal, like the "Scene Portal" GameObject in the Grid Controller + Save System example scene.
Otherwise, using a Dialogue System Trigger set to OnTriggerEnter or OnCollisionEnter is fine. Make sure the object with the collider (e.g., the Player / Grid Controller) is tagged Player, and click the Dialogue System Trigger's "Add 'Player' Tag" button. Set it up like the triggers in DS's DemoScene1 and DemoScene2 to play the LoadLevel() sequencer command.
I believe you're also using Grid Controller. If so, use Grid Controller's Scene Portal, like the "Scene Portal" GameObject in the Grid Controller + Save System example scene.
Otherwise, using a Dialogue System Trigger set to OnTriggerEnter or OnCollisionEnter is fine. Make sure the object with the collider (e.g., the Player / Grid Controller) is tagged Player, and click the Dialogue System Trigger's "Add 'Player' Tag" button. Set it up like the triggers in DS's DemoScene1 and DemoScene2 to play the LoadLevel() sequencer command.
-
- Posts: 76
- Joined: Wed Sep 25, 2024 11:26 pm
- Location: New York City
- Contact:
Re: Sequence to change scenes
I did all that and it still doesn't work. I can use the Scene Portal but am making a puzzle and would like to use this for the puzzle. Also if this should work, trying to understand why it doesn't. Thanks. I'm using the Demo Scenes to test it.
Re: Sequence to change scenes
Hi,
Here's an example scene:
GC_LoadLevelExample_2025-05-09.unitypackage
It's the Save System Example scene with two changes:
1. I moved the Scene Portal GameObject to the right.
2. A bit further along beyond the Scene Portal GameObject, I added a GameObject with a Dialogue System Trigger set to OnTriggerEnter. It runs a LoadLevel() sequencer command to load the player at the specified spawnpoint.
If this doesn't help, can you send a reproduction project to tony (at) pixelcrushers.com?
Here's an example scene:
GC_LoadLevelExample_2025-05-09.unitypackage
It's the Save System Example scene with two changes:
1. I moved the Scene Portal GameObject to the right.
2. A bit further along beyond the Scene Portal GameObject, I added a GameObject with a Dialogue System Trigger set to OnTriggerEnter. It runs a LoadLevel() sequencer command to load the player at the specified spawnpoint.
If this doesn't help, can you send a reproduction project to tony (at) pixelcrushers.com?
-
- Posts: 76
- Joined: Wed Sep 25, 2024 11:26 pm
- Location: New York City
- Contact:
Re: Sequence to change scenes
You are wonderful. I will try it in a little bit. Not at computer. Thank you.
-
- Posts: 76
- Joined: Wed Sep 25, 2024 11:26 pm
- Location: New York City
- Contact:
Re: Sequence to change scenes
That works perfectly. Thanks very much.
BUT----I'm trying to get the Demo Scene in the Dialogue System itself to work using On Collision Enter or on Trigger Enter to work which does not use the Grid Controller. The player in the scene with Private Hart doesn't move to the second scene if I change the method of triggering the Load Level Sequence from On Use to On Collision Enter or on Trigger Enter.
Trying to understand the Dialogue System set up more thoroughly. And why that seems to work differently. Thanks.
BUT----I'm trying to get the Demo Scene in the Dialogue System itself to work using On Collision Enter or on Trigger Enter to work which does not use the Grid Controller. The player in the scene with Private Hart doesn't move to the second scene if I change the method of triggering the Load Level Sequence from On Use to On Collision Enter or on Trigger Enter.
Trying to understand the Dialogue System set up more thoroughly. And why that seems to work differently. Thanks.
Re: Sequence to change scenes
Hi,
Here's a version of DemoScene1 that uses OnTriggerEnter:
DS_DemoScene1_OnTriggerEnterLoadLevel.unitypackage
I made these changes:
1. Deactivated "Info: Door LoadLevel". (Not technically necessary; just did it.)
2. On "Door to DemoScene2":
If it doesn't work, check the Console window for errors or warnings.
Here's a version of DemoScene1 that uses OnTriggerEnter:
DS_DemoScene1_OnTriggerEnterLoadLevel.unitypackage
I made these changes:
1. Deactivated "Info: Door LoadLevel". (Not technically necessary; just did it.)
2. On "Door to DemoScene2":
- Removed the Usable component.
- Ticked the Box Collider's Is Trigger checkbox and set Size > Z to 2 to make it bigger.
- Added a Rigidbody. UNticked Use Gravity (doesn't matter though) and ticked Is Kinematic.
If it doesn't work, check the Console window for errors or warnings.
-
- Posts: 76
- Joined: Wed Sep 25, 2024 11:26 pm
- Location: New York City
- Contact:
Re: Sequence to change scenes
That works perfectly!!!!!! You have taught me a lot.
Thank you so much. My collider may have been too small. Ironing hands. : )
Thank you so much. My collider may have been too small. Ironing hands. : )
Re: Sequence to change scenes
Glad to help!
-
- Posts: 76
- Joined: Wed Sep 25, 2024 11:26 pm
- Location: New York City
- Contact:
Re: Sequence to change scenes
I finally got around to leaving Dialogue System a review in the Unity Asset Store---under my more common name of Catacomber. : ) This is truly one of the best assets I've used from the Asset Store and really appreciate all your help.