Results 1 to 6 of 6

Thread: Keybinds

  1. #1

    Default Keybinds

    How would I get my exec function to get called when I press right click?

    My class file is:
    Code:
    class MyController extends UTPlayerController
    	config(Input);
    
    exec function myFunction( )
    {
    	`log("Start my function.");
    }
    
    exec function stopMyFunction( )
    {
    	`log("Stop my function.");
    }
    
    defaultproperties
    {
    }
    So far I have tried adding this to the end of the UTInput.ini file:
    Code:
    [MyGame.MyController]
    Bindings=(Name="GBA_AltFire",Command="myFunction | OnRelease stopMyFunction")
    I can call my function properly through the console, but when I right click nothing happens.


    What am I doing wrong? Excuse the newbie question, I'm just trying to get a basic understanding of the engine.

  2. #2
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Location
    Arulco
    Posts
    158

    Default

    Try RightMouseButton for name - works fine for me

  3. #3

    Default

    Quote Originally Posted by guineapig View Post
    Try RightMouseButton for name - works fine for me
    Not sure why I didn't try that.

    Thanks a lot.

  4. #4

    Default

    Hi All

    My class file is:

    class TPSPlayerController extends PlayerController
    config(Game);


    exec function myFunction( )
    {
    `log("Start my function.");

    }



    defaultproperties
    {
    CameraClass=class'TPS.TPSPlayerCamera'
    }
    UTInput.ini

    [TPS.TPSPlayerController]
    Bindings=(Name="RightMouseButton",Command="myFunct ion")
    when I right click nothing happens.
    What am I doing wrong?

  5. #5
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Location
    Arulco
    Posts
    158

    Default

    That little space in your second quote, was it just a copy&paste accident?

  6. #6

    Default

    I had exactly the same problem.

    my class extends PlayerController
    no extends UTPlayerController

    copy function myFunction( )

    but when I right click nothing happens.
    What am I doing wrong?

    sorry for my english


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.