Page 1 of 1
End turn button
Posted: Sun May 03, 2015 3:14 pm
by enric
Is there a way to script control de icon of the End Turn button?
Re: End turn button
Posted: Tue May 05, 2015 3:23 pm
by pipfromslitherine
Hmmm. It sets the texture in code, every tick IIRC. You could try using the UI script commands to change it, but unless you managed to find just the right script to change it in I imagine you would be fighting the code.
Cheers
Pip
Re: End turn button
Posted: Tue May 05, 2015 3:24 pm
by pipfromslitherine
That said, you could (I guess) replace it with your own button and move the actual End Turn button offscreen, then do what you like with YOUR button and just have it trigger the offscreen button for its functionality. I think Hell ended up doing something like this for some reason
Cheers
Pip
Re: End turn button
Posted: Tue May 05, 2015 3:33 pm
by enric
pipfromslitherine wrote:That said, you could (I guess) replace it with your own button and move the actual End Turn button offscreen, then do what you like with YOUR button and just have it trigger the offscreen button for its functionality. I think Hell ended up doing something like this for some reason
Cheers
Pip
Is there a link to the Hell example/scenario?
Re: End turn button
Posted: Tue May 05, 2015 5:08 pm
by pipfromslitherine
It's part of the core game. As I say, all they do is customise the UI to move the End Turn button offscreen, then trigger it using script commands from their custom UI control.
Cheers
Pip
Re: End turn button
Posted: Tue May 05, 2015 5:13 pm
by enric
pipfromslitherine wrote:It's part of the core game. As I say, all they do is customise the UI to move the End Turn button offscreen, then trigger it using script commands from their custom UI control.
Cheers
Pip
Give me a clue to avoid to have to open every core campaign scenarios
Re: End turn button
Posted: Wed May 06, 2015 4:58 pm
by pipfromslitherine
No - it's part of their UI setup. I will try and be clearer as to what you (in theory) can do:
have a replacement for battlecommon.txt in your own campaign UI. In this UI file you move the existing DeployFightButton control offscreen (this is the end turn button that the code reacts to). Add your own button with a different name and hook it up to your UI script (which you will need to add to the UI file too).
You can then control your UI button as you like, in terms of changing textures, strings etc. When you want to actually end the turn, you would use TriggerUIObject to 'press' the DeployFightButton control (which is offscreen) to end the turn as per normal.
Cheers
Pip
Re: End turn button
Posted: Wed May 06, 2015 6:17 pm
by enric
Thanks, I'll try it.