Question by
Arcady6011 · Apr 07, 2018 at 03:54 PM ·
c#scripting problemplayerscript.axis
How do I make somthing happen when the Player reaches a certain x, y, z position?
void SetCountText ()
{
countText.text = "Count: " + count.ToString ();
if (count >= 20 && player.position = -24.6845,-158.2366,267.985)
{
winText.text = "You Win!";
}
countText.text = "Count: " + count.ToString ();
if (count < 20 && player.position = -24.6845,-158.2366,267.985)
{
winText.text = "You Lose!";
}
}
As you can see above, I'm trying to get a text to change depending, on what a variable called Count equals, and what the player's position equals.
I want it to be a particular x, y, z position. Does anyone know how to do this please?
Comment
Your answer
Follow this Question
Related Questions
Update() and FixedUpdate() not running on C# scripts 0 Answers
Collision script doesnt work,OnCollisonEnter2D does not work if it collides with the enemy 2 Answers
Problems with rotating the player on the Y axis C# 0 Answers
How can i disable/enable slowly the blur effect using the blur script ? 0 Answers
script help 1 Answer