Forum Discussion
default spawn co-ordinate can be found with getplayerstate-eventplayer-playerstatevector(set to position) put into an onplayerdeploy rule.
got a screenshot....or you can just copy paste the url up top of portal in here, can see it but cant change it that way.
https://portal.battlefield.com/experience/rules?playgroundId=cb9a9230-438c-11ec-b756-3cc39ff7e322
The teleport is working now.
The last thing, i can't set and get bool variables.
About global vs player variables. I'll change that but first i have to figure out for just 1 player.
- Matty101yttam4 years agoSeasoned Hotshot
hmmm...just out of curiosity what makes you say you cant get/set variables as bool?
Also looking at the logic, your trying to check the players distance from ground correct?
I may be wrong but i THINK your currently your checking to see if the distance between the players position and 0,-1,0 is bigger than 50, since the downvector is a directional vector not a positional one, like i think it may as well be 0,0,0. If that's the case it's probably always going to be true.
You may be better off checking if the getycomponent of your playerstate/position vector is > 50
- kiki01hun4 years agoSeasoned Rookie
Wow everything is working now.
Look at the code now.
I just have one question. I get this in the error logs.- Matty101yttam4 years agoSeasoned Hotshot
error seems to be trying to do something while the player isn't alive/in deploy screen, can only happen with the ongoing rules so i'd guess that if you also added whether the playerstatebool-isalive to the condition of the ongoing rules it would stop anything happening while your dead/in deploy screen.