Forum Discussion
Okay. Every smaller map has it's own unique coordinate... nice.
So.. how can i extract the player's default spawn coordinate from playerlocation?.
Okay. The teleport is working but i can't use bool varible as condition because if i set it to false or true, the error log says it gave a number to the and gate.
If i use this:
Setvariable enabled {true}
Rule
Condition AND {...}, {equals[getvar. enabled], [true]}
Error log says can't compare number with a bool.
- Matty101yttam4 years agoSeasoned Hotshot
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.
- kiki01hun4 years agoSeasoned Rookie
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