Well not necessarily, cause if it is a world script only triggered if someone disconnects or goes spectator, then the script will only run when that happens.
I don't know what you mean by this. According to your OP, you want to remove the actors only when the player leaves/spectates, or if they switch teams (the latter requires a RESPAWN script to work by the way). You can learn more about the different types of scripts here: https://zdoom.org/wiki/Script_types
Also going by your way i guess that means i have to define/assign it to a map parameter rather than inside a script then.
You must always declare a single argument in a DISCONNECT script, this represents the disconnecting player's ID. Otherwise, ACC will throw an error upon compilation.
Also, i'm curious on your script, what would assinging playernum to arg1 do concidering it uses a different term "pnum" on the "breakshit" script?
I was passing playernum
as a parameter into the "BreakShit" script, which was named as pnum
, just to be consistent with your code in the OP. As mentioned before, unless you plan on doing more with this "BreakShit" script, it's better to keep only the DISCONNECT script and use it like this:
Code: Select all
Script "Disconnectz" (int playernum) Disconnect
// Kills the actors connected to the player.
Thing_Destroy(playernum + 1600, 1, 0);
Thing_Destroy(playernum + 1700, 1, 0);
Thing_Destroy(playernum + 1800, 1, 0);
Thing_Destroy(playernum + 12000, 1, 0);
Thing_Destroy(playernum + 12100, 1, 0);
Lastly, if i assign the ID to a parameter/int, will it be individual to all players? Because im worried it gets a bit fucky when it comes to having multiple people running the script.
Multiple DISCONNECT scripts can be executed at the same time but the ID passed into them will be specific to each player(s) that leaves/spectates, so you don't need to worry about any conflicts between players.