Jump to content


Photo

How Can I Get The Clock In This Orb To Work


  • Please log in to reply
14 replies to this topic

#1 JESUS

JESUS

    X-S Enthusiast

  • Members
  • 17 posts

Posted 10 January 2005 - 05:43 AM

how can i get this clock to work

user posted image

Edited by JESUS, 10 January 2005 - 05:54 AM.


#2 evil_ted

evil_ted

    X-S Member

  • Members
  • Pip
  • 71 posts

Posted 11 January 2005 - 07:17 PM

I dont know, but I can put the clock on any of the screens.... just cant get the fr*****n hands to move... any ideas..... anyone?

#3 evil_ted

evil_ted

    X-S Member

  • Members
  • Pip
  • 71 posts

Posted 11 January 2005 - 07:39 PM

http://img125.exs.cx...eenshot11gg.png

#4 evil_ted

evil_ted

    X-S Member

  • Members
  • Pip
  • 71 posts

Posted 11 January 2005 - 09:43 PM

user posted image

Got it...

#5 HoBoz

HoBoz

    X-S Young Member

  • Members
  • Pip
  • 40 posts
  • Xbox Version:v1.4
  • 360 version:v1 (xenon)

Posted 11 January 2005 - 09:52 PM

QUOTE(evil_ted @ Jan 11 2005, 03:14 PM)
user posted image

Got it...

View Post




please post


#6 vintster

vintster

    X-S Senior Member

  • Members
  • PipPip
  • 213 posts

Posted 11 January 2005 - 09:58 PM

...hmm some really smart people tongue.gif did this a while back for THC Lite but the concepts the same. You might even be able to use most of the same code.

Clock in Orb

#7 evil_ted

evil_ted

    X-S Member

  • Members
  • Pip
  • 71 posts

Posted 12 January 2005 - 05:41 AM

heres part of what I got - this gets the clock on the screen. in the Hard drive menu. It works for any screen, just the section that runs it (in the default.xip) varies depending on which menu you use, but for now the clock code, which gets the clock on the screen... Please note that if you use this in any other menu the translations and scales will be out. You will have to set the clocks position on the screen...
For every entry in this code there is a - url "Clock_clock_body01-FACES.xm" - (the "Clock_clock_body01-FACES" changes for each entry) these are the 'images' that you will need. They can be found in settings.xap.. and you will need to include them where you add this code. (So if its going in the mainmenu put the code in mainmenu.xip/default.xap, and the .xm files in the mainmenu.xip) I will add an update to get the clock hands moving. Also you can use parts of this file. So if you want to use just the clock hands take just the section that starts "DEF ClockHourHand Transform" see the second code snippet.
CODE

