#how to get/select a specific Class using JS on panorama xml script??

1 messages · Page 1 of 1 (latest)

fathom barn
#

Guys, im having trouble to get a class to modify some style properties though custom ui manifest. I know that to get an ID i can use FindchildTraverse, but what about Class?? (I tried FindchildrenwithClassTraverse but it didn’t worked)
I tried to get using query selector too, but still nothing.
(Sorry for the bad english)

lyric roost
#

FindChildrenWithClassTraverse should work afaik.
are you sure the panel you're looking for is a child of the panel you're calling the function on?

#

if query selecter isnt finding it either then the panel probably just doesnt exist in the context

#

use the panorama debugger to see if its actually there (F6)

fathom barn
#

Thank you!!! Now its working!! One more question, do you know how to “disable” dota hero selection and use my own custo hero selection?

viral vapor
#

Many games such as Dota IMBA did that. The concept is to make all players get a Wisp as a forced hero choice (which skips hero selection), then show a panorama UI for hero selection. When the hero is chosen, use ReplaceHeroWith() to replace the player's Wisp with the selected hero. Then, the UI is hidden.

unborn cargo
#

there is no need to skip the original hero selection and do all the stuff Shush said. Just set the duration of original hero selection to 9999 seconds, hide the original, reveal your hero selection. When a player picks a hero in your hero selection, do player:SetSelectedHero, Original hero selection will be over when every player had their hero selected.

#

Only problem with SetSelectedHero is that it doesn't work for disconnected players, and they will auto-random when they disconnect.

#

Using Shush's method has issues: 1) it will give no hero to the player that disconnected during your hero selection and reconnected after it's over. 2) game time will be messed up entirely if the duration of your hero selection is dynamic. You can fix this by making custom clock and game events but that's a different can of worms.

viral vapor
#

For 1), you can simply random a hero for players who didn't pick by the end of the hero selection time. Regardless of whether they were disconnected

2), meh. Most players don't care about that much.