Announcement

Collapse
No announcement yet.

Interaction Problem

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

    Interaction Problem

    I have an interaction that does some stuff with 2 key presses. The problem that I'm having is that the interaction works perfectly at first, but once you move the mouse, the interactions stops working completely. Then if you hit the ESC key to bring up the menu and then go back into the game it works again until you move the mouse. Any thoughts?

    #2
    Originally posted by CDtech026 View Post
    Any thoughts?
    No, but that could be related to the lack of (relevant) code.

    Comment


      #3
      Interaction Class

      Code:
      class MyInteraction extends Interaction;
      
      event Initialized()
      {
      
       	 Log("Interaction Initialized");
      
      }
      
      function bool KeyEvent(out EInputKey InputKey, out EInputAction InputAction, float Delta)
      {
          local MyCont MC;
      
          Log(InputKey);
      
          If ((InputKey == IK_PageUp || InputKey == IK_PageDown) && (InputAction == IST_Release))
          {
              foreach ViewportOwner.Actor.DynamicActors(class'MyCont', MC)
              {
                  If (MC != None)
                     {MC.IntLook = 0;}
              }
          }
      
          If ((InputKey == IK_PageUp) && (InputAction == IST_Press))
          {
              foreach ViewportOwner.Actor.DynamicActors(class'MyCont', MC)
              {
                  If (MC != None)
                     {MC.IntLook = 1;}
              }
          }
      	Else If ((InputKey == IK_PageDown) && (InputAction == IST_Press))
          {
              foreach ViewportOwner.Actor.DynamicActors(class'MyCont', MC)
              {
                  If (MC != None)
                      {MC.IntLook = 2;}
              }
          }
      
          return Super.KeyEvent(InputKey, InputAction, Delta);
      
      }
      
      defaultproperties
      {
          bActive=True
         	//bRequiresTick=True
      }

      Controller Class

      Code:
      class MyCont extends xPlayer;
      
      var int IntLook;
      
      event playertick (float deltatime)
      {
      
          myUpdate();
      
          Super.PlayerTick(deltatime);
      
      }
      
      function myUpdate()
      {
          If (Pawn != None)
          {
      
      	  If ( IntLook == 1 ) {aBaseX -= 400;}
      	  Else If ( IntLook == 2 ) {aBaseX += 400;}
      
          }
      }
      
      DefaultProperties
      {
            IntLook = 0;
      }
      What else do you need?

      Comment


        #4
        sry 4 the dbl post but i figured out that its not a problem with my mutator because i still have the problem when my mutator isnt even active. i cant even play the game now its so bad. i could really use some help here.

        Comment


          #5
          do you have two monitors? I have noticed some very bizarre problems with Unreal in full screen mode since installing a second monitor

          Comment


            #6
            O_rly? As a matter of fact I do and so does another computer I tryed it on... also resulting in the locking problem. Ill disconnect the second monitor and try it.

            EDIT: Removed second monitor... no change. Good suggestion though. Thanks.

            Comment

            Working...
            X