DEF console Transform
//DEF theBigClock Transform
{

fade 0.25
translation 41.5 12.080000 -207 // 98.27 6.096 -256.3
   
children
[
 Waver
 {
  axis 0 1 0
  rpm 5
  field 0.392
  children
  [
   Transform
   {
    scale 2 2 2 // 0.2 0.2 0.2
    rotation 0 1 0 0.20
    children
    [
     DEF Clock_clock_body01 Transform
     {
      children
      [
       Shape
       {
        appearance Appearance
        {
         material MaxMaterial
         {
          name "Metal_Chrome"
         }
        }
        geometry DEF Clock_clock_body01-FACES Mesh { url "Clock_clock_body01-FACES.xm" }
       }
      ]
      rotation 0.000267 -0.707100 0.707100 -3.142000
      scale 0.004331 0.004331 0.004331
      scaleOrientation 0.000864 0.407200 0.913400 -0.016060
      translation -0.012850 -0.014420 -0.003235
     }
     DEF Clock_clock_face01 Transform
     {
      children
      [
       Shape
       {
        appearance Appearance
        {
         material MaxMaterial
         {
          name "IconParts"
         }
        }
        geometry DEF Clock_clock_face01-FACES Mesh { url "Clock_clock_face01-FACES.xm" }
       }
      ]
      rotation -1.000000 -0.000377 0.000377 -1.571000
      scale 0.004981 0.004981 0.004981
      scaleOrientation 0.103500 -0.063420 -0.992600 -0.037570
      translation 0.001072 -0.000773 -0.605800
     }

     DEF ClockMinuteHand Transform
     {
      fade 0.1
      rotation 0 0 -1 0
      children
      [
       DEF Clock_clock_minutehand01 Transform
       {
        children
        [
         Shape
         {
          appearance Appearance
          {
           material MaxMaterial
           {
            name "Metal_Chrome"
           }
          }
          geometry DEF Clock_clock_minutehand01-FACES Mesh { url "Clock_clock_minutehand01-FACES.xm" }
         }
        ]
        rotation -0.577200 0.577200 0.577600 -2.094000
        scale 0.003079 0.003079 0.003079
        scaleOrientation 0.246300 0.420900 -0.873000 -0.592700
        translation 0.340500 0.001241 1.023000
       }
      ]
     }

     DEF ClockHourHand Transform
     {
      fade 0.1
      rotation 0 0 -1 0
      children
      [
       DEF Clock_clock_hourhand01 Transform
       {
        children
        [
         Shape
         {
          appearance Appearance
          {
           material MaxMaterial
           {
            name "Metal_Chrome"
           }
          }
          geometry DEF Clock_clock_hourhand01-FACES Mesh { url "Clock_clock_hourhand01-FACES.xm" }
         }
        ]
        rotation -1.000000 -0.000377 0.000378 -1.571000
        scale 0.002739 0.002739 0.002739
        scaleOrientation 0.001625 0.480000 -0.877300 -0.000429
        translation -0.002204 0.251100 1.026000
       }
      ]
     }
     DEF Clock_clock_dial01 Transform
     {
      children
      [
       Shape
       {
        appearance Appearance
        {
         material MaxMaterial
         {
          name "Metal_Chrome"
         }
        }
        geometry DEF Clock_clock_dial01-FACES Mesh { url "Clock_clock_dial01-FACES.xm" }
       }
      ]
      rotation -1.000000 -0.000377 0.000377 -1.571000
      scale 0.003654 0.003654 0.003654
      scaleOrientation -0.003516 -0.032030 -0.999500 -0.042450
      translation -0.002324 0.001241 0.869700
     }
     DEF Clock_Group09 Transform
     {
      children
      [
       DEF Clock_Rectangle15 Transform
       {
        children
        [
         Shape
         {
          appearance Appearance
          {
           material MaxMaterial
           {
            name "Metal_Chrome"
           }
          }
          geometry DEF Clock_Rectangle15-FACES Mesh { url "Clock_Rectangle15-FACES.xm" }
         }
        ]
        rotation -1.000000 0.000000 0.000000 -1.571000
        translation 0.000000 -5.112000 0.000000
       }
       DEF Clock_Rectangle16 Transform
       {
        children
        [
         Shape
         {
          appearance Appearance
          {
           material MaxMaterial
           {
            name "Metal_Chrome"
           }
          }
          geometry DEF Clock_Rectangle16-FACES Mesh { url "Clock_Rectangle16-FACES.xm" }
         }
        ]
        rotation -1.000000 0.000000 0.000000 -1.571000
        translation 0.000000 5.112000 0.000000
       }
      ]
      rotation 0.000377 0.000156 1.000000 -3.927000
      scale 0.157700 0.157700 0.157700
      scaleOrientation 0.003786 0.000106 1.000000 -0.157900
      translation -0.001126 0.002804 1.007000
     }
     DEF Clock_Group08 Transform
     {
      children
      [
       DEF Clock_Rectangle13 Transform
       {
        children
        [
         Shape
         {
          appearance Appearance
          {
           material MaxMaterial
           {
            name "Metal_Chrome"
           }
          }
          geometry DEF Clock_Rectangle13-FACES Mesh { url "Clock_Rectangle13-FACES.xm" }
         }
        ]
        rotation -1.000000 0.000000 0.000000 -1.571000
        translation 0.000000 -5.112000 0.000000
       }
       DEF Clock_Rectangle14 Transform
       {
        children
        [
         Shape
         {
          appearance Appearance
          {
           material MaxMaterial
           {
            name "Metal_Chrome"
           }
          }
          geometry DEF Clock_Rectangle14-FACES Mesh { url "Clock_Rectangle14-FACES.xm" }
         }
        ]
        rotation -1.000000 0.000000 0.000000 -1.571000
        translation 0.000000 5.112000 0.000000
       }
      ]
      rotation 0.000377 -0.000156 1.000000 -2.356000
      scale 0.157700 0.157700 0.157700
      scaleOrientation -0.003324 0.000000 -1.000000 -0.678500
      translation -0.001126 0.002804 1.007000
     }
     DEF Clock_Group07 Transform
     {
      children
      [
       DEF Clock_Rectangle11 Transform
       {
        children
        [
         Shape
         {
          appearance Appearance
          {
           material MaxMaterial
           {
            name "Metal_Chrome"
           }
          }
          geometry DEF Clock_Rectangle11-FACES Mesh { url "Clock_Rectangle11-FACES.xm" }
         }
        ]
        rotation -1.000000 0.000000 0.000000 -1.571000
        translation 0.000000 -5.112000 0.000000
       }
       DEF Clock_Rectangle12 Transform
       {
        children
        [
         Shape
         {
          appearance Appearance
          {
           material MaxMaterial
           {
            name "Metal_Chrome"
           }
          }
          geometry DEF Clock_Rectangle12-FACES Mesh { url "Clock_Rectangle12-FACES.xm" }
         }
        ]
        rotation -1.000000 0.000000 0.000000 -1.571000
        translation 0.000000 5.112000 0.000000
       }
      ]
      rotation 0.000377 -0.000377 1.000000 -1.571000
      scale 0.157700 0.157700 0.157700
      scaleOrientation -1.000000 0.004133 -0.000077 -0.026720
      translation -0.001126 0.002803 1.007000
     }
     DEF Clock_Group01 Transform
     {
      children
      [
       DEF Clock_Rectangle09 Transform
       {
        children
        [
         Shape
         {
          appearance Appearance
          {
           material MaxMaterial
           {
            name "Metal_Chrome"
           }
          }
          geometry DEF Clock_Rectangle09-FACES Mesh { url "Clock_Rectangle09-FACES.xm" }
         }
        ]
        rotation -1.000000 0.000000 0.000000 -1.571000
        translation 0.000000 -5.112000 0.000000
       }
       DEF Clock_Rectangle10 Transform
       {
        children
        [
         Shape
         {
          appearance Appearance
          {
           material MaxMaterial
           {
            name "Metal_Chrome"
           }
          }
          geometry DEF Clock_Rectangle10-FACES Mesh { url "Clock_Rectangle10-FACES.xm" }
         }
        ]
        rotation -1.000000 0.000000 0.000000 -1.571000
        translation 0.000000 5.112000 0.000000
       }
      ]
      rotation 0.000000 -1.000000 0.000000 -0.000755
      scale 0.157700 0.157700 0.157700
      translation -0.001126 0.002803 1.007000
     }
    ]
   }
  ]
 }
]
}


