Jump to content
  • 0

dungeon system global variable


Jackson

Question

Hello, I tried to make such a system
 when the player is in the dungeon, then others cannot enter him, when the player is not in the dungeon, then another player can get into him, how to correctly implement such a system?  I tried using events through the conditions of the player’s card, but nothing came of it.

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 1
9 minutes ago, AisenArvalis said:

@Jackson

 

Do this:

 

Create a Global Variable of the type Boolean and set it to false and call it "DungeonCheck" or whatever you want to call it


Make an event on the gate for the dungeon that has this.
Conditional Branch > Dungeon Check = False
- Prompt the player if they want to enter the dungeon
- If Yes:
      Teleport Player in
      Set Dungeon Check = True
- If No:
     Do Nothing
If Dungeon Check = True
      Tell the player someone is already in the dungeon

Boom done.

On the finish line of the dungeon, teleport the player out and change the variable to False again.

Not sure how to handle the dungeon if the player logs out or dies tho. That is a completely different system for now.

 

You could do a onRespawn for the player death. Have a player Variable that goes alongside the global one:

 

OnRespawn:

Conditional Branch "InDungeon = True"

Set to InDungeon = False

 

For player logging out in dungeon, I dont think that is possible without a source edit?

 

You could set a timer instead like 15minutes to do dungeon, even if the players logs out it could refresh dungeon.

 

To counter players logging out and waiting for timer to end and logging back in dungeon where another person is doing it, you could add a check to "Login":

 

Login:

Conditional Branch "InDungeon = True"

Warp player

Set to InDungeon = False

Link to comment
Share on other sites

  • 2

@Jackson

 

Do this:

 

Create a Global Variable of the type Boolean and set it to false and call it "DungeonCheck" or whatever you want to call it


Make an event on the gate for the dungeon that has this.
Conditional Branch > Dungeon Check = False
- Prompt the player if they want to enter the dungeon
- If Yes:
      Teleport Player in
      Set Dungeon Check = True
- If No:
     Do Nothing
If Dungeon Check = True
      Tell the player someone is already in the dungeon

Boom done.

On the finish line of the dungeon, teleport the player out and change the variable to False again.

Not sure how to handle the dungeon if the player logs out or dies tho. That is a completely different system for now.

Link to comment
Share on other sites

  • 0

Can you rephrase what your looking for?
Do you want players to not enter a dungeon when a player is in it, or do you want the other players in the party to also join the dungeon? You trying to do an instance?

Link to comment
Share on other sites

  • 0

Yes, a single dungeon that closes if there is a player, but so that when the player dies / exits the server or the dungeon, the entrance itself opens again.
 I tried changing the variable when exiting \ entering, but it doesn’t work, the variable will not change if the player dies in the dungeon or exits the server, I did so the variable changed when entering and then back when leaving the dungeon, I didn’t come up with another scheme.
 and yes, without party

Link to comment
Share on other sites

  • 0
8 minutes ago, Beefy Kasplant said:

You have to have a system that checks if the dungeon is still full 

I know, the problem is that I didn’t quite figure it out, I don’t understand how to implement it, so I ask here in the hope that someone will tell you, I think it’s not difficult to implement it, but I don’t understand how

Link to comment
Share on other sites

  • 0
5 minutes ago, Ainz Ooal Gown said:

 

You could do a onRespawn for the player death. Have a player Variable that goes alongside the global one:

 

OnRespawn:

Conditional Branch "InDungeon = True"

Set to InDungeon = False

 

For player logging out in dungeon, I dont think that is possible without a source edit?

 

You could set a timer instead like 15minutes to do dungeon, even if the players logs out it could refresh dungeon.

 

To counter players logging out and waiting for timer to end and logging back in dungeon where another person is doing it, you could add a check to "Login":

 

Login:

Conditional Branch "InDungeon = True"

Warp player

Set to InDungeon = False

thanks for idea at cheker respawn and timer, the best

Link to comment
Share on other sites

×
×
  • Create New...