Jump to content


Photo

Dynamic Orb Speed Control


  • Please log in to reply
4 replies to this topic

#1 midas

midas

    X-S Senior Member

  • Members
  • PipPip
  • 271 posts
  • Location:Galveston, TX
  • Interests:boom.
  • Xbox Version:v1.4

Posted 04 June 2005 - 10:24 PM

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!

#2 Odb718

Odb718

    X-S Freak

  • Last Chance
  • PipPipPipPipPip
  • 1,589 posts
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 04 June 2005 - 10:32 PM

Check out Gas' point of view mod because it has different speeds for the cellwall. You might get some clues there.

#3 midas

midas

    X-S Senior Member

  • Members
  • PipPip
  • 271 posts
  • Location:Galveston, TX
  • Interests:boom.
  • Xbox Version:v1.4

Posted 04 June 2005 - 11:09 PM

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.

#4 midas

midas

    X-S Senior Member

  • Members
  • PipPip
  • 271 posts
  • Location:Galveston, TX
  • Interests:boom.
  • Xbox Version:v1.4

Posted 05 June 2005 - 12:43 AM

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;
}
}


#5 midas

midas

    X-S Senior Member

  • Members
  • PipPip
  • 271 posts
  • Location:Galveston, TX
  • Interests:boom.
  • Xbox Version:v1.4

Posted 05 June 2005 - 07:22 AM

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;
 }
}

Edited by midas, 05 June 2005 - 07:25 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users