Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Multiple Choice Answers

Featured Replies

Heya!

 

I'm trying to have multiple choice/answers/actions etc. in my callouts. So far I only have the usual "Press Y to Speak" and I'm trying to get more button responses into it. However if I try it like this (simplified):

 

if (Game.IsKeyDown(System.Windows.Forms.Keys.End)) 
{ 
	if (Game.IsKeyDown(System.Windows.Forms.Keys.Y)) 
	{
		Do-Thing-A
	}
	else if (Game.IsKeyDown(System.Windows.Forms.Keys.C)) 
	{
		Do-Thing-B
	}
}

The Game either doesn't respond to either buttonpresses or it justs ends itself.

 

Is there any otherway (and probably more efficient) to get this kind of system implemented?

Edited by RicardaHub

  • 1 month later...

For my callouts I use game fibers and while loops for multiple choice dialogue. I can't tell if this is in the Process() or a gamefiber but for me my code usually looks something like this:

GameFiber.StartNew(delegate
            {
                Game.DisplayNotification("Press ~b~" + Settings.DialougeKey + "~w~ to speak.");
                while(true)
                {
                    GameFiber.Yield();
                    if(Game.IsKeyDown(Settings.DialougeKey1))
                    {
                        //do thing 1
                        option1 = true;
                        break;
                    }
                    else if(Game.IsKeyDown(Settings.DialougeKey2))
                    {
                        //do thing 2
                        option2 = true;
                        break;
                    }
                }
                if(option1) { Game.DisplaySubtitle("Response to option1"); }
                else if(option2) { Game.DisplaySubtitle("Response to option2"); }

            });

This is just a quick and dirty example but it demonstrates the general idea, and this could be adapted to work for decision making in a callout, not just dialogue. I hope this helps if you haven't already figured it out 😉

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Similar Content

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.