I am not sure about is about hero picking functions (system if you already made that). Let says, in GUI, a trigger dealing with event peon (hero picker) enter circle of power to select a hero checks for its conditions before executing the actions.
I have 30 heros, there is a pain and memory consumption when dealing with 30 triggers in the old day of GUI, not to mention another 30 triggers for displaying hero skills to players for their chose.
Let's say I use global variables for all 30 types of heroes, all 30 types of skill tooltips.
Theoretically, Can I benefit from Jass by making firstly 1 function trig_Hero_Selection_Conditions to check the conditions (since they all check for the same conditions), then 30 or less functions trig_Hero_Selection_Actions.
Not sure condition function should be placed above the action function OR the other way around?
//========
then 1 exec functions to call function condition and those 30 functions action.
local trigger t=createtrigger()
call TriggerAddAction(...)
call TriggerAddCondition(...) (the same question about placing them)
return //pick a hero for player by variable[array] defined
Is that all possible to work out? less functions as compared to huge amounts of triggers I used in GUI. I noticed there are many ways to do hero selection but my old system stayed for years up to now I really decide to change it.
Recently I come up with new idea about picking heroes. Neutral hero(level 20 as e.g. of high level) becomes your hero (gettriggerplayer, change owner to trigger player) to let you see all skill details, clickable item or ability to select that hero (since I made hero with 6 skills, I would use item because there is no room for "pick hero" ability),
+ a function set movement speed of all neutral hero to 0 in the hero selection region or pathing blockers to block ally becoming hero from moving.
+ If selection region is where I'd like my hero selected to be in, then maybe a function to remove other neutral heroes, but problem of repick a hero is hard to solve.
either of the two above always requires 1 more function. Your hero returns to neutral when player select another hero. Else, A chosen one is then moved to your place as it's your hero.
I have played some maps with double-click hero selection and find myself hard to click a hero in order to choose one for me.
Tavern does not provide an interactive way of viewing the hero, hero stats, skills. Still but utmost important, I have to correct hero extended tooltip/text. This is painful. Peon could use a dummy skill to pick a hero but that option is not in my favor, many players are just dumb, they donno how to pick a hero!
Hope to see your advices, and if there is a hero picking library/system,...
Thank you very much.
I have 30 heros, there is a pain and memory consumption when dealing with 30 triggers in the old day of GUI, not to mention another 30 triggers for displaying hero skills to players for their chose.
Let's say I use global variables for all 30 types of heroes, all 30 types of skill tooltips.
Theoretically, Can I benefit from Jass by making firstly 1 function trig_Hero_Selection_Conditions to check the conditions (since they all check for the same conditions), then 30 or less functions trig_Hero_Selection_Actions.
Not sure condition function should be placed above the action function OR the other way around?
//========
then 1 exec functions to call function condition and those 30 functions action.
local trigger t=createtrigger()
call TriggerAddAction(...)
call TriggerAddCondition(...) (the same question about placing them)
return //pick a hero for player by variable[array] defined
Is that all possible to work out? less functions as compared to huge amounts of triggers I used in GUI. I noticed there are many ways to do hero selection but my old system stayed for years up to now I really decide to change it.
Recently I come up with new idea about picking heroes. Neutral hero(level 20 as e.g. of high level) becomes your hero (gettriggerplayer, change owner to trigger player) to let you see all skill details, clickable item or ability to select that hero (since I made hero with 6 skills, I would use item because there is no room for "pick hero" ability),
+ a function set movement speed of all neutral hero to 0 in the hero selection region or pathing blockers to block ally becoming hero from moving.
+ If selection region is where I'd like my hero selected to be in, then maybe a function to remove other neutral heroes, but problem of repick a hero is hard to solve.
either of the two above always requires 1 more function. Your hero returns to neutral when player select another hero. Else, A chosen one is then moved to your place as it's your hero.
I have played some maps with double-click hero selection and find myself hard to click a hero in order to choose one for me.
Tavern does not provide an interactive way of viewing the hero, hero stats, skills. Still but utmost important, I have to correct hero extended tooltip/text. This is painful. Peon could use a dummy skill to pick a hero but that option is not in my favor, many players are just dumb, they donno how to pick a hero!
Hope to see your advices, and if there is a hero picking library/system,...
Thank you very much.
Last edited: