It's a scope with no initializer?
How are people supposed to use it?
Edit: I see, that's lame.
This is a vJass map so I demand vJass to be exploited.
1. Use this, instead of your custom script section, have it in some trigger.
function GetPlayerNameColored takes player id returns string
local playercolor col=GetPlayerColor(id)
local string r=GetPlayerName(id)
if col == PLAYER_COLOR_RED then
elseif col == PLAYER_COLOR_BLUE then
elseif col == PLAYER_COLOR_CYAN then
elseif col == PLAYER_COLOR_PURPLE then
elseif col == PLAYER_COLOR_YELLOW then
elseif col == PLAYER_COLOR_ORANGE then
elseif col == PLAYER_COLOR_GREEN then
elseif col == PLAYER_COLOR_PINK then
elseif col == PLAYER_COLOR_LIGHT_GRAY then
elseif col == PLAYER_COLOR_LIGHT_BLUE then
elseif col == PLAYER_COLOR_AQUA then
elseif col == PLAYER_COLOR_BROWN then
1. Make HSS a library that requires it and also a library called HSS_setup, also make start begin automatically (an initializer)
2. Is the trigger that begins with GetSelectionOrders_Effects part of your HSS? Then include that in the library or make a library required by it.
3. Regarding the contents of HSS_setup, it should replace this:
local integer i = 0
exitwhen i > 3
set HSS_HeroSelection[i] = gg_rct_HeroSelection
set HSS_HeroCreation[i] = GetStartLocationLoc(GetPlayerStartLocation(Player(i)))
set i = i + 1
set HSS_CreatedHeroTrigger = gg_trg_PostHeroCreation
With what? you may ask, I dunno, you can use a function that returns that stuff, you can also use an initializer, be creative there.
So, in other words your users will just need to modify the setup library and just include your HSS instead of messing with when and how to call ExecuteFunc("Start_HSS") , btw, I should advice against ever ExecuteFunc, if necessary use .execute() this time it was not necessary.
The reasoning is that jasshelper will some day integrate the map optimizer's capabilities but taking advantage of the higher level syntax, so if we just use alternatives to ExecuteFunc the optimization will be much better than with the optimizer, .execute() is faster anyways.
4. Oh yes, if you make a function public, make sure to document what it does.
I don't like this, don't worry, the reason I don't like it is that my old hero system code has a lot of messy stuff, and yours has inherited most of the bad things old hss had. Can you try fixing them? Will save me the time of having to update it, for example it is way too liberal about dynamic triggers.