PVE Arena Using Events and Quest System
Written during Beta 4.7
First of all sorry for my English, I know it's not the best but I think you can understand me.
I was testing functionalities of the engine and its potential and I managed to create a PVE Arena so I decided to share this here.
You talk to a NPC and he gives you the quest to enter the Arena. If you already had the quest taken he asks you if you want to enter. Then you're teleported to the arena.
Only one player is allowed to be in the arena at the same time.
There are 3 possibilites to exit the arena: 1. Be killed 2. Kill the monster 3.Run out of time(so you can't stay forever and block other player's entrances).
Uses events and the quest system. When the monster is killed the task is finished and therefore you can run an event and do anything.
There are two known bugs because of the limitations of the event system (or maybe my own limitations, if anybody knows how to fix them without editing source code just say it):
The player in the left had already entered the arena before (that's why you see the quest in the quest log is already yellow). The player in the right hadn't. You can see that no player is able to enter the arena if there's already someone in and the 3 ways to exit the arena (die, kill the monster or run out of time). When monster is killed the player gets out of the arena and can enter the reward room.
For this tutorial I have two separate maps. The first one is the Lobby and the second one is the Arena itself.
First of all we're going to use the following: A Player Switch called "Player in Arena", a Global Switch called "Arena", initially False (will be True if a player is in the arena), and a Global Variable called "Arena Timer". This last one variable doesn't need to be a Global Variable and can be a Player Variable instead but if its Global it could be used for letting other players know how long they will have to wait.
Now let's go to make the Quest for this: Follow the image: Green is for optional, Red is for mandatory, Yellow is for anotations.
As you can see you can't quit the quest because if some player quitted the quest while inside the arena, then he wouldn't be able to exit by killing the monster (he would still exit the arena when the time goes down so you can actually mark the option but it would be extrange). Then you have to choose the task of killing the monster you want to be in the arena. Then, on task completion event you have to warp the player outside of the arena and set the "Player in Arena" and "Arena" switches to false so other players can enter the arena. Then you can choose to finish or not the quest and reward the player.
Now let's go to the Lobby and create the NPC that will teleport you to the arena: Everything is explained in the image
"Arena False" and "Arena True" condition list are only formed by "Global Switch Arena is False" and "Global Switch Arena is True".The second page of the event is what will appear when there's a player inside the arena. Note that in this example I've done it this way, with a NPC, but it could be done in a lot of different ways.
Last but not least, you might be asking why is the Player Switch "Player in Arena" for. This switch is used now! This is used for when a player dies in the arena, the arena gets reset so other players can enter. Create a Common Event and follow the image:
In my case now I have a NPC called "Guard" that after you've completed the quests lets you pass to the rewards room, but you can make it different. The best thing, if the quest can be repeated, is to give the reward at the event that is called on task finished. You can do almost anything you want to! That's the power of Intersect.
Your PVE Arena should by ready by now! Let me know If I missed something, if you have any problem/suggestion or if you know how to fix any of the bugs I mentioned above! Thank you!