Help - Search - Members - Calendar
Full Version: Dynamic Orb Speed Control
Scenyx Entertainment Community > Xbox1 Forums > Dashboard Forums > Official Team UIX Forums > User.Interface.X (UIX) Code
midas
Ok here is where I am at code-wise:
CODE
control DEF theMainMenuJoy Joystick
   {
function OnRightThumbMoveUp()
{
            PlaySoundA();
c.Large_X_Spinner.rpm = c.Modded_Orb.rpm + 1;
 UpdateMainMenu();
}

function OnRightThumbMoveDown()
{
        PlaySoundA();
 c.Large_X_Spinner.rpm = c.Modded_Orb.rpm - 1;
 UpdateMainMenu();
}


I have the PlaySoundA() in there just to make sure it works, and it does play the sound. So I am guessing that the menu has to be reinitialized? I got the idea from this topic in the tHc forums. So hopefully gas or jb will know. Any help would be greatly apprecitated!
Odb718
Check out Gas' point of view mod because it has different speeds for the cellwall. You might get some clues there.
midas
OK i feel like a fuck bucket for two reasons:

1) I forgot to change both instances of c.Large_X_Spinner.rpm to c.Modded_Orb.rpm

2) I can get this to work (kindof)

but i do have this working

CODE
control DEF theMainMenuJoy Joystick
   {
function OnRightThumbMoveUp()
{
            PlaySoundA();
 var c = theMainMenu.children[0].children[0];
 c.Rotating_Large_X.visible = true;
}

function OnRightThumbMoveDown()
{
        PlaySoundB();
 var c = theMainMenu.children[0].children[0];
 c.Rotating_Large_X.visible = false;
}

but I am going to change it around a bit and hopefully add a few more objects once i get this working.
midas
Ok I got it. Thanks odb!

if anybody else wants to do this, It allows you to control the speed of the large rotating x with the right thumbstick. Clicking it will make it appear/disappear, while moving it up and down with speed it up and slow it down respectively.

Search default.xip/default.xap for:

CODE
control DEF theMainMenuJoy Joystick


and immediately below that above the function OnADown() put:

CODE
function OnRightThumbMoveUp()
{
var c = theMainMenu.children[0].children[0];
if (c.Rotating_Large_X.visible == true)
{
c.Large_X_Spinner.rpm = c.Large_X_Spinner.rpm + 1;
}
}

function OnRightThumbMoveDown()
{
var c = theMainMenu.children[0].children[0];
if (c.Rotating_Large_X.visible == true)
{
c.Large_X_Spinner.rpm = c.Large_X_Spinner.rpm - 1;
}
}

function OnRightThumbDown()
{
var c = theMainMenu.children[0].children[0];
if (c.Rotating_Large_X.visible == false)
{
 PlaySoundA();
 c.Rotating_Large_X.visible = true;
}
else
{
 PlaySoundB();
 c.Rotating_Large_X.visible = false;
}
}
midas
Although this has no real use besides eye candy i will post the update anyways. It manipulates the CellWall with the right thumbstick (side to side), Will rotate two different Orb Supports with up/down on the right thumb, and side to side on the left thumb. Clicking the Right thumb will reset the three spinners.

so right below:

CODE
   control DEF theMainMenuJoy Joystick
   {

paste:

CODE
function OnRightThumbDown() //resets the spinners
{
 var c = theMainMenu.children[0].children[0];
 c.Large_X_Spinner.rpm  = 1;
 c.MainPod_4_Spinner.rpm = -1.0;
 theMainMenuSpinner.rpm = 0;
}

function OnLeftThumbDown() //click the left thumbstick to make the Stock Orb dis-reappear with SOUND
{
 var c = theMainMenu.children[0].children[0];
 if (c.Stock_Orb.visible == false)
 {
  PlaySoundA();
  c.Stock_Orb.visible = true;
 }
 else
 {
  PlaySoundB();
  c.Stock_Orb.visible = false;
 }
}

function OnLeftThumbMoveLeft() //move Left thumb left to speed up the CellWall
{
 var c = theMainMenu.children[0].children[0];
 theMainMenuSpinner.rpm = theMainMenuSpinner.rpm + .5;
}

function OnLeftThumbMoveRight() //move Left thumb right to slow-reverse The Cell Wall
{
 var c = theMainMenu.children[0].children[0];
 theMainMenuSpinner.rpm = theMainMenuSpinner.rpm - .5;
}

function OnRightThumbMoveLeft() //move the Right thumb left to make small X speed up
{
 var c = theMainMenu.children[0].children[0];
 if (c.MainPod_4_Spinner.visible == true)
 {
  c.MainPod_4_Spinner.rpm = c.MainPod_4_Spinner.rpm + 1;
 }
}

function OnRightThumbMoveRight() //move Right thumb right to make small X slow-reverse
{
 var c = theMainMenu.children[0].children[0];
 if (c.MainPod_4_Spinner.visible == true)
 {
  c.MainPod_4_Spinner.rpm = c.MainPod_4_Spinner.rpm - 1;
 }
}

function OnRightThumbMoveUp() //speeds up the Large X
{
           var c = theMainMenu.children[0].children[0];
 if (c.Rotating_Large_X.visible == true)
 {
  c.Large_X_Spinner.rpm = c.Large_X_Spinner.rpm + 1;
 }
}

function OnRightThumbMoveDown() //Slows down-reverses the large X
{
        var c = theMainMenu.children[0].children[0];
 if (c.Rotating_Large_X.visible == true)
 {
  c.Large_X_Spinner.rpm = c.Large_X_Spinner.rpm - 1;
 }
}
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.