Announcement

Collapse
No announcement yet.

help with creating dynamic mobile buttons

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

    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
    Yeah, you could program that into a tick function to execute every frame.

    Comment


      #3
      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?

      Comment


        #4
        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?

        Comment

        Working...
        X