November 4, 2021, 6:57am
I’m creating a shooter game with linear maps, push and pull sort of thing but I have a serious issue; players are getting spawn killed relatively easily
I dont want to use force fields or limit players from sections of the map using invisible walls, so the only way I could come up with is once the player enters the enemy territory they get some message along the lines of “ENTERING ENEMY TERRITORY, RETREAT OR YOU’LL BE KILLED” and then a countdown to when they die.
Now, the only way I could think of doing this is the new OverlapParams api but it also doesnt have an event, meaning I would have to endlessly loop it…
I dont wan’t to use a touched event either because I feel like it would be unreliable, do you guys have any suggestions?
Just change the forcefield “Duration” property which belong to all “SpawnLocation” instances.
November 4, 2021, 7:14am
Basically, use a block that fills the whole spawn for each team. If someone touched the block and its not on their team, kill them.
November 4, 2021, 7:40am
I mentioned that I dont want to use a touched event because I think it might come out unreliable as players go in and out of the area
November 4, 2021, 7:41am
I also mentioned that I dont want to use forcefields
local players = game:GetService("Players")
local humanoid = character:WaitForChild("Humanoid")
humanoid.MaxHealth = 99999
humanoid.Health = 99999
humanoid.Health = 100
humanoid.MaxHealth = 100
Server script, place inside the ServerScriptService folder.
November 4, 2021, 7:45am
I didnt mean that I dont want to use forcefields specifically, I meant that I dont want to prevent the player from dying when they spawn for any amount of time
You can use this to check if a player’s character is in a given Region3 area, if they are then make them invincible.
Alternatively you could make the anti-spawnkill area a large, collisions disabled box and use the above function.
November 4, 2021, 7:50am
These are replaced by OverlapsParams… obviously if I dont want to use overlaps I wouldnt want to use those either for the same reason
November 4, 2021, 7:58am
you’ll have to. there’s nothing wrong with endless loops, every game has them.
you can also use ZonePlus which has those events that you want, though it also uses the spatial query API under the hood.
Region3 it’s what you are searching for
November 4, 2021, 8:04am
I guess so,
I’m already using it in a loop somewhere for different parts (capturing the hill) but I’ll use a lower rate loop for this.
Just make more than 5 spawn locations so the player will spawn in another place and kill the spawn killers
Also, to prevent players from camping safe zone, make is so when a player exits the safe zone they can’t go back in.
November 5, 2021, 4:41am
Already mentioned, I dont want to limit the players using invisible walls.
November 5, 2021, 4:41am
I have over 10 spawn locations, but the map is linear so it doesnt really help.
oh (30 ch ars)))))))))))))))))))