Please someone help me with this I'm losing my mind

Hey all, I’m making a workshop game similar to deathrun maps like in TF2 or CS. The code is pretty shoddy because it’s my first ever attempt at a workshop map but for the most part everything runs fine

I’ve set up red spheres around the map to indicate where you aren’t allowed to go and if you enter those you die. Everything is great until a person joins the runners team mid-way, or even if you move yourself from spectator to the runners team, where for some reason it runs the code to kill every single player on the team. It doesn’t do this normally when someone enters a red sphere, it only kills the player who entered, but for some reason it runs the same rule for every single player if someone joins, even though there are no spheres in the spawn room. I swear to god I’m losing my mind, if someone could help me I would be so grateful

Here is the workshop code: PJMQN

Here is the fix: YVHV0
I updated the Kill rule of the spheres a bit unfortunately there seems to be an issue for some actions and methods regarding to an Players Position, for distance Between as an example when you want to compare the distance with Players use the actual Position of the Player object instead, Distance Between don’t have an internal converting anymore or failed to pass that Data( which is the Vector Position of a Player eg) at some point, i can’t tell if its cause of the most recent workshop update which involved not absolutely clear context changes engulfing Player and Global Entitiy handling.

2 Likes

I think I found the problem, the “TP ppl” rule is called when someone switched team, setting the variable “Global.SpherePos” to 0 therefore the test in the “Kill” rule is triggered not matter your position and so it kills everyone

You can fix it deleting “Global.SPherePos=0” in the “TP ppl” condition

EDIT: Also you need to make it so the resitriction for the killer only for team 1, if you try to play tracer in team 2 you won’t be able to jump and can’t complete the map

EDIT n°2: Don’t listen to my first edit I’m stupid

1 Like

Yeah i couldnt track that somehow. By Removing that part the issue was gone now. Forget my reply and fix, my fix still included that part of what ever reason why SpherePos gets deinitialized there, if you wanna initialize that variable as an empty Arrray before game starts etc. do that in your Game Start Rule before the variable GameStart is set to true @roversfan.

3 Likes