Home   Help Search Login Register  

Author Topic: Dialog on black screen  (Read 1777 times)

0 Members and 1 Guest are viewing this topic.

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Dialog on black screen
« on: 29 Mar 2010, 18:31:30 »
Ello guys

Does any1 know how to get a dialog to appear on a black out? I've tried doing:

Code: [Select]
titlecut ["","BLACK IN",99999]
 but my dialog won't appear. Heres an extract from my description where my dialog is defined:

Code: [Select]
class DIFFICULTY
{
  idd = -1;
  movingEnable = true;
  controlsBackground[] = {DLG_BACK1};
  objects[] = { };
  controls[] = {FRAME1, TEXT2, BUTTON3, BUTTON3_4, BUTTON3_5};

  class DLG_BACK1: RscText
  {
     colorBackground[] = {0.4, 0.4, 0.4, 0.75};
     text = ;
     x = 0.15875;
     y = 0.20907;
     w = 0.66375;
     h = 0.42406;
  };
 class FRAME1 : RscText
 {
  x = 0.15875
  y = 0.20907
  idc = -1
  w = 0.66375
  h = 0.42406
  style = ST_FRAME
  colorText[] = {0, 0, 0, 1};
  colorBackground[] = {0.4, 0.4, 0.4, 0.75};
  SizeEX = 0.025
 text = ""
  };
 class TEXT2 : RscText
 {
  x = 0.28875
  y = 0.26036
  idc = -1
  w = 0.40125
  h = 0.09901
  style = ST_LEFT
  colorText[] = {1, 1, 1, 1};
  colorBackground[] = {0, 0, 0, 0};
 font = "TahomaB36"
  SizeEX = 0.7
 text = "Select Difficulty"
  };
 class BUTTON3 : RscButton
 {
  x = 0.2
  y = 0.43984
  idc = -1
  w = 0.162
  h = 0.094
  style = ST_CENTER
  colorText[] = {0, 0, 0, 1};
 font = "CourierNewB64"
  SizeEX = 0.04
 text = "Easy"
 action = "easyselected = true"
 default = false
  };
 class BUTTON3_4 : RscButton
 {
  x = 0.41375
  y = 0.43984
  idc = -1
  w = 0.162
  h = 0.094
  style = ST_CENTER
  colorText[] = {0, 0, 0, 1};
 font = "CourierNewB64"
  SizeEX = 0.04
 text = "Normal"
 action = "normalselected = true"
 default = false
  };
 class BUTTON3_5 : RscButton
 {
  x = 0.62375
  y = 0.43787
  idc = -1
  w = 0.162
  h = 0.094
  style = ST_CENTER
  colorText[] = {0, 0, 0, 1};
 font = "CourierNewB64"
  SizeEX = 0.04
 text = "Hard"
 action = "hardselected = true"
 default = false
  };
};

Any help would be appreciated  :D

Regards,

Gruntage
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline RKurtzDmitriyev

  • Former Staff
  • ****
Re: Dialog on black screen
« Reply #1 on: 29 Mar 2010, 19:28:48 »
I believe THobson's Abandoned Armies has a dialog over a black out at the very beginning. Maybe unPBO it to see how it works.
The OFP Editing Center wishes to remind you that the faithful COMREF will never threaten to stab you and, in fact, cannot speak.
However, in the event that it does speak, you are encouraged to heed its advice. ;)

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Dialog on black screen
« Reply #2 on: 29 Mar 2010, 19:38:20 »
lol ive looked at that mission but i cant get my head around it. The scripting is complicated and my dialog is different to his.

Thx anyway

Gruntage
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline RKurtzDmitriyev

  • Former Staff
  • ****
Re: Dialog on black screen
« Reply #3 on: 29 Mar 2010, 22:31:46 »
Could you maybe work-around by skiptime-ing to the middle of the night and pointing the camera at something dark like empty ground?
The OFP Editing Center wishes to remind you that the faithful COMREF will never threaten to stab you and, in fact, cannot speak.
However, in the event that it does speak, you are encouraged to heed its advice. ;)

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Dialog on black screen
« Reply #4 on: 30 Mar 2010, 08:57:04 »
Good idea ill try that later
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline Clayborne

  • Members
  • *
Re: Dialog on black screen
« Reply #5 on: 03 Apr 2010, 22:14:41 »
I've tried doing:

Code: [Select]
titlecut ["","BLACK IN",99999]
 but my dialog won't appear.

You're calling up the dialog as well though, right? Like this?

Code: [Select]
titlersc ["Difficulty", "plain", 0]
I just tested it and it works (at least the box and text appears, not an interactive dialog), though I had to add a duration, eg

class DIFFICULTY
{
  idd = -1;
  movingEnable = true;
  duration=5;
  controlsBackground[] = {DLG_BACK1};
  objects[] = { };
  controls[] = {FRAME1, TEXT2, BUTTON3, BUTTON3_4, BUTTON3_5};



Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Dialog on black screen
« Reply #6 on: 04 Apr 2010, 10:31:53 »
im able to get non-interactive dialogs to appear but not interactive. I basically want the player to select a difficulty before the mission begins, ideally on a black out screen.

Thx for ur help so far

Gruntage
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Dialog on black screen
« Reply #7 on: 04 Apr 2010, 14:49:04 »
What you need, as RKurtzDmitriyev suggested, is to make the screen dark some other way. Luckily BIS has included a black cube object which avoids the need for skipping to night-time or finding someplace with no graphical details. See attached missionette.

Looking at your description.ext code I would suggest you get into the habit of terminating each line with a semicolon ; Also, give your dialog components unique idds - this will give you a lot more flexibility in how you access them with scripts.

Good luck with the project  :good:
« Last Edit: 04 Apr 2010, 14:51:20 by bedges »

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Dialog on black screen
« Reply #8 on: 04 Apr 2010, 22:28:44 »
Thx for all ur help guys. Ive come up with a solution that seems to work ok  :whistle:

Code: [Select]
;OpeningDialogue.sqs
;Handles the immediate start of the mission as experienced by the player
;Run from init.sqs

0 fadeSound 0

EasySetting = true

if DeBug then {titlecut ["","BLACK IN",0];goto"end"}
~0.5
;The delay above is needed to prevent the dialogue opening in the Briefing
titlecut ["","BLACK IN",1]

;=============== Dialogue ========================================================
DifficultySelected = false
#CreateDialogue
if (not CreateDialog "SELECT_DIFFICULTY") then {hint"Problem opening Dialog";DifficultySelected = true}
#GetSelection


~0.01
;The next line is to help randomise the mission by selecting a random number of random numbers at the start
_r = random 1
if (ctrlVisible 30 and not DifficultySelected) then {goto"GetSelection"}
if (not DifficultySelected) then {goto"CreateDialogue"}
~0.25
Closedialog 0
DifficultySelected = nil


titlecut ["","BLACK IN",9999]

;next line determines what message appears. a loop was the only solution
#msg

if hardsetting then {hardrsc=true;goto "end"}
if normalsetting then {normalrsc=true;goto "end"}
if easysetting then {easyrsc=true;goto "end"}

goto "msg"

#end

~6
titleRsc ["Radio_Save_msg","plain",6]
~14


0 setRain RainLevel
5 fadeSound 1
if (not DeBug) then {titlecut ["","BLACK IN",5]}

~10 + random 30


exit

Thx again for ur help

Regards,

Gruntage
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba