- Jun 13, 2022
- 215
- 47
Any idea how we can code POV selection right when the game starts? Like giving the player the option to choose which character's POV they wanna play through? For example, MC POV, FMC POV, or both together.
label start:
scene pov_choice # a relevant image
menu:
"Which pov do you want to play"
"Male":
jump male_pov
"Female":
jump female_pov
Yeah this would be the simple way to do. But I was thinking of a more stylish way of doing it like providing the images of the characters on the screen with a button under them which would let the player choose the POV.A dead simple way would be this:
I didn't have time to test this, but it should work.Python:label start: scene pov_choice # a relevant image menu: "Which pov do you want to play" "Male": jump male_pov "Female": jump female_pov
screen pov_choice:
add background_image # an image to set as background, alternatively you could do
# scene whatever previously in the label
imagebutton:
xpos 100 ypos 100 # the 100 are random values, you should change them as necessary
idle "female_pov_idle.jpg" # the path to the image
hover "female_pov_hover.jpg"
action Jump("female_pov")
xpos 200 ypos 200
idle "male_pov_idle.jpg"
hover "male_pov_hover.jpg"
action Jump("male_pov")
xpos 300 ypos 300
idle "both_pov_idle.jpg"
hover "both_pov_hover.jpg"
action Jump("both_pov")
label start:
...
call screen pov_choice
thx i will check this out once i am back on my pcThen you'd probably need a screen with buttons. What I'd do is something like this:
I haven't tested it for bugs, but that's the general idea.Code:screen pov_choice: add background_image # an image to set as background, alternatively you could do # scene whatever previously in the label imagebutton: xpos 100 ypos 100 # the 100 are random values, you should change them as necessary idle "female_pov_idle.jpg" # the path to the image hover "female_pov_hover.jpg" action Jump("female_pov") xpos 200 ypos 200 idle "male_pov_idle.jpg" hover "male_pov_hover.jpg" action Jump("male_pov") xpos 300 ypos 300 idle "both_pov_idle.jpg" hover "both_pov_hover.jpg" action Jump("both_pov") label start: ... call screen pov_choice
Then you'd probably need a screen with buttons. What I'd do is something like this:
I haven't tested it for bugs, but that's the general idea.Code:screen pov_choice: add background_image # an image to set as background, alternatively you could do # scene whatever previously in the label imagebutton: xpos 100 ypos 100 # the 100 are random values, you should change them as necessary idle "female_pov_idle.jpg" # the path to the image hover "female_pov_hover.jpg" action Jump("female_pov") xpos 200 ypos 200 idle "male_pov_idle.jpg" hover "male_pov_hover.jpg" action Jump("male_pov") xpos 300 ypos 300 idle "both_pov_idle.jpg" hover "both_pov_hover.jpg" action Jump("both_pov") label start: ... call screen pov_choice
Yeah, I'm an idiot.
screen pov_choice:
add background_image # an image to set as background, alternatively you could do
# scene whatever previously in the label
imagebutton:
xpos 100 ypos 100 # the 100 are random values, you should change them as necessary
idle "female_pov_idle.jpg" # the path to the image
hover "female_pov_hover.jpg"
action Jump("female_pov")
imagebutton:
xpos 200 ypos 200
idle "male_pov_idle.jpg"
hover "male_pov_hover.jpg"
action Jump("male_pov")
imagebutton:
xpos 300 ypos 300
idle "both_pov_idle.jpg"
hover "both_pov_hover.jpg"
action Jump("both_pov")
label start:
...
call screen pov_choice
for the "add background_image" part, my image name is "selection". So it shows as "add selection". But exception raised that "selection" is not defined. (NameError). The "selection.png" is in the images folder of my game.Yeah, I'm an idiot.
Python:screen pov_choice: add background_image # an image to set as background, alternatively you could do # scene whatever previously in the label imagebutton: xpos 100 ypos 100 # the 100 are random values, you should change them as necessary idle "female_pov_idle.jpg" # the path to the image hover "female_pov_hover.jpg" action Jump("female_pov") imagebutton: xpos 200 ypos 200 idle "male_pov_idle.jpg" hover "male_pov_hover.jpg" action Jump("male_pov") imagebutton: xpos 300 ypos 300 idle "both_pov_idle.jpg" hover "both_pov_hover.jpg" action Jump("both_pov") label start: ... call screen pov_choice
great it works but how to let players know what to do when they see these 3 images? Because I was expecting something like prompting the players to select which pov they want and a small text for each image which depicts what pov each image belongs to.Tryadd "selection"
or
add "images/selection.png"
Actually I noticed that when I click on female pov, the dialogues in that pov are coming from the male pov label. Any idea why?Yeah, I'm an idiot.
Python:screen pov_choice: add background_image # an image to set as background, alternatively you could do # scene whatever previously in the label imagebutton: xpos 100 ypos 100 # the 100 are random values, you should change them as necessary idle "female_pov_idle.jpg" # the path to the image hover "female_pov_hover.jpg" action Jump("female_pov") imagebutton: xpos 200 ypos 200 idle "male_pov_idle.jpg" hover "male_pov_hover.jpg" action Jump("male_pov") imagebutton: xpos 300 ypos 300 idle "both_pov_idle.jpg" hover "both_pov_hover.jpg" action Jump("both_pov") label start: ... call screen pov_choice