for just the clock hands use this..
CODE

     DEF ClockMinuteHand Transform
     {
      fade 0.1
      rotation 0 0 -1 0
      children
      [
       DEF Clock_clock_minutehand01 Transform
       {
        children
        [
         Shape
         {
          appearance Appearance
          {
           material MaxMaterial
           {
            name "Metal_Chrome"
           }
          }
          geometry DEF Clock_clock_minutehand01-FACES Mesh { url "Clock_clock_minutehand01-FACES.xm" }
         }
        ]
        rotation -0.577200 0.577200 0.577600 -2.094000
        scale 0.003079 0.003079 0.003079
        scaleOrientation 0.246300 0.420900 -0.873000 -0.592700
        translation 0.340500 0.001241 1.023000
       }
      ]
     }

     DEF ClockHourHand Transform
     {
      fade 0.1
      rotation 0 0 -1 0
      children
      [
       DEF Clock_clock_hourhand01 Transform
       {
        children
        [
         Shape
         {
          appearance Appearance
          {
           material MaxMaterial
           {
            name "Metal_Chrome"
           }
          }
          geometry DEF Clock_clock_hourhand01-FACES Mesh { url "Clock_clock_hourhand01-FACES.xm" }
         }
        ]
        rotation -1.000000 -0.000377 0.000378 -1.571000
        scale 0.002739 0.002739 0.002739
        scaleOrientation 0.001625 0.480000 -0.877300 -0.000429
        translation -0.002204 0.251100 1.026000
       }
      ]
     }


thats it... (for now) hope this helps...

Edited by evil_ted, 12 January 2005 - 05:45 AM.


#8 evil_ted

evil_ted

    X-S Member

  • Members
  • Pip
  • 71 posts

Posted 12 January 2005 - 05:52 AM

Updating the clock hands.
open default.xip/hard_drive.xap
search for

control DEF theHardDriveMenuJoy Joystick
make it look like this

CODE


   function OnActivate()
   {
 
 UpdateListClockHands();
 CurrentViewpoint = theHardDriveMenuViewpoint;
 CurrentAltViewpoint = AlternateHardDriveMenuViewpoint;
 EnableAudio();

 
   }
behavior
   {
       sleep 15;
UpdateListClockHands();
}


under this is a list of var's, add these 2 to it..
CODE

var nClockHour;
var nClockMinute;


goto the bottom of the file and add this

CODE

function UpdateListClockHands()
{
   var c = theHardDriveMenu.children[0].children[0];
   var d = new Date;
   nClockHour = d.getHours();
   nClockMinute = d.getMinutes();
   c.ClockHourHand.SetRotation(0, 0, -1, (nClockHour + nClockMinute / 60) * 6.283 / 12);
   c.ClockMinuteHand.SetRotation(0, 0, -1, (nClockMinute - 15) * 6.283 / 60);
}

