Vivi3n 0 Posted December 8, 2019 I prepare a pvp capture the flag gamemode for me and my friends and i wanted to have a start without pvp, and i dont find the variable to affect all player, what i'm supposed to use or do to say to my script to affect everybody on the map ? can i use their team ? role maybe ? or did I missed the right variable ? Share this post Link to post Share on other sites
Adam Snellgrove 1451 Posted December 8, 2019 7 hours ago, Vivi3n said: I prepare a pvp capture the flag gamemode for me and my friends and i wanted to have a start without pvp, and i dont find the variable to affect all player, what i'm supposed to use or do to say to my script to affect everybody on the map ? can i use their team ? role maybe ? or did I missed the right variable ? I'll try to give you an answer tomorrow. Share this post Link to post Share on other sites
Igor Q. 519 Posted December 8, 2019 (edited) Hey @Vivi3n You will first need to make a variable that adds every player to the game First create a global variable and go into edit script. Create a variable called "Player List" (MAKE SURE YOU ENABLE ARRAY CHECK BOX) Then go inside your spawn point logic and add this. Then to enable all of those players to enable/disable pvp you do this Please note that there are different types of immunity you can choose from...pvp immunity...jump immunity, full invincibility, etc. If you want all players that connect to your game to be immune on start, do this. Good luck creator! Edited December 9, 2019 by Igor Q. Share this post Link to post Share on other sites
Indomitus 388 Posted December 8, 2019 31 minutes ago, Igor Q. said: You will first need to make a variable that adds every player to the game Use a Player Role (use only one so they are all listed together). It's an array, and you don't have to write any code to add players to it. You can also use an Entity Label that you add when they Spawn or Connect, but the Player Role manages itself which really helps code stay simple. No special code is needed in case a player leaves the game. You will still need to use a loop to set each player's immunity. You can use Player Team if you want, but if you have more than one team, then you will need more than one loop. This last piece of code would be triggered by the timer, or lever, or whatever way you are deciding to start the action. Share this post Link to post Share on other sites