There is a Encyclopedia in the map I am maintaining. It has several category and each category has lots of entries which are dialog controls. When a player switches between pages, I use function 「DialogControlIsVisible」 to know if the entry ui of a position is under displaying, and decide the next step.
However, when a dialog control is not visible, it do return FALSE, but reports error 「DialogControlGetPropertyAsBool cannot get for parameter "property" as 12」. I wonder that:
<p>native bool DialogControlIsVisible (int control, int player);</p>
<p>native bool DialogControlGetPropertyAsBool (int control, int property, int player);</p>
<p>bool DialogControlIsVisible (int control, int player)<br />{<br /> return DialogControlGetPropertyAsBool (control, cINT_PROPETY_VISIBLITY,player);<br />}</p>
How could it works properly while reporting a error? Does the galaxy editor relies on a bug to run?
Plus, the error always and only occurs for the first 5 entries. That means when the number of entries of a category is not more than 5, every one of them reports this error. When the number of entries of a category is more than 5, only the first 5 entries report this error.
1. I output debug info and make sure the error is reported in the step of function 「DialogControlIsVisible」.
2. I check the bound of the array and make sure there is no outbound problem.
3. I out put debug info and make sure the dialog control is not NULL when use the function, and the parameter of player is OK.
Is that another way to check the visibility of a dialog control? I believe I should not rely on a bug.
Visibility state is "separate" if you do it with triggers or with sc2 layout. If you set the frame property to false with layouts, the script wont be aware of it, and viceversa. Its a problem with the semi async state of ui. Some properties work separate like that. You may want to join the discord and look for the editbox hack to find how to properly sync values
There is a Encyclopedia in the map I am maintaining. It has several category and each category has lots of entries which are dialog controls. When a player switches between pages, I use function 「DialogControlIsVisible」 to know if the entry ui of a position is under displaying, and decide the next step.
However, when a dialog control is not visible, it do return FALSE, but reports error 「DialogControlGetPropertyAsBool cannot get for parameter "property" as 12」. I wonder that:
How could it works properly while reporting a error? Does the galaxy editor relies on a bug to run?
Plus, the error always and only occurs for the first 5 entries. That means when the number of entries of a category is not more than 5, every one of them reports this error. When the number of entries of a category is more than 5, only the first 5 entries report this error.
1. I output debug info and make sure the error is reported in the step of function 「DialogControlIsVisible」.
2. I check the bound of the array and make sure there is no outbound problem.
3. I out put debug info and make sure the dialog control is not NULL when use the function, and the parameter of player is OK.
Is that another way to check the visibility of a dialog control? I believe I should not rely on a bug.
Visibility state is "separate" if you do it with triggers or with sc2 layout. If you set the frame property to false with layouts, the script wont be aware of it, and viceversa. Its a problem with the semi async state of ui. Some properties work separate like that. You may want to join the discord and look for the editbox hack to find how to properly sync values
Go play Antioch Chronicles Remastered!
Also, coming soon, Antioch Episode 3: Thoughts in Chaos!
Dont like mapster's ugly white? Try Mapster's Classic Skin!
In reply to AleviceJones:
Thanks a lot!