End turn button
Moderators: Slitherine Core, BA Moderators
End turn button
Is there a way to script control de icon of the End Turn button?
-
pipfromslitherine
- Site Admin

- Posts: 9923
- Joined: Wed Mar 23, 2005 10:35 pm
Re: End turn button
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
Cheers
Pip
follow me on Twitter here
-
pipfromslitherine
- Site Admin

- Posts: 9923
- Joined: Wed Mar 23, 2005 10:35 pm
Re: End turn button
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
Cheers
Pip
follow me on Twitter here
Re: End turn button
Is there a link to the Hell example/scenario?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
-
pipfromslitherine
- Site Admin

- Posts: 9923
- Joined: Wed Mar 23, 2005 10:35 pm
Re: End turn button
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
Cheers
Pip
follow me on Twitter here
Re: End turn button
Give me a clue to avoid to have to open every core campaign scenariospipfromslitherine 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
-
pipfromslitherine
- Site Admin

- Posts: 9923
- Joined: Wed Mar 23, 2005 10:35 pm
Re: End turn button
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
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
follow me on Twitter here
Re: End turn button
Thanks, I'll try it.
