- Joined
- Sep 12, 2024
- Messages
- 30
- Solutions
- 1
- Reaction score
- 4
- Points
- 8
Hello everyone,I have something of a new challenge for me.
I'm trying to force players to leave a dungeon after X amounts of seconds after the dungeon is cleared, in "CInstanceDungeonBase::SetNextState" I can add the "LeaveDungeon()" function but that results in an instant exit.
So my question is, is there a way to add a sleep or timeout without freezing the main thread? I tried adding a while loop but that freezes the main thread so the world server freezes until the while loop finishes.
I'm trying to force players to leave a dungeon after X amounts of seconds after the dungeon is cleared, in "CInstanceDungeonBase::SetNextState" I can add the "LeaveDungeon()" function but that results in an instant exit.
So my question is, is there a way to add a sleep or timeout without freezing the main thread? I tried adding a while loop but that freezes the main thread so the world server freezes until the while loop finishes.