Jump to content


Photo

Action Menus, Install Discs, And More...


  • Please log in to reply
111 replies to this topic

#31 DBZRacer

DBZRacer

    X-S Expert

  • Members
  • PipPipPip
  • 620 posts
  • Xbox Version:v1.1

Posted 18 September 2003 - 04:50 PM

OK I read the actionscriptreadme some more and found this:

QUOTE

    SETFUNC <VarName> <Function> <Function Arguments>
    -Functions:
    - XBETITLE <FileName>
    - XBEID <FileName>
    - FILESIZE <FileOrPath>
    - FILEEXIST <FileOrPath>




I'm a little confused about this action comands' functions. Can you please elaborate on it's uses or maybe some kind of sample script showing us of its capabilities?

I may be totally off, but the way I see it is something like this:

CODE

SETFUNC DVDGameCheck FILEEXIST D:\DEFAULT.XBE
SETFUNC DVDTitle XBETITLE D:\DEFAULT.XBE


Then I can use the Functions in something like this to do my GameCheck:

CODE

<Action>
SETFUNC DVDGameCheck FILEEXIST D:\DEFAULT.XBE
SETFUNC DVDTitle XBETITLE D:\DEFAULT.XBE
BeginDraw UseCurrent
MessageBox "Press A to Launch %DVDTitle% or B to Cancel"
EndDraw
Input
If %_GP_A% == "1" GOTO APRESSED
If %_GP_B% == "1" GOTO BPRESSED
QUIT
:APRESSED
If DVDGameCheck == "1" GOTO LaunchOK
If DVDGameCheck <> "1" GOTO InsertDisk
QUIT
:BPRESSED
MessageBox "Disk Launch Cancelled"
QUIT
:LaunchOK
LaunchDVD
QUIT
:InsertDisk
TrayOpen
MessageBox "Please Insert Disk"
</Action>


And if I really wanted a specific game to be launched, I can use the XBEID check?

#32 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 18 September 2003 - 05:25 PM

Yes. wink.gif



I'm adding more... and keep in mind, all of the text strings available to skinners is available to ActionScripters - for example, using $traystate$ returns the TrayState string, and $dvdtype$ will return what's loaded in the drive. The "Gadget Strings" are pretty powerful, and I can always add more to them as well. Look over the list in the skinners guide and see what you think of that. biggrin.gif

I'm expecting you guys to push the envolope and show me some ways you can use what's there, as well as letting me know what enhancements (not vastly huge changes, just small ones) that can be added to support more complex interactions.

I'll be adding box, line, triangle drawing routines, image drawing, and placeable, attributable text to the BeginDraw/EndDraw functionality as well. It will be simple.... but scripters should be able to get a lot of mileage out of it.

#33 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 18 September 2003 - 06:10 PM

Awesome info BenJeremy.

Any chance we'll be seeing this today? wink.gif

#34 DBZRacer

DBZRacer

    X-S Expert

  • Members
  • PipPipPip
  • 620 posts
  • Xbox Version:v1.1

Posted 18 September 2003 - 06:14 PM

Whoah! That was perfect! Now I have all the variables I need to finish up my first action script! I kinda feel like a kid in a candy store! This is trully awesome work BJ! beerchug.gif

After playing around with the scripts for only a couple hours, I am starting to see the endless possibilities in the install disk as well as safegaurds you can use with the IF variable now!

One more question: Is there a way to "CALL" an actionscript multiple times yet? IE the same actionscript for multiple entries in my DVDGame list example above?

#35 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 18 September 2003 - 06:18 PM

QUOTE (flattspott @ Sep 18 2003, 03:10 PM)
Awesome info BenJeremy.

Any chance we'll be seeing this today? wink.gif

Well, I will be updating the "WIP" tonight with a few more goodies... I just added "CALLFILE <File> <args... >" which should (untested, as I am at work) allow you to run ActionScripts within ActionScripts - it restores the local environment on return, and passes arguments as well.

The drawing stuff should be there as well.

I'd like to add the AutoExec one ("WIP" testers will see a popup when they run MXM, unless they define an AutoExec)

The more I look at it, ActionScript and BASIC will replace some of the internal things I'm doing right now.

#36 DBZRacer

DBZRacer

    X-S Expert

  • Members
  • PipPipPip
  • 620 posts
  • Xbox Version:v1.1

Posted 18 September 2003 - 06:20 PM

OK disregard my last post. You just answered my question with the next WIP! I can see a whole dbase of user created actionscripts in the future for us MXM users.

Edited by DBZRacer, 18 September 2003 - 06:25 PM.


#37 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 18 September 2003 - 06:32 PM

QUOTE
Well, I will be updating the "WIP" tonight with a few more goodies

So does this mean that us common folk won't be able to try this out for a while then?
Just you WIP Beta testers?

#38 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 18 September 2003 - 06:48 PM

QUOTE (flattspott @ Sep 18 2003, 03:32 PM)
QUOTE
Well, I will be updating the "WIP" tonight with a few more goodies

So does this mean that us common folk won't be able to try this out for a while then?
Just you WIP Beta testers?

Just those with "WIP" Beta access.

I have to control the distribution until it's ready for a public release, which will be soon.

#39 DBZRacer

DBZRacer

    X-S Expert

  • Members
  • PipPipPip
  • 620 posts
  • Xbox Version:v1.1

Posted 18 September 2003 - 08:06 PM

OK I got a couple more questions. Sorry to ask them now as I'm impatient and trying to play with the scripts at work before I get home to the xbox:

1. Does the GOTO command have the ability to goto <labels> in the code that were stated BEFORE the actual goto command. IE:

CODE

:label1
  commands here
  quit

:label2
 commands here
 GOTO label1
 quit


2. A second scenario would be here where I want it to restart the section of script if my condition is not meant


CODE

:label1
  commands here
  quit

:label2
 commands here
 IF ___ <> ___ GOTO label2
 quit



#40 DBZRacer

DBZRacer

    X-S Expert

  • Members
  • PipPipPip
  • 620 posts
  • Xbox Version:v1.1

Posted 18 September 2003 - 08:13 PM

Here's the scenario placed in the DVDGameLaunch script:

CODE


<Action>
 SETFUNC DVDTitle XBETITLE D:\default.xbe

 BeginDraw UseCurrent
   MessageBox "Checking Disk Status..."
 EndDraw

 GOTO DiskCheck

 :DiskCheck
   TrayClose
   IF %TrayState% <> "CLOSED" GOTO DiskCheck
   IF %DVDType% <> "GAME" GOTO InsertDisk
   IF %DVDType% == "GAME" GOTO LaunchDisk
   QUIT

 :InsertDisk
   BeginDraw UseCurrent
     MessageBox "Please Insert Game Disk$eol$Press A To Continue$eol$B To Cancel"
   EndDraw
   TrayOpen
   Input
     If %_GP_A% == "1" GOTO DiskCheck
     If %_GP_B% == "1" GOTO LaunchCancel
   Quit

 :LaunchCancel
   MessageBox "Disk Launch Cancelled"
   QUIT

 :LaunchDisk
   MessageBox "%DVDTitle% Now Launching"
   LaunchDVD
   QUIT
</Action>

Edited by DBZRacer, 18 September 2003 - 08:30 PM.


#41 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 18 September 2003 - 09:01 PM

QUOTE (DBZRacer @ Sep 18 2003, 05:06 PM)
OK I got a couple more questions. Sorry to ask them now as I'm impatient and trying to play with the scripts at work before I get home to the xbox:

1. Does the GOTO command have the ability to goto <labels> in the code that were stated BEFORE the actual goto command. IE:

CODE

:label1
  commands here
  quit

:label2
 commands here
 GOTO label1
 quit


2. A second scenario would be here where I want it to restart the section of script if my condition is not meant


CODE

:label1
  commands here
  quit

:label2
 commands here
 IF ___ <> ___ GOTO label2
 quit

Yes, ActionScripts are two pass - the first pass gets all of the labels and keeps track of them, then it executes the instructions.


Looping back is fine. Just don't get it stuck in an infinite loop wink.gif

#42 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 18 September 2003 - 09:07 PM

QUOTE (DBZRacer @ Sep 18 2003, 05:13 PM)
Here's the scenario placed in the DVDGameLaunch script:

