Making a phone GUI

Started by MrCheminee, Fri 08/01/2010 10:01:08

Previous topic - Next topic

MrCheminee

Hi you guys!

I've been trying to make a cellphoneGUI pop up whenever the player selects his phone in his inventory. So far I have run into a few problems I can't find an answer for.
Within the GUI, I want to let the pressed button light up, this is no problem, but I also want to show the chosen button on the display of the phone. If this was a room I would just plant a bunch of invisible objects in it and turn the right one visible, but I just can't find how to put objects in my GUI.
Second question is: How do I make it possible to have a Dialog with the phone? Should I import an invisible character, named phone? But then how do I put this character inside the GUI?

I realise that it might be easier for me to just make a 'phoneroom', but I rather keep the room the player is in on the background while using the phone...

RickJ

As you correctly surmise it's not possible to have objects or characters on/in a GUI.   

1.  Use buttons instead of objects.  You can play with the Button.NormalGraphic and
Button.Visible properties to get the effect your desire.

2.  Ypu can incorporate the dialog into your phone GUI.  Have a look at "Dialog options, custom rendering" in the manual.


Khris

You can also redraw the look of pretty much anything on the fly.
I'd create a single button representing the display, then redraw its NormalGraphic depending on what the display's supposed to be showing.

MrCheminee

Allright, I thank both of you, I'll check those options out!

MrCheminee

When I'm using the phone and I use a command that pauses, like Wait(20); (to let the button image show up for a short moment) suddenly all my buttons get a shade while it is waiting. I suppose it just something that's right in front of me, but I can't find where this comes from. Any ideas?

ThreeOhFour

Go to the 'visual' section (second from bottom) in the 'general settings' pane and change the setting for "When interface is disabled, guis should" to 'Display normally'.

MrCheminee

Great, that did it! Thanks a lot!

MrCheminee

#7
I solved the imageproblem by making 5 buttons for the phone display. The phonenumbers contain 4 figures, so for each position on the display I made 1 button and  I made one bigger button that arranged the whole background of the display, for showing the provider and displaying messages like: Connecting and Wrong number.
So thanks for the solution!
Tomorrow I'll start working out the dialog.

MrCheminee

#8
I chose to let the GUI call an invisible persoon to the room as the speaker on the phone, while putting my charcters speechview to one with him holding the phone, unfortunately whenever I call the dialog, the GUI script finishes first, putting the character back in his normal speechview, and clearing the phone display, is there any way to prevent this from happening?

MrCheminee

#9
As I was typing this I thought of the following solution: I'll let the GUI-script wait untill a variable turns to 1 (which I'd put on the end of the dialog script). But then the whole game pauses...

An other options could be translating all the dialog text to 'Say' commands and put those in the GUI, but I hope there is an easier solution around...

(A screenshot of the phone is put in the Fribbledib-topic, in the games in production section...)

MrCheminee

Nevermind, I found a solution by putting the commands to go back to the normal speechview and emty the phonedisplay on the end of the dialog script instead of keeping it in the GUI script.

SMF spam blocked by CleanTalk