TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
john Lotte
NA
6
647
how to teleport to another player with ID
Apr 13 2017 11:36 PM
Im using unity3D pls help me,,,How to fix this code? this code work can teleport to player but not targeting player/random player,I want to teleport to another player with iD like , ./tp 1 so will teleport to player with ID 1,,,, here is my code
if
(
this
.inputLine.StartsWith(
"/tp"
))
{
foreach
(GameObject obj22
in
GameObject.FindGameObjectsWithTag(
"Player"
))
{
PhotonPlayer player18 = PhotonPlayer.Find(Convert.ToInt32(
this
.inputLine.Remove(0, 5)));
objArray25 = GameObject.FindGameObjectsWithTag(
"Player"
);
for
(num59 = 0; num59 < objArray25.Length; num59++)
{
GameObject obj7 = objArray25[num59];
if
(obj22.GetComponent<HERO>().photonView.isMine)
{
obj22.GetComponent<HERO>().transform.position = obj7.GetComponent<HERO>().transform.position;
}
}
}
}
pleasw help
Reply
Answers (
0
)
How to mask a phone number in MVC?
extract date part only from a English sentence