xboxscene.org forums

Pages: 1 [2] 3

Author Topic: Clock In The Orb  (Read 283 times)

aweelz

  • Archived User
  • Full Member
  • *
  • Posts: 129
Clock In The Orb
« Reply #15 on: June 18, 2004, 10:00:00 PM »

CODE
function UpdateClockHands()
{
var b = theSettingsMenu.children[0].children[0];
var c = theMainMenu.children[0].children[0];
var d = new Date;

nClockHour = d.getHours();
nClockMinute = d.getMinutes();

b.ClockHourHand.SetRotation(0, 0, -1, (nClockHour + nClockMinute / 60) * 6.283 / 12);
b.ClockMinuteHand.SetRotation(0, 0, -1, (nClockMinute - 15) * 6.283 / 60);
c.ClockHourHand.SetRotation(0, 0, -1, (nClockHour + nClockMinute / 60) * 6.283 / 12);
c.ClockMinuteHand.SetRotation(0, 0, -1, (nClockMinute - 15) * 6.283 / 60);
}

Aweelz
Logged

xxwillisxx

  • Archived User
  • Sr. Member
  • *
  • Posts: 364
Clock In The Orb
« Reply #16 on: June 18, 2004, 10:22:00 PM »

CODE
function UpdateClockHands()
{
var c = theMainMenu.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);


at the end so it looks like this
CODE

DisableGameBoardAlternateViewpoint();
}
function UpdateClockHands()
{
var c = theMainMenu.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);
}
//////////////////////End Game Board View///////////////////////////



then add  UpdateClockHands(); to function UpdateMainMenu() like this
CODE
function UpdateMainMenu()
{
  if( g_bXOnDashExists )
  {
      //Update4ButtonMainMenu();
      Update5ButtonMainMenu();
      UpdateClockHands();
  }  
  else
  {
      //Update3ButtonMainMenu();
      Update4ButtonMainMenu();
  }
}


then add var nClockHour; and var nClockMinute;
search for All new var's below here... and add them at the end like this
CODE
// All new var's below here...

var LeftTrigger;
var RightTrigger;
var RightThumb;
var LeftThumb;
var ControlPanelOut;
var CurrentViewpoint;
var CurrentAltViewpoint;
var BGMon;
var theInLine;
var currentControlType;
var previousControlType;
var TotalSections;
var SectionName;
var SectionPath;
var SubMenuItem1;
var SubMenuItem2;
var SubMenuItem3;
var SubMenuItem4;
var SubMenuItem5;
var thcorb;
var bMusicPlayerReady;
var currentMusicPlayerMode;
var BGMTracks;
var BGMst;
var BGMtr;
var vCurAlbum;
var vCurSong;
var bPlayingCd;
var quicklaunch;
var gamelaunch;
var launchPath;
var launchXbe;
var bInGameBoardView;
var CurrentGameBoardAltViewpoint;
var nClockHour;
var nClockMinute;

Logged

-WebSurfer-

  • Archived User
  • Jr. Member
  • *
  • Posts: 63
Clock In The Orb
« Reply #17 on: June 19, 2004, 03:31:00 AM »

beerchug.gif
Logged

xxwillisxx

  • Archived User
  • Sr. Member
  • *
  • Posts: 364
Clock In The Orb
« Reply #18 on: June 19, 2004, 11:02:00 AM »

