Page 1 of 1

Menu-Commands via Script

Posted: Sun Sep 10, 2006 9:08 am
by Markman
Hi,

is it possible to trigger Menu-commands from a controller script ?

For example: "Quit Game", "Load Level", "Select Player Actor", "Set Main Volume", "Write Settings", "Read Settings", and so on ?

I want to build a 3d Menu, the standard Menu is VERY hard to design and also very unflexible in beeing forced to use only one Screen-Resolution.

Maybe there are Functions already used by the standard-Menu, that are reachable from script too ?

Greetings!

Posted: Sun Sep 10, 2006 10:17 am
by psYco
Im not sure but that could be cool! then when you start the game you will just get a black screen or what ever with one big start button or something that when you click takes you to the first level of the game witch will actually be the menu!!!! sounds cool! But might be lots of work...

Posted: Mon Sep 11, 2006 12:36 pm
by jonas
I don't think thats possibly with rf's menu system. But if your willing to try something different, it is possible to design a level and use it as the menu. You could add the buttons as staticmeshes(correct me if i'm wrong) then set up a script so that when that buttons pushed it will move the camera over to the submenu. Just an Idea probably harder then the current rf menu system.

Posted: Wed Sep 13, 2006 6:01 am
by Markman
@ psYco
I think it would be MUCH easier, because you could design the Menu with RF-Edit.

@ jonas
Thats exactly what I am trying to do. The problem is, that I can, on the one hand, design the buttons as 3d Objects - but, on the other hand, dont get access to the usual Menu-Commands via script. As I said, the design-work would be much easier than fiddling with abstract coordinates in the current Menu-System.

It would be possible not only to make the Buttons 3d objects, you could, for example, show the Actor that you select as rotating 3d object and have lots of new possebilities with scripting everything.
But it should be (handled as) the Main-Menu that is called when you press ESC, not just another Level (even though in fact it is built as a Level).

Posted: Wed Sep 13, 2006 7:18 am
by federico
In my RealityInvaders game there was a Scripted Menu
http://realitychess.altervista.org/download.htm

Anyway that was only an initial try. Now we have much more commands to get the result.
- Mouse commandsto get mouse screen coordinates
- Screen commands to have the screen resolution so you can have a cross-resolution menu.
- 2d actor commands: you can get the screen coordinates of an actor.
- Save and load attributes via script.

i don't know if all the commands are in the current stable release or in the RFwithPhysics release but I can easily post the code here for a new 075 build .

Posted: Wed Sep 13, 2006 9:33 am
by Juutis
- Save and load attributes via script.
That can be done??!?
The manual has no info about loading attributes. Only saving them.