Page 1 of 1

Find out if party is empty and player is viewing a mirror?

Posted: Thu Oct 29, 2020 3:27 pm
by Gambit37
I'd like something specific to happen when the player has not yet chosen a champion from a mirror but is viewing a mirror. How would I go about that? (All the ppos functions return a positive when a mirror is being viewed because they seem to consider that the mirror character is in the party at position 0, even though they haven't been selected yet.)

Re: Find out if party is empty and player is viewing a mirror?

Posted: Fri Oct 30, 2020 8:39 pm
by Sophia
Yes, DSB temporarily adds the mirror character to the party in order to inspect them. However, you can combine your check with dsb_current_champion which returns the ppos currently being viewed in a mirror, or nil if you aren't in a mirror. If there's only one character in the party, and that one character is being viewed in a mirror, then nobody has actually been selected.

Re: Find out if party is empty and player is viewing a mirror?

Posted: Fri Oct 30, 2020 10:49 pm
by Gambit37
OK, ta. Is dsb_current_champion in the newest version of DSB? I'm still using 0.76 and I get a crash if I try to use that function.
EDIT: Never mind, I just read the release post for 0.77. Time for me to upgrade (I keep avoiding it due to how much modified code I have to check against the base code to ensure I don't miss anything important!)

Re: Find out if party is empty and player is viewing a mirror?

Posted: Sat Oct 31, 2020 8:18 pm
by Sophia
I wouldn't bother just yet. 0.78 is coming very soon!