Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.
New to the forum? Say hello in this topic! Also make sure to read the rules.
New to the forum? Say hello in this topic! Also make sure to read the rules.
ScriptAPI changes
Forum rules
By using the forum you agree to the following rules.
By using the forum you agree to the following rules.
- RickAvory
- Superfighter
- Posts: 787
- Joined: Wed Oct 12, 2016 11:27 pm
- Title: Sunny City Nationalist
- SFD Account: Rick Avory
- SFD Alias: (EA) Rick Avory
- Started SFD: Sep 2016
- Location: United States
- Gender:
- Age: 23
- Contact:
Re: Planned ScriptAPI changes
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.
0 x
We must root out the impurities in our midst
- JakSparro98
- Superfighter
- Posts: 530
- Joined: Fri Jul 15, 2016 7:56 pm
- Started SFD: PreAlpha 1.0.5
- Location: Rome, Italy
- Gender:
- Age: 25
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.
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.
0 x
- Gurt
- Lead Programmer
- Posts: 1884
- Joined: Sun Feb 28, 2016 3:22 pm
- Title: Lead programmer
- Started SFD: Made it!
- Location: Sweden
- Gender:
- Age: 34
Nope, but it's already part of the planned ScriptAPI changes. No need to suggest it when it's already planned.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.
0 x
Gurt
- JakSparro98
- Superfighter
- Posts: 530
- Joined: Fri Jul 15, 2016 7:56 pm
- Started SFD: PreAlpha 1.0.5
- Location: Rome, Italy
- Gender:
- Age: 25
Sorry, I could've sworn to have not seen this point in the planned list.Gurt wrote:Nope, but it's already part of the planned ScriptAPI changes. No need to suggest it when it's already planned.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.
0 x
- Gurt
- Lead Programmer
- Posts: 1884
- Joined: Sun Feb 28, 2016 3:22 pm
- Title: Lead programmer
- Started SFD: Made it!
- Location: Sweden
- Gender:
- Age: 34
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.JakSparro98 wrote: ↑Fri Mar 31, 2017 9:24 pmSorry, I could've sworn to have not seen this point in the planned list.Gurt wrote:Nope, but it's already part of the planned ScriptAPI changes. No need to suggest it when it's already planned.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.
2 x
Gurt
- Gurt
- Lead Programmer
- Posts: 1884
- Joined: Sun Feb 28, 2016 3:22 pm
- Title: Lead programmer
- Started SFD: Made it!
- Location: Sweden
- Gender:
- Age: 34
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);
2 x
Gurt