@cokes1999
If you want to use "[4]", you need to keep all the script call:
pos.alignX = {1:"none", 2:"left", 3:"center", 4:"right"}[1]
So each number will represent an option.
Alternatively, you can just write the option you want:
pos.alignX = "right"
- that will happen if you set the
pos.inMessage = true. The choice box will be relative to the message(inside the message window).
Oh! Now I get what you really want. Unfortunately, it does not align that way. if you want it that way, you will need to calculate the position yourself. Luckily, is not hard to do, so I did it for you. Just copy and paste that into the script call:
Spoiler: Script call text
const pos = Eli.ChoiceManager.settings.position
const choice = SceneManager._scene._messageWindow._choiceWindow
const numberOfChoices = 2
pos.alignX = "right"
pos.alignY = "top"
pos.inMessage = true
pos.offsetY = -choice.fittingHeight(numberOfChoices)
View attachment 225681
What I'm doing is automatically putting the choice window position inside the message window, at the upper-right corner. Then I get the choice window height size with the function
this.fittingHeight(lines) and replace the "lines" argument with the number of choices it has, which in this case is 2.
I get that value and set it as a negative offset Y.
So if you want to align to the left or to the center, you just need to get that script call and change the
alignX to "left" or "center".