Jump to content

Simple way to store variables for each player in a player tick event


squidlex

Recommended Posts

I'm looking to store a variable to be used in a player tick event for each player.

For example say I want the float 'distance' as a variable my tick event can access, but I want there to be a different instance of 'distance' for each player.

 

This is asuming player tick event fires for each player, which I now realise it may not.

 

Is there anyway to achieve this? I'd rather not use capabilities to store this as it's a really simple variable.

Thanks for your help!

 

Link to comment
Share on other sites

I'm afraid player capability is the only way to achieve this afaik. It is not as simple as storing the data in the fields in your event class (which won't work), but it is the only way I can think of. Also it is not so complicated isn't it?

Edited by poopoodice
  • Like 1
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.