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.
Announcement
Collapse
No announcement yet.
help with creating dynamic mobile buttons
Collapse
X
-
Originally posted by ProductivityKiller View PostYeah, you could program that into a tick function to execute every frame.
Comment
-
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) }
Comment
Comment