Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

ffmpeg is what I am using.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Well I tried to get Avconv on Windows, but it crashes on start. I also tried to get ffmpeg, but it looks like their website is down. Would you have a link, by any chance?

 

EDIT : Nevermind, FFMPEG is back on track ^^ I'm downloading it asap.

Edited by Deshtat
Link to comment
Share on other sites

Oh man, that's so complicated x) I managed to get some .roq files, but I have no clue how this whole material thing works...

 

Whatever I create (models, textures, videos...) for my level, they won't show up in the editor. I think I get the structure wrong, and most articles in the wiki are not so clear to me.

 

Let's say I have a .roq file (the video) and an .mtr file (the material info). Where should I put them to make them both show up in the editor?

 

I tried to create a /materials and a /video folder in my FM folder, but I don't get anything.

Edited by Deshtat
Link to comment
Share on other sites

Alright, I think I get this. Thanks a lot!

 

So everything look okay, at least to me. I still can't get it to play in the game though.

 

I created a GUI file called "testboum.gui" :

 

windowDef Desktop
{
   rect 0 ,0 ,1024 ,768
   backcolor 0, 0, 0, 1
   matcolor 0, 0, 0, 1
   background "guis/assets/common/bg"

   windowDef VidFrame
   {
       rect 0,0,1024,768
       visible 1
       backcolor 1, 1, 1, 0
       windowDef RoqFile
       {
           rect 0,0,1024,768
           visible 1
           background "video/testboom"        // roq shader defined in the material file
           matcolor 1,1,1,1
           onTime 8000
           {
               resetCinematics;
               resetTime "Anim" "0";
               // localsound "video/myroqtest.ogg";  sound file to accompany the video
           }
       }
   }
}

As I have no sound yet, I just removed the option temporarily.

 

I also created a material file called "testboum.mtr" :

video/testboum
{
     qer_editorimage textures/editor/video

     {
          videoMap loop video/testboum.roq
          
     }
}

In the video folder, I put my RoQ file called "testboum.roq".

 

And finally, within my level, I created a trigger_once that is supposed to call the following script :

 

void thetuto_testboum() {

$player1.createOverlay( "guis/testboum.gui", 100 );

}

So, I tried this, but when I touch the trigger_once, nothing happens. It doesn't crash, and I have no error messages. I guess I messed up at some point, but I have no idea where... any ideas?

 

Sorry to bother you with all that stuff x) I am not really the coding type...

Edited by Deshtat
Link to comment
Share on other sites

Try putting the { on its own line so it looks like this

 

void thetuto_testboum()

{
$player1.createOverlay( "guis/testboum.gui", 100 );
}

Edited by Goldwell
Link to comment
Share on other sites

I have a door that when frobbed activates a trigger_once entity. I set it up via the stim/response system and it works great however if the player presses the use button with say a lock pick out (as some players do) nothing happens because its not a frob.

 

So my question is, is there a way to activate that trigger_once by detecting if the player is trying to pick lock a door as well as frob it?

 

Thanks!

Link to comment
Share on other sites

think the problem is on the trigger_once entity

to call a script

it would be

call thetuto_testboum

 

the script file should have the same name as the map file except the extension being script instead of map or proc

eg

mymap.map

mymap.script

 

plus in the script you have no way to exit the video once it plays

 

so you would need something like

 

float overlayHandle;

void float overlayHandle;

void thetuto_testboum()
{
sys.print("walk into trigger.\n");
overlayHandle = $player1.createOverlay("guis/testboum.gui", 100); //opens guis at layer 100
sys.wait(8); //length of video in seconds
sys.print("exit screen.\n");
$player1.destroyOverlay( overlayHandle ); //closes guis at layer 100
}

Link to comment
Share on other sites

The trigger_once is working alright (the called script can print a debug message).
So I tried to add your method, so my script looks like this :
void thetuto_testboum()

{
      sys.print("walk into trigger.\n");
	float overlayHandle;
      overlayHandle = $player1.createOverlay("guis/testboum.gui", 100); //opens guis at layer 100
	sys.wait(5); //length of video in seconds
      sys.print("exit screen.\n");
      $player1.destroyOverlay( overlayHandle ); //closes guis at layer 100
}

Until now, it only printed "walk into trigger", but nothing happened then.

 

Could it be that the RoQ file is wrong?

 

I'm going to try this with some random video file from other FMs x)

 

EDIT :

 

I just tried with a working RoQ file from Ulysse 2 (thanks!) , but it still doesn't play.

 

I tried to make it play for 5 secondes, and then to print a debug message. Once I touch the trigger_once, nothing shows up, but after 5 seconds, I get the debug print in the console. Thus, the script worked, but something about the GUI must be weird.

Edited by Deshtat
Link to comment
Share on other sites

Thanks for pointing this out! But sadly, nothing new happens... xD At this point, I'm kind of confused.

 

Does anyone have a working exemple of this? There are many FMs, and I don't know which ones have in-game roq files playing as cutscenes. I think I'll have to grab some scripts from former missions and to change names, or something like that x)

Link to comment
Share on other sites

edit: nevermind I figured it out

Edited by Goldwell
Link to comment
Share on other sites

Anyone have some good tips how to make good looking water in TDM?

 

I was thinking of making a dilapitated fountain that overflows, but the water textures look quite bad and... non-watery, more like a spell effect.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Arcturus made some great water, though I think it was mostly flat with ripples rather than cascading.

Link to comment
Share on other sites

  • 2 weeks later...

use a switch with a

 

state_change_callback name_of_script

 

the script starts the gui

 

float overlayHandle;

 

void name_of_script(entity mover_lever, boolean bOpen, boolean bLocked, boolean bInterrupted)

{

overlayHandle = $player1.createOverlay("guis/path to gui/file_esm.gui", 100 );

sys.wait(30); //time in seconds

gui_deactivate();

}

 

to get out of the gui its

 

void gui_deactivate()
{
$player1.destroyOverlay( overlayHandle );
}

 

scripts are back to front

 

so it would be something like

 

float overlayHandle;

 

void gui_deactivate()
{
$player1.destroyOverlay( overlayHandle );
}

 

void name_of_script(entity mover_lever, boolean bOpen, boolean bLocked, boolean bInterrupted)

{

overlayHandle = $player1.createOverlay("guis/path to gui/file_esm.gui", 100 );

sys.wait(30); //time in seconds

gui_deactivate();

}

 

 

to send information from script to gui its

 

$player1.callGui(overlayHandle, "button");

 

to send from gui to script its

 

windowDef button
{
rect 455, 228, 64, 64
background "guis/assets/path/button.tga"
matcolor 0.6, 0.6, 0.6, 1
visible 0

onMouseEnter
{
set "matcolor" "1, 1, 0, 1";
}

onMouseExit
{
set "matcolor" "0.6, 0.6, 0.6, 1";
}

onAction
{
runScript "press_button";
}
}

  • Like 1
Link to comment
Share on other sites

Thank you. There's one small problem: the player camera always follows the cursor in the gui.The wiki page says:

 

While an interactive overlay exists, the player will be given a cursor which they can use to click on buttons and such, but their view will not be locked - it is up to the script to do that if so desired.

 

Is there a way to manually lock the camera in TDM? I've tried using func_cameraview and adding the overlay to the camera, but it looks like it doesn't support GUI overlays.

 

Edit: I've found a way by using scriptEvent void setTurnHinderance(string source, float mCap, float fCap); . I hope this will be useful to others in the future to create dialogue choices.

 

I'll post screenshots soon.

Edited by Agent Jones
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 3 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...