elemMoveX(time, x)
{
self MoveOverTime(time);
self.x = x;
}
elemMoveY(time, y)
{
self MoveOverTime(time);
self.y = y;
}
setPos(xPos, yPos)
{
self.xPos = xPos;
self.yPos = yPos;
}
moveMenu()
{
self endon("death");
self endon("moved menu");
self endon("disconnect");
level endon("game_ended");
for(;
{
if(/*DPAD UP*/)
{
self.y++;
}
if(/*DPAD RIGHT*/)
{
self.x++;
}
if(/*DPAD DOWN*/)
{
self.y--;
}
if(/*DPAD LEFT*/)
{
self.x--;
}
if(/* X */) //confirm menu position
{
self.xPos = self.x;
self.yPos = self.y;
self notify("moved menu");
}
wait 0.05;
//increase wait time if this gives you connection interrupted
}
}
//call moveMenu() on every hud elem
//you can create an array for your hud elements and then simply loop through it
idk()
{
hud_size = self.hud.size;
for(i=0; i<hud_size; i++)
{
self.hud[i] moveMenu();
}
}
//note you need to use variables for your hud elem positons
//example self.hud["background"] setPos(input1, input2);
Copyright © 2024, NextGenUpdate.
All Rights Reserved.