Here is a script for scripters. Dealing with communication between objects is probably one of the more difficult things to learn when its about scripting. Especially when you want to do this properly as this requires validation (by using encryption) and proper handling of listeners and channels.
Having been scripting for over 10 years with more then 200 scripted products in my store i have over time perfected the perfect communication technique and scripts.
You will get 2 scripts. A no-mod script that handles the whole communication and a full-perm example script. Communicating with a HUD is as simple as sending a linked message.
The communication is secured by a salted encrypted token. The data itself is not encrypted. Saving you the technical details, this is way more secure then simply sending encrypted data as the token cant be decrypted and changes after every message.
Do note that out of the box the scripts do very little. The Object2Hud is made for scripters. I will add additional full-perm scripts with more complex features to the main store that use the Object2Hud script.
One important thing to note is that the HUD uses a owner based listener and the Object a object UUID based listener. This means that if you want the HUD to send a message to the Object you would need to know the UUID of the object and you may need to add a additional listener in your script to get this.
Some sample uses
- Make an object give a item only when the clicker is wearing the HUD.
- Make an item only work when the clicker is wearing the HUD.
- Make an object talk to a other object (it doesn’t need to be a HUD).
- Make a security system that only allows people with the HUD.
The uses of the Object2Hud are only limited to your imagination and scripting ability.