Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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!

 

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

  • Author
3 minutes ago, poopoodice said:

not so complicated isn't it?

It's not I was just seeing if I could fit an entire mod in one class for fun ;)

I guess not, thanks for the help!

5 minutes ago, squidlex said:

It's not I was just seeing if I could fit an entire mod in one class for fun ;)

Interesting haha

Edit: I misread your post.

Edited by poopoodice

  • Author
4 minutes ago, poopoodice said:

inner class count as a "class" for you?

You know what I completely forgot I could do that! Time to try this again haha thanks man :)

(I'm very tired)

Edited by squidlex

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.