CODE
DEF Clock_clock_body01 Transform
    {
     children
     [
      Shape
      {
       appearance Appearance
       {
        material MaxMaterial
        {
         name "Metal_Chrome"
         }
          texture ImageTexture
         {
             url "your image here.tga"
          }
        }
geometry DEF Clock_clock_body01-FACES Mesh { url "Clock_clock_body01-FACES.xm" }


then add your image.xbx files to mainmenu5.xap
Logged

-WebSurfer-

  • Archived User
  • Jr. Member
  • *
  • Posts: 63
Clock In The Orb
« Reply #19 on: June 19, 2004, 11:21:00 AM »

CODE
function OnActivate()
   {
     CurrentViewpoint = theMainMenuViewpoint;
     CurrentAltViewpoint = theMainMenuAlternateViewpoint;
   CurrentGameBoardAltViewpoint = theGameBoardAlternateViewpoint;
   }

   function OnArrival()
   {
     //theSkinBackground.isBound = true;
   }
}

////////////////////////////////////////////////////////////////////////////



this one ? is the next function OnActivate() under DEF TheMainMenu Level...   uhh.gif
Logged

-WebSurfer-

  • Archived User
  • Jr. Member
  • *
  • Posts: 63
Clock In The Orb
« Reply #20 on: June 19, 2004, 12:22:00 PM »

biggrin.gif

it works  biggrin.gif

but in front of  "theSkinBackground.isBound = true;" should be "//" otherwise the backgrounds not works...

CODE
//theSkinBackground.isBound = true;


you are the best @ vintster  beerchug.gif
Logged

-WebSurfer-

  • Archived User
  • Jr. Member
  • *
  • Posts: 63
Clock In The Orb
« Reply #21 on: June 19, 2004, 12:45:00 PM »

jester.gif  jester.gif  jester.gif

here is the completely code for the clock mod... do it yourself  tongue.gif
Logged

xxwillisxx

  • Archived User
  • Sr. Member
  • *
  • Posts: 364
Clock In The Orb
« Reply #22 on: June 19, 2004, 12:51:00 PM »

laugh.gif
Logged

-WebSurfer-

  • Archived User
  • Jr. Member
  • *
  • Posts: 63
Clock In The Orb
« Reply #23 on: June 19, 2004, 01:09:00 PM »

muhaha.gif
Logged

Hanuta

  • Archived User
  • Newbie
  • *
  • Posts: 3
Clock In The Orb
« Reply #24 on: June 19, 2004, 02:11:00 PM »

wink.gif

Logged

Hanuta

  • Archived User
  • Newbie
  • *
  • Posts: 3
Clock In The Orb
« Reply #25 on: June 19, 2004, 03:09:00 PM »

sad.gif

the wallpapers in the background aren't there, there is only the green lattice

what do i do wrong ? is the clock mod the causer ?


The Skins i used are :  Satingreen, Halo Limited Edition, Death Star


I hope someone can help me wink.gif
Logged

Master3xBOx

  • Archived User
  • Jr. Member
  • *
  • Posts: 55
Clock In The Orb
« Reply #26 on: June 19, 2004, 03:33:00 PM »

QUOTE

thx 

it works 

but in front of "theSkinBackground.isBound = true;" should be "//" otherwise the backgrounds not works...


//theSkinBackground.isBound = true;


So function OnActivate should actually look like this

CODE

function OnActivate()
  {
    CurrentViewpoint = theMainMenuViewpoint;
    CurrentAltViewpoint = theMainMenuAlternateViewpoint;
  CurrentGameBoardAltViewpoint = theGameBoardAlternateViewpoint;
  }

  function OnArrival()
  {
    //theSkinBackground.isBound = true;
  }
 behavior
 {
     sleep 15;
     if (theMainMenu.visible)
     {
        UpdateClockHands();
     }
 }
}


Hope that helps.  wink.gif
Logged

-WebSurfer-

  • Archived User
  • Jr. Member
  • *
  • Posts: 63
Clock In The Orb
« Reply #27 on: June 19, 2004, 03:35:00 PM »

wink.gif
Logged

aweelz

  • Archived User
  • Full Member
  • *
  • Posts: 129
Clock In The Orb
« Reply #28 on: June 19, 2004, 07:10:00 PM »

Great work Vinster, i always thought that there were no timer/sleep commands in thc, i guess i was wrong though.

Aweelz
Logged

vintster

  • Archived User
  • Full Member
  • *
  • Posts: 106
Clock In The Orb
« Reply #29 on: June 19, 2004, 08:09:00 PM »

huh.gif

Also theres the possibility of have the dash auto-shutdown at shorter or longer times than the standard 6 hour auto-shutdown feature.  

Any other ideas on what we can use this timer feature for?
Logged
Pages: 1 [2] 3