Author Topic: Use Key (v1.5)  (Read 6058 times)

Use Key (v1.5)
by Port

Description
As requested by IkeTheGeneric in this thread, this is an add-on which, for clients running it, adds an option in the "Action" section of the Controls menu named "Use Key". Pressing this key while playing on a server that is also running this add-on will cause it to trigger the "onUse" input event on the brick you are aiming at.

In addition, this provides a RTB preference named "Activate Condition" in the "Use Key" section which allows you to configure the Use Key to trigger "onActivate" together with "onUse" on certain types of bricks specified.

Developer Notes:
  • This works for any object, not just bricks. To take advantage of this, create/package the function ::onUse for the class name of the type of object you wish to interface with, such as AIPlayer::onUse. There is one argument, the player that activated it.

Test Report
This add-on has been tested on a default Blockland installation with default add-ons, and worked flawlessly without any errors.

Downloads
System_Use.zip (1.6KB) from localhostr.com.

Installation
Client: Place System_Use.zip in your Add-Ons folder and restart Blockland.
Server: Place System_Use.zip in your Add-Ons folder, restart Blockland and enable it when starting a server.
« Last Edit: April 14, 2012, 01:50:34 AM by Port »


I will make some sort of extension for what i had then.
This is much better. :)

Updated to version 1.1:
  • Added a RTB preference that defaults to enabled which causes the use key to trigger "onActivate" when used on JVS content.

Updated to version 1.1:
  • Added a RTB preference that defaults to enabled which causes the use key to trigger "onActivate" when used on JVS content.
Useful. :)

Its sad this has to be a client-side add-on for it to work



So... what event does it use? If it's onActivate, it doesn't work for me.
Also no RTB prefs.

So... what event does it use? If it's onActivate, it doesn't work for me.
Also no RTB prefs.
did you update

by default it triggers onUse>etc>etc



Is there a range pref we could have with this? How far is the range currently?

Can you make it so you can enter vehicles using this and exit them too?
And disable entering and exiting vehicles by touching them?

I know it would probably require a server sided version of this, but I think its worth it.

I know it would probably require a server sided version of this, but I think its worth it.

Uh, what? This is both a server-sided and client-sided add-on. Anyway, I might do that for the next version.

Uh, what? This is both a server-sided and client-sided add-on. Anyway, I might do that for the next version.
I was told by lots of people back then this was not possible.

Also, this does not use the common server/client network which is quite slow to send use input, but the actual proper trigger-based control network.

this should just replicate the activate key and our old builds would still work with this