Possable?

The best and quickest support by a group of top-notch editing specialists, guaranteed!

Moderator: Forum Guards

Possable?

Postby atrey65789 » Wed Jun 13, 12 7:05 pm

Is it possable to create a trigger to initiate a UI to come up?


But here's the catch, with this trigger, you can create the UI
in the default properties. ( Length, width, title, text, color, etc.)
-A
atrey65789
Regular
 
Posts: 400
Joined: Thu Dec 22, 11 3:02 pm

Postby Alex » Wed Jun 13, 12 7:16 pm

Yeah, it is. If you're knowledgeable enough.
Alex
Alpha
 
Posts: 8060
Joined: Wed Nov 12, 03 4:51 pm

Postby atrey65789 » Wed Jun 13, 12 7:35 pm

I'm tryna' see waht I can do with it... It'll take some time..
-A
atrey65789
Regular
 
Posts: 400
Joined: Thu Dec 22, 11 3:02 pm

Postby SimonDenton » Tue Jul 10, 12 12:32 pm

Credit it to Andrievskaya Veronika:

[spoiler]
Code: Select all
//============================================================================
// AV_ShowMessageTrigger 1.0. Created by Andrievskaya Veronika.
//
// Îòîáðàæàåò ìîäàëüíîå îêíî, ñ òåêñòîâûì ñîîáùåíèåì.
//============================================================================

/*--------------------------------------------------------------------------
ÈÍÑÒÐÓÊÖÈß:

Ïîëîæèòå òðèããåð íà êàðòó. Çàäàéòå ñâîéñòâà:

MessageText çàäàåò òåêñò ñîîáùåíèÿ
MessageTitle çàäàåò çàãîëîâîê îêíà ñ ñîîáùåíèåì.
Åñëè õîòèòå ÷òîáû òåêñò ñîîáùåíèÿ âûðàâíèâàëñÿ ïî öåíòðó, òî
ïîñòàâüòå bAlignTextToCenter íà TRUE

×òîáû íàïèñàòü ñîîáùåíèÿ ïî ðóññêè, ñîçäàéòå INT ôàéë êàðòû, è ïèøèòå ïî ðóññêè
â ýòîì INT ôàéëå. INT ôàéë äëÿ êàðòû ñîçäàåòüñÿ êîìàíäîé DumpInt ÈÌß_ÊÀÐÒÛ.
Êîìàíäû íàäî ââîäèòü â LOG îêíî ðåäàêòîðà.

Íà äàííûé ìîìåíò ðåàëèçîâàíà òîëüêî ôóíêöèÿ Touch.
----------------------------------------------------------------------------*/

Class AV_ShowMessageTrigger ExPaNdS trigger;

// Îòîáðàæàåìûå ïåðåìåííûå
// ----------------------------
var() localized String MessageText;
var() localized String MessageTitle;
var() bool bAlignTextToCenter;
// var() font MessageTextFont; // ëåíü ;)



// ------------------------------------------------
//   Îòîáðàçèòü îêíî ïðè ïðèêîñíîâåíèè ê òðèããåðó
// ------------------------------------------------
singular function Touch(Actor Other)
{
   local DeusExRootWindow root;
   local DeusExPlayer Player;
   local DeusExPlayer APlayer;
   local AV_MessageWindow MsgWin;
/*---------------------*/
   Aplayer = DeusExPlayer(Other);
   if (Aplayer == None)
      return;
/*---------------------*/
   Player = DeusExPlayer(GetPlayerPawn());
   root = DeusExRootWindow(Player.rootWindow);

      if (root != None)
      {
         MsgWin = AV_MessageWindow(root.InvokeMenuScreen(Class'AV_MessageWindow'));
         MsgWin.SetTitle(MessageTitle);
         MsgWin.WinText.SetText(MessageText);
   
            if (bAlignTextToCenter)
            {
               MsgWin.WinText.SetTextAlignments(HALIGN_Center, VALIGN_Center);
            }
            else
            {
               MsgWin.WinText.SetTextAlignments(HALIGN_Left, VALIGN_Top);
            }
      }

   Super.Touch(Other);
}


defaultproperties
{
      CollisionRadius=90
      MessageText="default text"
      MessageTitle="default title"
      bCollideActors=true
      bTriggerOnceOnly=true
      bAlignTextToCenter=FALSE
//      TriggerType=TT_ClassProximity
//      ClassProximityType=Class'DeusEx.Human'
//      MessageTextFont=
}

[/spoiler]
SimonDenton
Wannabe
 
Posts: 117
Joined: Sun Oct 03, 10 12:06 pm

Postby atrey65789 » Tue Jul 10, 12 4:11 pm

Thanks Simon
-A
atrey65789
Regular
 
Posts: 400
Joined: Thu Dec 22, 11 3:02 pm

Postby SimonDenton » Wed Jul 11, 12 12:19 am

No problem :) I am trying to do things with GUI as well. I am currently working on a quiz window which displays the quiz time limit, question (with arrows to change), question text and diagram and question answers depending on what type of question it is; multiple choice, checklist or "password answer" :D
SimonDenton
Wannabe
 
Posts: 117
Joined: Sun Oct 03, 10 12:06 pm


Return to Editing issues

Who is online

Users browsing this forum: No registered users and 1 guest
cron