-
October 9th, 2019, 06:33 #1
[programming] chatmessage strings/player CT
Ok so these are two separate questions, and I’m just missing a piece to each puzzle, I believe.
1) how do I program the ct to allow players to drop numbers on an entry to alter the “health” field of that entity? It works just fine as a GM but I seem to be missing something for a player to achieve this. “If not User.isHost” isn’t working as it does for deliverChatMessage() functions.
2)how do I use a string resource for a deliverChatMessage() function? Want to make it easier to translate, and that’s the last hurdle.
-
October 9th, 2019, 12:12 #2
1) Players can only modify the database records they own. Whereas the GM can modify all records.
You could look at using OOB messaging that passes the execution of some code to the GM, so that the GM instance could change the data.
OOB messaging can be a little complex to get your head round at first, as you need to setup and register a OOB message handler, a message structure, call the OOB messaging and code in the handler. See the 5E scripts\manager_action_damage.lua file for an example - the OOB_MSGTYPE_APPLYDMG OOB messaging in there is used for players to pass the handling of damage damage application to the GM.
2) Get the contents of the FG string resource with Interface.getString and concatenate that in your chat message: https://www.fantasygrounds.com/refdo....xcp#getStringPrivate Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
October 9th, 2019, 19:18 #3
thank you. i got #2 working with your advice. #1 is going to take some studying it seems.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks