Jump to content
The Dark Mod Forums
demagogue

Newbie DarkRadiant Questions

Recommended Posts

Destined, the pauseGUI routine is worrisome. The tdm_events.script entry for it has this warning, that it interferes with execution of normal threads, but unfortunately gives no hint how to create a thread by "a special SDK method":

/**
 * Pauses the game. This should only be called for threads that are explicitly maintained
 * by a special SDK method, because ordinary threads won't get executed during g_stopTime == true.
 * Note: This is used by the objective GUI threads.
 * Note: Must be called on the player entity, not the sys entity.
 */

Share this post


Link to post
Share on other sites

Yeah, I saw that note, but if you start the GUI before in teh script, it might still work. Or you would have to teleport the player after all, but you could avoid using the whole camera and wall setup, which maybe would still make it easier.

Share this post


Link to post
Share on other sites

Regarding that thread note, the worry I have is not so much starting the GUI, but whether you could get the game to resume afterwards. Dunno.

Share this post


Link to post
Share on other sites

Pausing the game would probably be the most elegant solution, but you can probably get away with using the camera to freeze the player's controls and calling that video overlay which covers the whole screen. The player wouldn't know the difference.

If the cutscene should be shown in an area that AI can access it'd be best to teleport the player to a safe blue room while the cutscene is playing.

Share this post


Link to post
Share on other sites

Hm, I want to show a message during a cutscene (by using sys.trigger() on an atdm:gui_message entity) but as long as there's an active func_cameraview it doesn't show up, while outside of the cutscene it shows up fine.

This is despite cinematic 1 being set on the entity. Also tried force 1, which made it show for just a split second. Has anyone pulled this off before?

Share this post


Link to post
Share on other sites

IIRC, If your cam view is an overlay, as part of the request to create the overlay, you can give the overlay a layer number.

Perhaps you can look at the def of the message overlay to see if you can give it a higher layer number than the cam view?

  • Thanks 1

Share this post


Link to post
Share on other sites

@grayman thank you for the promising idea, but it doesn't seem to be what it takes.

I've started with cloning & renaming the message scriptobject + def, with the difference that it calls the message gui with layer 101 instead of 10 (and I set cinematic 1 inside DR). That didn't change things.

Then I lifted the bare essentials from the scriptobject and turned it into a map script. Tried layer 11, 16, 26, 51, 102, 250, 1002... works fine except when there's a func_cameraview active.

Spoiler

void message_cutscene()
{
	entity test_camera	= $test_camera;

	test_camera.activate($player1);						//start the camera

	float gui = $player1.createOverlay("guis/tdm_message.gui", 1002);	//create message and show for 6s
	$player1.setGuiInt(gui, "msg_lines", 1);
	$player1.setGuiString(gui, "msg_text", "text");
	sys.wait(6);

	$player1.callGui(gui, "doFadeOut");					//fade out & reset message
	sys.wait(1);
	$player1.destroyOverlay(gui);
	gui = 0;

	test_camera.activate($player1);						//stop the camera
}

 

I'd take a look at the func_cameraview's coding but that seems to be buried in the source code, which is a different beast from Doomscript.

I don't know... do you have an idea what's going wrong?

Share this post


Link to post
Share on other sites

No idea at all.

A quick glance through the player camera code indicates that the screen is simply taken over by the camera's viewport. No GUI involved. My suggestion is invalid if the camera doesn't use a GUI to paint the screen.

Looks like this is a dead end.

I can't think of another way to do it.

Share this post


Link to post
Share on other sites

Had another idea: tried calling the overlay on the camera instead of the player, since they both have their own viewports. Still no dice, so it looks like we've got a proper bug here. Also tried a different GUI, guis/underwater/underwater_greengrey_thickmurk.gui.

Having thought about this I can convey my meaning more than well enough by a change in sound and lighting alone - maybe that's the best way anyway. But it does feel like cutscenes would be a fairly common usage case for messages.

Share this post


Link to post
Share on other sites

I guess a "change in sound" could include voice-over audio, perhaps delivered by an off-screen narrator AI. Though lots more effort to do that well than a text message.

Share this post


Link to post
Share on other sites

You can make a skin that swaps all existing materials (~= textures) with a tiling gold material. Rename a .txt to .skin and create a skins folder in your fm, then put this into it:
skin name_of skin

{
model name_of_model

name_of_original_material name_of_new_material
}

 

Can have multiple models and material swaps in one skin definition.

Then in DR click on File -> Reload Skins and in TDM enter into the console reloadDecls (can bind that to a hotkey).

 

@Geep yes, that's still feasible. Voiceovers are generally prime solutions, but in this case it'd also be reasonable to go a more subtle route.

  • Thanks 1

Share this post


Link to post
Share on other sites

A small addition: In order to get all the "name_of_the_original_material"s for your skin, you can use "Create Model" in DR and select the model you want to create the skin for. On the lefter side there is a list with all materials used in that model.

Edited by Destined
Spelling
  • Thanks 1

Share this post


Link to post
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.


×
×
  • Create New...