think thats it...
oh yeah, like I said b4, for any other menu.. it should be the same (so for the mainmenu orb, def thebigclock (from the other post) needs to go into mainmenu.xip/default.xap, and the clockupdate from this file needs to go in the defaul.xip/default.xap. The differences are in
"theHardDriveMenu.children[0].children[0]; " and "DEF theHardDriveMenuJoy Joystick" havent done it yet, but I am pretty sure, when Ive got something (working) I will update this thread...

Edited by evil_ted, 12 January 2005 - 05:56 AM.


#9 evil_ted

evil_ted

    X-S Member

  • Members
  • Pip
  • 71 posts

Posted 12 January 2005 - 06:55 AM

for Default.xip/default.xap
sorry that last bit should be changed to
the function "updatelistclockhands()" would need
CODE

theHardDriveMenu.children[0].children[0];

changed to
CODE

theMainMenu.children[0].children[0];


and you will need to add
CODE

   function OnActivate()
  {

UpdateListClockHands();
 EnableAudio();
 CurrentViewpoint = theMainMenuViewpoint;
 CurrentAltViewpoint = theMainMenuAlternateViewpoint;
  }
behavior
  {
      sleep 15;
UpdateListClockHands();
}

to
CODE

control DEF theMainMenuJoy Joystick


or something like that

Edited by evil_ted, 12 January 2005 - 07:08 AM.


#10 evil_ted

evil_ted

    X-S Member

  • Members
  • Pip
  • 71 posts

Posted 12 January 2005 - 07:29 PM

yeah it worked!
user posted image

#11 Intenszz

Intenszz

    X-S Enthusiast

  • Members
  • 14 posts

Posted 13 January 2005 - 08:45 AM

I see that you guys edited the previous texts.... is it possible for you to paste the text again but complete without any errors or faults???

I really don't know what to paste now....

#12 evil_ted

evil_ted

    X-S Member

  • Members
  • Pip
  • 71 posts

Posted 13 January 2005 - 09:23 AM

Sorry about that, will start a new thread with exact instructions.....

after inserting all this code I found that the Xbox would reboot while playing a dvd. heres the fix

change
CODE

behavior
  {
      sleep 15;
UpdateListClockHands();
}

to
CODE

behavior
{
      sleep 15;
      if(thmainmenu.visable){UpdateListClockHands();}
}


#13 Mad3 Max3

Mad3 Max3

    X-S Enthusiast

  • Members
  • 14 posts
  • Location:Sweden
  • Interests:Bodybuilding,Karate,Aikido,Xbox,Gaming
  • Xbox Version:v1.6

Posted 09 February 2005 - 04:35 PM

One small fix. I've noticed that the screensaver neverstarts the only thing that happens is that the menutabs dissapear. And won't comeback until I restart the dash. here's a fix for that..


CODE

behavior
  {
      sleep 5; // I like it updating more often
      UpdateListClock(); // Im using it to update my clock in my listbar
  }


to
CODE

behavior
{
      sleep 5;
      if(bInScreenSaverView==false) UpdateListClock();
}

View Post

[/quote]


#14 Mad3 Max3

Mad3 Max3

    X-S Enthusiast

  • Members
  • 14 posts
  • Location:Sweden
  • Interests:Bodybuilding,Karate,Aikido,Xbox,Gaming
  • Xbox Version:v1.6

Posted 09 February 2005 - 05:10 PM

Missed one thing

CODE

function OnActivate()
  {
        UpdateListClock();  <- Remove this line

        CurrentViewpoint = theHardDriveMenuViewpoint;
        CurrentAltViewpoint = AlternateHardDriveMenuViewpoint;
        EnableAudio();
}



[quote=Mad3 Max3,Feb 9 2005, 04:41 PM]
One small fix. I've noticed that the screensaver neverstarts the only thing that happens is that the menutabs dissapear. And won't comeback until I restart the dash. here's a fix for that..
CODE

behavior
  {
      sleep 5; // I like it updating more often
      UpdateListClock(); // Im using it to update my clock in my listbar
  }


to
CODE

behavior
{
      sleep 5;
      if(bInScreenSaverView==false) UpdateListClock();
}

View Post

[/quote]

View Post

[/quote]


#15 wolf202

wolf202

    X-S Genius

  • Members
  • PipPipPipPip
  • 862 posts
  • Location:Manitoba, Canada
  • Xbox Version:v1.4

Posted 20 February 2005 - 10:25 PM

anyone mind posting the code for the clock with all the fixes in it i'm confused blink.gif

-Wolf




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users