Results 1 to 15 of 15
  1. #1
    MSgt. Shooter Person
    Join Date
    Oct 2010
    Location
    Pakistan
    Posts
    313

    Question Function ConsoleCommand is not working

    giving error this while running this code
    'function ConsoleCommand' differs from original; different number of parameters

    so pls correct me pls

    Code:
    class SFMenuTutorial extends GFxMoviePlayer;
    
    var GFxClikWidget StartButton;
    
    var GFxObject MainMenuTitle;
    
    function bool Start(optional bool StartPaused = false)
    {
    	super.Start();
    	Advance(0);
    	
    	MainMenuTitle = GetVariableObject("_root.textField");
    	MainMenuTitle.SetText("HELLO WORLD!");
    	
    	return true;
    }
    
    event bool WidgetInitialized(name WidgetName, name WidgetPath, GFxObject Widget)
    {
    	switch(WidgetName)
    	{
    		case ('startBtn'):
    			StartButton = GFxClikWidget(Widget);
    			StartButton.addEventListener('CLIK_press', OnStartButtonPress);
    			break;
    		default:
    			break;
    	}
    	return true;
    }
    
    function OnStartButtonPress(GFxClikWidget.EventData ev)
    {
    	ConsoleCommand("open DM-Deck");
    }
    
    final function ConsoleCommand(string Cmd, optional bool bWriteToLog)
    {
    	if (PlayerOwner != none)
    		PlayerOwner.ConsoleCommand(Cmd, bWriteToLog);
    }
    
    defaultproperties
    {
    	WidgetBindings.Add((WidgetName="startBtn",WidgetClass=class'GFxClikWidget'))
    }

  2. #2

    Default

    Simply delete the console command function (final function ConsoleCommand). That function works as expected in pre August builds of UDK, but should be deleted if you are using a build of August or higher.

  3. #3
    MSgt. Shooter Person
    Join Date
    Oct 2010
    Location
    Pakistan
    Posts
    313

    Default

    in ur video u write this script
    Code:
    Map=SFMenuDemo.udk
    LocalMap=SFMenuDemo.udk
    but we make SFMenuTutorial.uc and from where SFMenuDemo is come???

    nd if i try both SFMenuDemo.udk or SFMenuTutorial.udk game UDK gice me error...! wats the solution SIR

  4. #4

    Default

    You have to make a level called SFMenuDemo. An empty room or whatever. Then do all the kismet in that level as the video instructs you and save the level.

    I advise you to watch that video again and ensure you have done everything it instructs you step by step. It is confirmed working.

  5. #5
    MSgt. Shooter Person
    Join Date
    Oct 2010
    Location
    Pakistan
    Posts
    313

    Default

    ok SIR i will tell u if again prblm occur

  6. #6
    MSgt. Shooter Person
    Join Date
    Oct 2010
    Location
    Pakistan
    Posts
    313

    Default

    i did all ur step but my game UDK is not opening its showing me error again and again nd when i change defaultengine.ini file to its default setting then its start working other wise its showing me error and error is this:

    Code:
    UDK.exe has stopped working

  7. #7
    MSgt. Shooter Person
    Join Date
    Oct 2010
    Location
    Pakistan
    Posts
    313

    Thumbs up

    hurrrrrah every thing is working SIR but SIR there is still one prblm when my menu come there is no cursor but whn i saw ur video there is cursor nd also litlle confusion tht in ur video there is no spaces form top nd bottom but i mine there is little little spaces which showing ur room

    so pls guide me


    thnx SIR

    now u r my SIR

  8. #8

    Default

    Glad you figured it out.

    There is no cursor in yours because I did not create one in the tutorial. But you can add this to frame 1 of the Flash file, on the "actions" layer.

    // Mouse cursor code

    Mouse.hide()
    my_cursor._x = _xmouse;
    my_cursor._y = _ymouse;

    onEnterFrame = function() {
    my_cursor.startDrag();
    }

    Then create a mouse cursor graphic on the stage, and give it an instance name of 'my_cursor'

    As for the spaces showing, that is because of the resolution of the menu vs. the resolution of the game. To fix that, you'll need to adjust the menu's document size (Modify -> Document). But you're really going to need to create some resolution independent graphics for your final menu, that you can have dynamically adjusted in ActionScript to fit any resolution the player sets the game to.

  9. #9
    MSgt. Shooter Person
    Join Date
    Oct 2010
    Location
    Pakistan
    Posts
    313

    Default

    yes for dynamically adjusted actionscript u will tell in ur coming videos i thinks nd i add this script in my flash file nd tell u it work or not SIR

  10. #10
    MSgt. Shooter Person
    Join Date
    Oct 2010
    Location
    Pakistan
    Posts
    313

    Default

    SIR my cursor is not working

  11. #11

    Default

    I'm sorry to hear that, but more information is needed to be able to help you figure out what is wrong.

  12. #12
    MSgt. Shooter Person
    Join Date
    Oct 2010
    Location
    Pakistan
    Posts
    313

    Default

    i will tell u step wise wat i did.

    first create cursor then save its as cursor.png

    2nd import it in Flash thn convert it into graphic symbol nd on action layer i drop it from library.

    3rd i name is instance name as my_cursor and also paste code in action layer on frame 1

  13. #13

    Default

    That sounds correct. But I wouldn't put the cursor on the actions layer. That layer should be for code only. I'd put the cursor on one of the layers with graphics on it or better yet create a layer just for the cursor. Now you cannot turn the cursor into a 'Graphic' symbol and give it an instance name. It must be a 'Movie Clip'. Make sure you have stop(); as the last line of code.

    That being said, something is wrong if it isn't working, but I couldn't tell you what. Maybe its because the cursor is on the actions layer.

    You're going to have to troubleshoot your file.

  14. #14
    MSgt. Shooter Person
    Join Date
    Oct 2010
    Location
    Pakistan
    Posts
    313

    Default

    would i snd u my file???

  15. #15

    Default

    Unfortunately, I can't make it a habit of getting files from everyone on the forums. I'm not actually in technical support, but I offer my assistance here on the forums when I can.

    You've got everything you need in the tutorial and the posts I've written to help you get it working. Most of what you're doing is very basic level stuff. So it shouldn't be hard for you to get it working.

    If however you can post more specific details of what is wrong and what your file looks like here I can try to help. You can post code, screenshots, etc.


 

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.