Code: Select all
#This part is defined before the debate.
define bullet_max = 5
define bullet_min = 1
define bullet1 = "Autopsy"
define bullet2 = "Beta"
define bullet3 = "Clive"
define bullet4 = "Dumptruck"
define bullet5 = "Exception"
#This screen is shown during the debate.
screen gun: #Screen appears
default bullet_selected = 1 #Always start with the first bullet selected
imagemap:
ground "TruthBullet/debate_ground.png"
hover "TruthBullet/debate_hover.png"
idle "TruthBullet/debate_idle.png"
#press the hotspots to cycle through the truth bullets
hotspot (8, 553, 112, 83) action Call("bullet_up") #Up
hotspot (8, 637, 112, 83) action Call("bullet_down") #Down
#These labels are called through the hotspots
label bullet_up:
if bullet_selected == bullet_max:
$ bullet_selected = bullet_min
else:
$ bullet_selected += 1
if bullet_selected == 1:
show text "{size=50}[bullet1]" as t0 onlayer screens:
xalign 0.1 yalign 1.0
elif bullet_selected == 2:
show text "{size=50}[bullet2]" as t0 onlayer screens:
xalign 0.1 yalign 1.0
elif bullet_selected == 3:
show text "{size=50}[bullet3]" as t0 onlayer screens:
xalign 0.1 yalign 1.0
elif bullet_selected == 4:
show text "{size=50}[bullet4]" as t0 onlayer screens:
xalign 0.1 yalign 1.0
elif bullet_selected == 5:
show text "{size=50}[bullet5]" as t0 onlayer screens:
xalign 0.1 yalign 1.0
else:
pass
return()
label bullet_down:
if bullet_selected == bullet_min:
$ bullet_selected = bullet_max
else:
$ bullet_selected -= 1
if bullet_selected == 1:
show text "{size=50}[bullet1]" as t0 onlayer screens:
xalign 0.1 yalign 1.0
elif bullet_selected == 2:
show text "{size=50}[bullet2]" as t0 onlayer screens:
xalign 0.1 yalign 1.0
elif bullet_selected == 3:
show text "{size=50}[bullet3]" as t0 onlayer screens:
xalign 0.1 yalign 1.0
elif bullet_selected == 4:
show text "{size=50}[bullet4]" as t0 onlayer screens:
xalign 0.1 yalign 1.0
elif bullet_selected == 5:
show text "{size=50}[bullet5]" as t0 onlayer screens:
xalign 0.1 yalign 1.0
else:
return()
4. The the hover images don't show on the buttons.
For reference here's a video of what I mean. Focus on the bottom left of the screen. Notice how it shows one truth bullet at a time and how it cycles through. Starts at 6:31
https://youtu.be/uLIHl8L7diQ?t=387
I hope what I wrote made sense.
I appreciate any input offered. Thank you very much for reading this post.