Announcement

Collapse

The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

[Beta 0.1] Dialogue System

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Has anyone had an issue implementing this system in the Dec 2011 Beta? I have everything loaded, but during the dialogue scene the mouse cursor is stuck in the upper left corner. Besides that, all is well.

    I've checked all of my settings and even reinstalled UDK to troubleshoot the problem. To ensure the scripts were compiled without errors, I had to comment out a couple lines.

    DIA_HUD - DrawTextReallyCentered(Content);
    DIA_Pawn - MotionBlurScale=0.0

    I have a feeling it might be something minor, but I am having a terrible time trying to find a solution.

    Any suggestions as to how I should approach this?

    Comment


      #17
      i'm having the same exact problem. the dialogue works, but the mouse is stuck in the upper left corner. If I can figure out the problem and get it working, i'll let you know what i did.

      Comment


        #18
        awsome , first time i see kismet useful for somethign : )

        Comment


          #19
          Hi all

          I'm having a go at getting this system to work, but am having a problem during the full recompile stage.

          The error code is :

          Code:
          Analyzing...
          C:\UDK\UDK-2013-02\Development\Src\Dialogue\Classes\DIA_HUD.uc(193) : Error, Unrecognized member 'DrawTextCentered' in class 'Canvas'
          Compile aborted due to errors.
          Warning/Error Summary
          ---------------------
          C:\UDK\UDK-2013-02\Development\Src\Dialogue\Classes\DIA_HUD.uc(193) : Error, Unrecognized member 'DrawTextCentered' in class 'Canvas'
          Failure - 1 error(s), 0 warning(s)
          Execution of commandlet took:  9.17 seconds
          [Mar 16, 5:33 PM] COMMANDLET 'UDK.exe make -full' FAILED
          I assume the issue is because the thread is quite old and this dialogue system has incompatibility issues with the newer versions of UDK.

          Does anyone know how I could get it to work?

          Comment


            #20
            Delete "Canvas." before DrawTextCentered in DIA_HUD.uc (line 193 and all other lines where is Canvas.DrawTextCentered).
            Then copy this into DIA_HUD.uc before default properties line:

            Code:
            final function DrawTextCentered(coerce string Text, optional bool CR = true, optional float XScale = 1.0, optional float YScale = 1.0, optional const FontRenderInfo RenderInfo = Canvas.CreateFontRenderInfo(true, true))
            {
            	local float XL, YL;
            
            	Canvas.TextSize(Text, XL, YL);
            	Canvas.SetPos(Canvas.CurX - XL / 2, Canvas.CurY);
            	Canvas.DrawText(Text, CR, XScale, YScale, RenderInfo);
            }

            Comment


              #21
              Originally posted by nonder View Post
              Delete "Canvas." before DrawTextCentered in DIA_HUD.uc (line 193 and all other lines where is Canvas.DrawTextCentered).
              Then copy this into DIA_HUD.uc before default properties line:

              Code:
              final function DrawTextCentered(coerce string Text, optional bool CR = true, optional float XScale = 1.0, optional float YScale = 1.0, optional const FontRenderInfo RenderInfo = Canvas.CreateFontRenderInfo(true, true))
              {
              	local float XL, YL;
              
              	Canvas.TextSize(Text, XL, YL);
              	Canvas.SetPos(Canvas.CurX - XL / 2, Canvas.CurY);
              	Canvas.DrawText(Text, CR, XScale, YScale, RenderInfo);
              }
              Fantastic. It worked.

              Thank you!

              Comment


                #22
                Hello, Did anyone ever fix the "mouse interaction" on this. I'm using the 2012 Build (v109499) November beta I think.
                I can't select any of the choices, mouse is stick in upper left corner.
                Or is this system pretty much dead. Any alternatives?

                Comment


                  #23
                  Originally posted by S ha d View Post
                  Hello everyone,

                  I worked yesterday and today on a small and simple system of dialogue to get familiar with Kimset nodes and I think this would be stupid not to share it rather than roting on my hard drive. Thank you to belzaran for the precious help!

                  So a very simple system with the ability to place choices during dialogues. Everything is configurable in Kismet and a little documentation is supplied with!

                  Video: See the video on Youtube



                  Download:
                  • Beta version 0.1: Here


                  (updated for July Beta)

                  Thank you.

                  Can anyone or has anyone got this system working again in the 2012 version of udk, i am currently trying to fix the code i have tried this piece the DIA.HUD

                  function Vector GetMouseWorldLocation()
                  {
                  local MouseInterfacePlayerInput MouseInterfacePlayerInput;
                  local Vector2D MousePosition;
                  // local Vector MouseWorldOrigin, MouseWorldDirection, HitLocation, HitNormal;

                  HitLocation = MyPlayerController.HitLocation;

                  // Ensure that we have a valid canvas and player owner
                  if (Canvas == None || PlayerOwner == None)
                  {
                  return Vect(0, 0, 0);
                  }

                  // Type cast to get the new player input
                  MouseInterfacePlayerInput = MouseInterfacePlayerInput(PlayerOwner.PlayerInput) ;

                  // Ensure that the player input is valid
                  if (MouseInterfacePlayerInput == None)
                  {
                  return Vect(0, 0, 0);
                  }

                  // We stored the mouse position as an IntPoint, but it's needed as a Vector2D
                  MousePosition.X = MouseInterfacePlayerInput.MousePosition.X;
                  MousePosition.Y = MouseInterfacePlayerInput.MousePosition.Y;
                  // Deproject the mouse position and store it in the cached vectors
                  Canvas.DeProject(MousePosition, MouseWorldOrigin, MouseWorldDirection);

                  // Perform a trace to get the actual mouse world location.
                  Trace(HitLocation, HitNormal, MouseWorldOrigin + MouseWorldDirection * 65536.f, MouseWorldOrigin , true,,, TRACEFLAG_Bullet);
                  return HitLocation;
                  }
                  But i just receive this error from udk

                  Error, Unrecognized Type 'MouseInterfacePlayerInput'

                  Comment


                    #24
                    Updated Kismet dialogue system

                    Hello; I'm new to UDK and posting on the forums here, but have learned a great deal from all of the documentation. As part of a school assignment, I've gotten Shad's excellent dialogue system running with the July 2013 Beta (haven't tried it with the February 2014 iteration yet). I'd appreciate it if you'd download it (here) to test it out and share any feedback you might have, especially suggestions for improvement/streamlining.

                    Comment


                      #25
                      Originally posted by saroux View Post
                      Hello; I'm new to UDK and posting on the forums here, but have learned a great deal from all of the documentation. As part of a school assignment, I've gotten Shad's excellent dialogue system running with the July 2013 Beta (haven't tried it with the February 2014 iteration yet). I'd appreciate it if you'd download it (here) to test it out and share any feedback you might have, especially suggestions for improvement/streamlining.
                      Did you get this working outside the example level in july 2013 build? because mine doesnt for some reason, it works when i load the test level then when i try to use the kismet nodes in my level nothing happens when i set my trigger off? :S

                      Comment


                        #26
                        Nevermind i got it working, i forgot to change the game type to DIA_Game in the world properties

                        Comment


                          #27
                          Solution for latest build

                          Hey, I got this working just fine in the latest build.
                          Me and a team of 20 people are making a game called 'The Nightmare' for a school project, and I really needed a simple and cool dialogue system with choices.
                          Thanks a bunch man!

                          EDIT : Hallo, I ran into some issues, namely the cursor being stuck at the top left of the screen during the Dialogue state. I managed to get past that using some help from the UDN Gem on how to enable a mouse interface. It's really simple actually, all you need to do is change the way the HUD class updates the mouse position because UIScenes was disabled in the latest build. It's achieved using the MouseInterfacePlayerInput class instead.

                          This is in the DIA_HUD class:

                          Code:
                          function vector2D GetMouseCoordinates()
                          {
                              local Vector2D mousePos;
                          	local MouseInterfacePlayerInput MouseInterfacePlayerInput;
                          	local UIInteraction UIController;
                          	  
                          	UIController  = PlayerOwner.GetUIController();
                          
                          	if (CursorTexture != None) 
                          	{
                          		 // Cast to get the MouseInterfacePlayerInput
                          		MouseInterfacePlayerInput = MouseInterfacePlayerInput(PlayerOwner.PlayerInput); 
                          
                          	    if (MouseInterfacePlayerInput != None)
                          		{
                          		  
                          		  mousePos.X = MouseInterfacePlayerInput.MousePosition.X;
                          		  mousePos.Y = MouseInterfacePlayerInput.MousePosition.Y;
                          
                          		}
                          	}
                                  return mousePos; 
                          
                          }
                          Also in DIA_HUD:

                          Code:
                          	function DrawCursor()     
                          	{	
                          	
                          		local Vector2D MousePosition;
                          		local DIA_PlayerController PC;
                          
                          		PC = DIA_PlayerController(PlayerOwner);
                          		
                          		if(!PC.NoChoice())
                          		{
                          		  MousePosition = GetMouseCoordinates();
                          		  // Set the canvas position to the mouse position
                          		  Canvas.SetPos(MousePosition.X,MousePosition.Y);
                          		  // Set the cursor color
                          		  Canvas.DrawColor = CursorColor;
                          		  // Draw the texture on the screen
                          		  Canvas.DrawTile(CursorTexture, CursorTexture.SizeX, CursorTexture.SizeY, 0.f, 0.f, CursorTexture.SizeX, CursorTexture.SizeY,, true);
                          		}
                          	}
                          Create a new class called MouseInterfacePlayerInput:

                          Code:
                          class MouseInterfacePlayerInput extends PlayerInput;
                          
                          // Stored mouse position. Set to protected write as we don't want other classes to modify it, but still allow other classes to access it.
                          var ProtectedWrite IntPoint MousePosition; 
                          
                          event PlayerInput(float DeltaTime)
                          {
                            // Handle mouse 
                            // Ensure we have a valid HUD
                            if (myHUD != None) 
                            {
                              // Add the aMouseX to the mouse position and clamp it within the viewport width
                              MousePosition.X = Clamp(MousePosition.X + aMouseX, 0, myHUD.SizeX); 
                              // Add the aMouseY to the mouse position and clamp it within the viewport height
                              MousePosition.Y = Clamp(MousePosition.Y - aMouseY, 0, myHUD.SizeY); 
                            }
                          
                            Super.PlayerInput(DeltaTime);
                          }
                          
                          defaultproperties
                          {
                          }
                          And add a reference to it in the PlayerController class:

                          Code:
                          DefaultProperties //Of DIA_PlayerController
                          {
                          	CameraClass=class'Dialogue.DIA_Camera'
                          	// Set the input class to the mouse interface player input
                              InputClass=class'MouseInterfacePlayerInput'
                          }
                          And you should be done! =D
                          Hope that helps!

                          Comment


                            #28
                            Hello,

                            I wanted to use this dialogue system in a multiplayer enviroment but it doesn't work. After i've researched the problems i came to the realisation that i couldn't work in his current state and i somewhat understand the reason for it (the client doesn't know the GameInfo, etc). Apparently i need a GameReplicationInfo Class but i don't really know what variables i need to store the GRI Class. Some say i could also store the variables in the playercontroller class if the other clients don't need to know what the other clients see.

                            As you see i'm a "little bit" confused by the multiplayer networking server/client stuff.

                            Has anyone tried this dialogue system in a multiplayer enviroment can help me with that? Or point me to some good tutorials about replication concerning displaying a HUD?

                            Thanks in advance

                            Comment


                              #29
                              The dialogue option in Kismet is not appearing for me im using udk 2014 (latest) need help please

                              Comment


                                #30
                                Oh,man .thats really good ,actually.Very useful to me ,Thx so much~

                                Comment

                                Working...
                                X