Results 1 to 3 of 3
  1. #1

    Question Console Command Variable Argument, AS2, Kismet

    Hi, I want to trigger a console command with a string variable as the argument instead of hard-coding it directly into the kismet "console command" box.

    If by any chance you've found a similar thread I would love to look through it and if there is anything you think I should post to clarify please ask me to do so and what that you think will be needed.

    Any help appreciated
    //Pensho


    -! Solved !-
    The answer is not fully as I expected but in the end the chosen solution works.
    Last edited by Pensho; 04-23-2012 at 03:28 AM.

  2. #2

    Default

    Update

    Sofar I've made a custom kismet action node that takes a string variable as an argument (VariableLink) and I've made the node extend to the "console command" to adjust the command array and set the string to a slot but it's not working sofar, here is the code for the node if that would be usefull to see.

    Code:
    // extend UIAction if this action should be UI Kismet Action instead of a Level Kismet Action
    class EnigmaTestConsoleCommandArgument extends SeqAct_ConsoleCommand;
    
    var string ValueA;
    
    event Activated()
    {
    	Command = ValueA;
    	Commands[0] = ValueA;
    }
    
    defaultproperties
    {
    	ObjName="EnigmaTestConsoleCommandArgument"
    	ObjCategory="EnigmaTest Actions"
    
    	VariableLinks(1)=(ExpectedType=class'SeqVar_String',LinkDesc="String",bWriteable=true,PropertyName=ValueA)
    }
    As always
    //Pensho
    Last edited by Pensho; 04-20-2012 at 02:20 AM.

  3. #3

    Default

    Okey, I've solved ultimate problem but not by the desired road. I had to skip the kismet node console command due to its' complexity and switched to the flash "External Interface call" so consider all the node parts useless.

    this part is the actionscript connected via a button to the GFxMoviePlayer.uc class in unrealscript
    Code:
    import flash.external.ExternalInterface;
    
    var ip:String;
    
    function joining()
    {
     	ip = inputIP.text; // make ip variable whatevers typed into the TextInput
     
    	// call JoinFunction in unreal script and send ip
    	ExternalInterface.call("JoinFunction", ip); 
    }
    
    // call Joining function when join button is clicked
    join.addEventListener("click", this, "joining");
    This is the code needed in your GFxMoviePlayer.uc or respectively created custom MoviePlayer.
    Code:
    function JoinFunction(string ip)
    {
    	ConsoleCommand(ip);
    }
    In the end this look pretty much like other threads that I've seen before mainly theses sources:
    http://forums.epicgames.com/threads/...m-menu-problem
    http://forums.epicgames.com/threads/...onnection-Menu

    If you require more info to solve this problem please ask and I will post additional information.

    As always
    //Pensho


 

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.