Results 1 to 4 of 4
  1. #1
    MSgt. Shooter Person
    Join Date
    Nov 2011
    Posts
    46

    Default help with creating dynamic mobile buttons

    Hey guys I was wondering if there's a way through unrealscript to add buttons and be able to change their location on the fly during gameplay. in other words if i can have their x and y location be variables i can change whenever i run a function of some sort.

  2. #2

    Default

    Yeah, you could program that into a tick function to execute every frame.

  3. #3
    MSgt. Shooter Person
    Join Date
    Nov 2011
    Posts
    46

    Default

    Quote Originally Posted by ProductivityKiller View Post
    Yeah, you could program that into a tick function to execute every frame.
    cool, could you show me an example on how the tick function works with those mobile buttons and do i have to declare the button in the defaultgame.ini, if i want to add any additional buttons?

  4. #4
    MSgt. Shooter Person
    Join Date
    Nov 2011
    Posts
    46

    Default

    and thanks for the response.

    I should put in script i attempt to make for my game, easier for others to follow.

    Code:
    class SeqAct_MyUberMobileButton extends SeqAct_MobileAddInputZones;
    
    /* Our X and Y coordinates */
    var() float YLoc;
    var() float XLoc;
    
    /** All the details needed to set up a zone */
    //var() editinline MobileInputZone NewZone;
    
    event Activated()
    {
    
    	NewZone.X = XLoc;
    	NewZone.Y = YLoc;
    	
    }
    
    DefaultProperties
    {
       ////Button
       ObjName="Add My Unique Input Zone"
       ObjCategory="Mobile"
    
       XLoc = 0
       YLoc = 0
    
       InputLinks(0)=(LinkDesc="In")
       OutputLinks(0)=(LinkDesc="Out")
    
       ////Variable external setup
       VariableLinks(1)=(ExpectedType=class'SeqVar_float', LinkDesc="YLoc", bWriteable=true, PropertyName=YLoc)
       VariableLinks(2)=(ExpectedType=class'SeqVar_float', LinkDesc="XLoc", bWriteable=true, PropertyName=XLoc)
    }
    was trying to find a way to access the mobile buttons' variable for my game. but in the process I end up creating another button sequence. What am i doing wrong in this script?
    Last edited by McManford; 08-26-2012 at 05:49 PM.


 

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.