Page 2 of 2

Re: Planned ScriptAPI changes

Posted: Mon Mar 13, 2017 12:09 am
by RickAvory
I am have no clue how to download scripts now since the script folder is now gone. Could someone guide me how to add them. Also, i am looking for the team script but i cant seem to find it anywhere so a link to it would be very helpful. Thanks.

Re: Planned ScriptAPI changes

Posted: Fri Mar 31, 2017 12:31 am
by JakSparro98
As a result of a topic about colors handling for the IObject class we realized that there isn't a way to change a tile color through scripts.

I suggest two new entries, one in the IGame, adding a new parameter in the "CreateObject" method, something like "ColorPalette TileColor" and if the tile doesn't permit coloration this parameter won't affect the tile rather than make the script to crash.

The other in the same IObject, a SetColor method with a palette as only parameter, after all, currently we can already get the color palette but without change it in game, it's only needed the reverse operation.

Re: Planned ScriptAPI changes

Posted: Fri Mar 31, 2017 9:13 pm
by Gurt
JakSparro98 wrote:As a result of a topic about colors handling for the IObject class we realized that there isn't a way to change a tile color through scripts.
Nope, but it's already part of the planned ScriptAPI changes. No need to suggest it when it's already planned. ;)

Re: Planned ScriptAPI changes

Posted: Fri Mar 31, 2017 9:24 pm
by JakSparro98
Gurt wrote:
JakSparro98 wrote:As a result of a topic about colors handling for the IObject class we realized that there isn't a way to change a tile color through scripts.
Nope, but it's already part of the planned ScriptAPI changes. No need to suggest it when it's already planned. ;)
Sorry, I could've sworn to have not seen this point in the planned list. :oops:

Re: Planned ScriptAPI changes

Posted: Sun Jan 27, 2019 2:52 pm
by Gurt
JakSparro98 wrote:
Fri Mar 31, 2017 9:24 pm
Gurt wrote:
JakSparro98 wrote:As a result of a topic about colors handling for the IObject class we realized that there isn't a way to change a tile color through scripts.
Nope, but it's already part of the planned ScriptAPI changes. No need to suggest it when it's already planned. ;)
Sorry, I could've sworn to have not seen this point in the planned list. :oops:
Able to change color on objects will come in the v.1.1.0 update, as long as the color is available in the color palette.

Re: Planned ScriptAPI changes

Posted: Wed Jan 30, 2019 10:38 pm
by Gurt
Able to send chat messages to everyone or individual users will come in the v.1.1.0 update.

Code: Select all

        /// <summary>
        /// Shows a chat message to all users. 
        /// </summary>
        /// <param name="message">Message to show. Max 400 characters.</param>
        public abstract void ShowChatMessage(string message);

        /// <summary>
        /// Shows a chat message to all users.
        /// </summary>
        /// <param name="message">Message to show. Max 400 characters.</param>
        /// <param name="color">Color</param>
        public abstract void ShowChatMessage(string message, Color color);

        /// <summary>
        /// Shows a chat message to a specific user.
        /// </summary>
        /// <param name="message">Message to show. Max 400 characters.</param>
        /// <param name="userIdentifier">User to show message to. This is the IUser.UserIdentifier/IPlayer.UserIdentifier. If the user doesn't exist no chat message is sent.</param>
        public abstract void ShowChatMessage(string message, int userIdentifier);
        
        /// <summary>
        /// Shows a chat message to a specific user.
        /// </summary>
        /// <param name="message">Message to show. Max 400 characters.</param>
        /// <param name="color">Color</param>
        /// <param name="userIdentifier">User to show message to. This is the IUser.UserIdentifier/IPlayer.UserIdentifier. If the user doesn't exist no chat message is sent.</param>
        public abstract void ShowChatMessage(string message, Color color, int userIdentifier);