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

Ok, so I'm creating a boolean capability and I'm not so sure if I have setup the boolean capability correctly.

Now, what I'm trying to do here is to store the toggle state of the player's increased running speed in a capability as suggested here.

 

So now that intro is done, the questions!

  • How do I retrieve the boolean from the capability?
  • What changes do I need to make to my KeyBindingEvent (that's where the toggle state is occurring. P.S. it's located in client/handler)?
  • Do I attach the capability to the player?

 

Annd my code! Here's the link.
Directions to the classes:

  1. IBooleanData (that's the name of the capability) is located in common/capabilities.
  2. UpdateBooleanData (name of the packet that is sent to the client to update the data) is located in common/network/client

Well, I think that's all you guys need. If you need more info, tell me in your reply and I will add them to the directions list here.

width=620 height=260http://www.startrek.com/uploads/assets/articles/61c89a9d73c284bda486afaeaf01cdb27180359b.jpg[/img]

Till next time. Thank you for delivering funny scenes to Star Trek as Chekov :) . Will always remember you

Yes, but you haven't said anything about whether it is *actually* working, or what happens when you try to use it. Why are you not sure if you've set it up correctly? 

  • Author

Wait what? I set up the methods correctly? getter and setter for the boolean? Anyway, I needed another pair of eyes to see if I setup the capability for booleans correctly. Do I attach the capability to the player in this case with the toggle state?

width=620 height=260http://www.startrek.com/uploads/assets/articles/61c89a9d73c284bda486afaeaf01cdb27180359b.jpg[/img]

Till next time. Thank you for delivering funny scenes to Star Trek as Chekov :) . Will always remember you

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.