Menu-Commands via Script

Topics regarding Scripting with Reality Factory
Post Reply
User avatar
Markman
Posts: 21
Joined: Sat Jan 14, 2006 2:28 pm

Menu-Commands via Script

Post 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!
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post 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...
User avatar
jonas
Posts: 779
Joined: Tue Jul 05, 2005 5:43 pm
Location: Texas, USA
Contact:

Post 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.
Jonas

Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
User avatar
Markman
Posts: 21
Joined: Sat Jan 14, 2006 2:28 pm

Post 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).
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Post 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 .
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

- Save and load attributes via script.
That can be done??!?
The manual has no info about loading attributes. Only saving them.
Pain is only psychological.
Post Reply