Jump to content

Getting position of the Entity from Script


Sparkle11
 Share

Recommended Posts

I don't fully understand your question. Do you mean from 1 script how to get the position of another entity? You can link them with script variables like:

 

Script.player = nil --entity

 

Then in the editor draw the player to this field in the script tab of your other entity and now inside that you can use self.player to refer to the player entity. You can do this with any and all entities.

  • Upvote 1
Link to comment
Share on other sites

I don't fully understand your question. Do you mean from 1 script how to get the position of another entity? You can link them with script variables like:

 

Script.player = nil --entity

 

Then in the editor draw the player to this field in the script tab of your other entity and now inside that you can use self.player to refer to the player entity. You can do this with any and all entities.

 

Thank you very much, Rick! :)

 

Best regards

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...