Seeking Advice on Minigame Interface

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.

Re: Seeking Advice on Minigame Interface

Postby D'Lanor » Fri Jul 10, 2009 2:46 pm

I did not get around to this until recently but it works like a charm.
However, the libPlasma editing is not for the faint of heart. You need to create the GUI button from scratch (or rather copy and modify it from one of Cyan's GUIs). I also made a feeble attempt to implement pfGUIButtonMod into PyPRP but unfortunately I failed miserably. :oops:

The good news is that you do not need the GUI button. :P It is only used to exit the GUI, but you can do that by hitting escape instead. So I would say this is usable as it is.

One more thing: you also need a clickable to activate the GUI. This clickable must be a different object than the GUI, although it can be a duplicate of it. Then you hide the GUI plane itself somewhere underground or behind a wall. The clickable requires the following AlcScript:

Code: Select all
<clickable object>:
    logic:
        modifiers:
          - tag: ModDialog
            cursor: poised
            flags:
              - localelement
            activators:
              - type: objectinvolume
                remote: <click region>
                triggers:
                  - any
            conditions:
              - type: activator
                activators:
                  - type: picking
              - type: objectinbox
                satisfied: true
            actions:
              - type: pythonfile
                ref: $PythDialog
        actions:
          - type: pythonfile
            tag: PythDialog
            pythonfile:
                file: xDialogToggle
                parameters:
                  - type: activator
                    ref: logicmod:$ModDialog
                  - type: skip
                  - type: skip
                  - type: string
                    value: Plane1

...assuming that your GUI dialog is called Plane1 as in GPNMilano's example. The Python file we are using is a global one. So no need to worry about creating it.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Seeking Advice on Minigame Interface

Postby GPNMilano » Sun Jul 12, 2009 4:27 am

D'Lanor wrote:I did not get around to this until recently but it works like a charm.
However, the libPlasma editing is not for the faint of heart. You need to create the GUI button from scratch (or rather copy and modify it from one of Cyan's GUIs). I also made a feeble attempt to implement pfGUIButtonMod into PyPRP but unfortunately I failed miserably. :oops:



Don't feel bad D'Lanor, I was able to partially implement pfGUIButtonMod, as well as most of the other GUI classes. Unfortunately i've run into more then a few snafus with them I can give them some of the pfGUIControlMod's attributes, but not referenced layers or textmaps, it's quite annoying. But I can give them their own ID numbers. Back to the drawing board i suppose.
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Re: Seeking Advice on Minigame Interface

Postby diafero » Sun Jul 12, 2009 6:21 am

Great to see you are alive, GPNMilano :)

Already having GUIs at all is a big progress, even if you have to hit "Esc" to leave them. That should just be documented.
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Seeking Advice on Minigame Interface

Postby Chacal » Sun Jul 12, 2009 12:46 pm

She's alive!
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2508
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

Previous

Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests

cron