Little eye candy to incentivise the response.
Within the game I am creating I have implemented a strip club with a fairly dynamic background and dancers. Not only does the background change based upon your relative success, however you can change which performers appear on each stage. Whilst all this is working fine, I am seeking a less verbose solution to allocating the dancers to the stages.
I have a screen within which I list the available dancers (5 at present with more to come) and also the stages on which they perform via the circles. I'll pretty up the screen once I have resolved the coding.
The issue I face, is that I use three variables, to list what performer appears on each stage (pole1_dancer, pole2_dancer, pole3_dancer). These variables are set to the relevant dancer name. This sort of works, however I am able to assign the same dancer to multiple stages, thereby effectively cloning the dancer in game. Whilst I can fix this using the following code, it is horribly verbose.
I would have to do similar code for every single button.
To provide some reference on how this is used in the first image the screen code is as below:
Assistance in optimising the stage selection coding would be appreciated.
Within the game I am creating I have implemented a strip club with a fairly dynamic background and dancers. Not only does the background change based upon your relative success, however you can change which performers appear on each stage. Whilst all this is working fine, I am seeking a less verbose solution to allocating the dancers to the stages.
I have a screen within which I list the available dancers (5 at present with more to come) and also the stages on which they perform via the circles. I'll pretty up the screen once I have resolved the coding.
The issue I face, is that I use three variables, to list what performer appears on each stage (pole1_dancer, pole2_dancer, pole3_dancer). These variables are set to the relevant dancer name. This sort of works, however I am able to assign the same dancer to multiple stages, thereby effectively cloning the dancer in game. Whilst I can fix this using the following code, it is horribly verbose.
Python:
imagebutton:
auto "cbutton_%s.png"
action SetVariable("pole1_dancer", "chiara")
if pole2_dancer == "chiara":
action SetVariable("pole2_dancer", "none")
if pole3_dancer == "chiara":
action SetVariable("pole2_dancer", "none")
To provide some reference on how this is used in the first image the screen code is as below:
Python:
screen club:
imagemap:
auto ("strip{}_cam_%s.webp".format(club_croud))
hotspot (0,860,1920,220) clicked Jump("hold")
hotspot (520,0,880,860) clicked Jump("club_bar")
if pole2_dancer != "none":
imagebutton:
auto ("{}_2_{}_%s.webp".format(pole2_dancer,pole2_pos))
focus_mask True
action Jump("club_pole2")
if pole3_dancer != "none":
imagebutton:
auto ("{}_3_{}_%s.webp".format(pole3_dancer,pole3_pos))
focus_mask True
action Jump("club_pole3")
if pole1_dancer != "none":
imagebutton:
auto ("{}_1_{}_%s.webp".format(pole1_dancer,pole1_pos))
focus_mask True
action Jump("club_pole1")