CODE


<Action>
 SETFUNC DVDTitle XBETITLE D:default.xbe

 BeginDraw UseCurrent
   MessageBox "Checking Disk Status..."
 EndDraw

 GOTO DiskCheck

 :DiskCheck
   TrayClose
   IF %TrayState% <> "CLOSED" GOTO DiskCheck
   IF %DVDType% <> "GAME" GOTO InsertDisk
   IF %DVDType% == "GAME" GOTO LaunchDisk
   QUIT

 :InsertDisk
   BeginDraw UseCurrent
     MessageBox "Please Insert Game Disk$eol$Press A To Continue$eol$B To Cancel"
   EndDraw
   TrayOpen
   Input
     If %_GP_A% == "1" GOTO DiskCheck
     If %_GP_B% == "1" GOTO LaunchCancel
   Quit

 :LaunchCancel
   MessageBox "Disk Launch Cancelled"
   QUIT

 :LaunchDisk
   MessageBox "%DVDTitle% Now Launching"
   LaunchDVD
   QUIT
</Action>

Well, give it a shot.... You can always liberally sprinkle in bd/messageboxes/ed/input to check things along the way.

I may make an internal script to combine the messagebox stuff... just got home.

#43 DBZRacer

DBZRacer

    X-S Expert

  • Members
  • PipPipPip
  • 620 posts
  • Xbox Version:v1.1

Posted 18 September 2003 - 09:09 PM

Whoo hoo! First action script looks to be done then. I'll test it out when I get home tonight... beerchug.gif

#44 macel

macel

    X-S Enthusiast

  • Members
  • 19 posts

Posted 18 September 2003 - 09:26 PM

QUOTE (BenJeremy @ Sep 8 2003, 03:47 AM)
Yes, 0.9n.5 will be out soon.

That was... 11 days ago.

Has anyone ever stopped to wonder how much certain groups interpretations of time differ?

I mean, when I say to my buddies that I'll meet them at the local pub soon, it means that I'll be there in the next, say, 30 minutes.

Now, when my lovely wife is getting ready for a dinner (or something else that requires special attention to ones appearance) and says that she'll be ready soon, I can relax, flip the box on and finish the season in nhl 2k4.

Then there are our beloved programmers whose interpretation of the word soon is even more cryptical. 'A new version will be out soon' is probably one of the most feared sentences coming out from the mouth of a codemonkey, it can mean that he's currently uploading the program to the server or it can mean that the development has been terminated and the monkey is getting wasted as we speak.

The last group are the game developers. Sadly they have abandoned the word soon almost completely. The industry standard seems to be 'when it's done' which lacks the charm and warmth of our loved 'soon'.

And now I have to hurry to pick my aforementioned companion from the station as she is expecting me to pick her up, yes, soon. And if I fail to do so, during the next, roughly, 5 minutes I will most likely become yet another victim of brutal domestical violence.

Edit: Tried to fix grammar and added some text that got lost
Edit2: Failed

Edited by macel, 18 September 2003 - 10:14 PM.


#45 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 18 September 2003 - 09:33 PM

QUOTE (macel @ Sep 18 2003, 06:26 PM)
QUOTE (BenJeremy @ Sep 8 2003, 03:47 AM)
Yes, 0.9n.5 will be out soon.

That was... 11 days ago.

Has anyone ever noticed how much certain groups interpretations of time differ?

I mean, when I say to my buddies that I'll meet them at the local pub soon, it means that I'll be there in the next, say, 30 minutes.

Now, when my lovely wife is getting ready for a dinner (or something else that requires special attention to ones appearance) and says that she'll be ready soon, I can relax, flip the box on and finish the season in nhl 2k4.

Then there are our beloved programmers whose interpretation of the word soon is even more cryptical. 'A new version will be out soon' is probably one of the most feared sentences when it comes from the mouth of a codemonkey, it can mean that he's currently uploading the program to the server or it can mean that the development has been terminated and the monkey is getting wasted as we speak.

LOL.... yeah, well, there were some things I needed to include, but couldn't get the time to include them.

Really, I'm nearing the end of the "to do" for this upcoming release.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users