News:

One Minute Game Review by The Happy Friar: https://ugetube.com/@OneMinteGameReviews
Also on Rumble: https://rumble.com/c/c-1115371

idTech 4 (aka Doom 3 tech) Discord Server! https://discord.gg/9wtCGHa

Main Menu

Screen overlay for looking through a scope

Started by VGames, June 12, 2015, 12:29:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

VGames

How do u make the screen look like you're looking through a scope? Like what are the commands for pulling this off? I know where to put it in the weapon script but what are the commands that I should look into using to pull this off?
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

VGames

Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

BielBdeLuna

in d3 there is that case in "marscity2" (the second time you go to Mars City) where you look at the mirror and the image gets an effect, I've never used it in my maps but I guess it has to be something like this only that you activate it in the script, but I've never done it, idk and I would like to know this too.

The Happy Friar

I've done it by having the weapon have a custom zoom and that zoom zoomes in to the scope on the weapon instead of a screen effect.

VGames

That's a good idea. I'll try that out when I get into the modeling and animation stuff I want to add. But if anybody knows how to do a screen overlay that would be nice to know too.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

VGames

Ok Happy so I'm now at the stage where I'm trying to add this scoped ADS feature for the rocket launcher. I'm having trouble understanding just how you made the scope part of the model see through. Was that done through material coding? Or was something done to the actual model? I've tried a few different things but didn't get the scope on the rocket launcher to look see through. Should I make the texture on the scope see through? So confused.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

The Happy Friar


chimueloeldragon2011

FFYL

VGames

U did this with the rocket launcher? If u did I'll just use yours. It looks great. I'll have to make another melee animation for it but that's no big deal.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

VGames

Ok I've been struggling with this scope overlay. Does anybody here have any experience with the CED assets pack? I'm sure I've got everything in order but the scope will not show up. I'm guessing I haven't defined the material part of the textures but the thing is there is nowhere in the material files that defines the textures used for the scope overlay. They're defined in the guis hud file but they don't show the file format for the textures. So they must be defined somewhere in a material definition right? I've tried contacting the author but he doesn't respond.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

bkt

It's all in the files somewhere.  Dig deeper into the pack to find it. 

VGames

Yeah I'm still looking. It's got me stumped.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

VGames

#12
Ok I've looked through this code like crazy. There's even another guy that has been looking through it aswell and we've come to the conclusion that the gui_parm12 that is set in the doom_events file has not been defined so that the game knows when it's being called. There is no other place in the entire CED mod pack that has anything to do with gui_parm12 except for in the gui HUD file and the doom_events file. There is of course the calling of the event that tells gui_parm12 to either turn on or off in the rocket launcher script file but there are no other places that gui_parm12 is found. Here's the simplest version of the code for the gui HUD file. I have made several different versions of it trying to figure this out but this should be enough to get the scope to appear when gui_parm12 is activated:


//**************************************************************************

// RL SCOPE OVERLAY START

//**************************************************************************

windowDef RLSParentA {

rect 0,0,640,480

visible 1 // ("gui::weapon8" == 2)

windowDef RLSStatic {

rect 0,0,640,480

visible ("gui::gui_parm12" == 1)

background "gui/hud/filmgrain"

matcolor 0,0.9,0,1

matscalex 4

matscaley 2

}

windowDef RLSGlass {

rect 0, 0, 640, 480

visible ("gui::gui_parm12" == 1)

matcolor 0.1,0.2,0.15,0.1

background "textures/glass/glass1_nvp"

}

windowDef RLSBlack {

rect 0, 0, 640, 0

visible ("gui::gui_parm12" == 1)

backcolor 0,0,0,1

}

windowDef RLSBlackLeft {

rect 0, 0, 80, 480

visible ("gui::gui_parm12" == 1)

backcolor 0,0,0,1

}

windowDef RLSBlackRight {

rect 560, 0, 80, 480

visible ("gui::gui_parm12" == 1)

backcolor 0,0,0,1

}

}

windowDef RLSParent {

rect 0,0,640,480

visible 1 // ("gui::weapon8" == 2)

windowDef RLSA {

rect 60, -20, 520, 520

visible ("gui::gui_parm12" == 1)

matcolor 0.4,0.6,0.3,1

background "guis/assets/hud/crosshairs/rlaunchercircle"

}

windowDef RLSB {

rect 60, -20, 520, 520

visible ("gui::gui_parm12" == 1)

matcolor 0.4,0.6,0.3,0

background "guis/assets/hud/crosshairs/rlaunchercircle"

onTime 0 {

transition "matcolor" "0.4 0.6 0.3 0" "0.4 0.6 0.3 0.2" "400" "0" "1" ;

transition "rect" "110 30 420 420" "60 -20 520 520" "1000" "0" "1" ;

}

onTime 400 {

transition "matcolor" "0.4 0.6 0.3 0.2" "0.4 0.6 0.3 0" "600" "0" "1" ;

}

onTime 2500 {

resetTime "0" ;

}

}

windowDef RLS {

rect 80, 0, 480, 480

visible ("gui::gui_parm12" == 1)

matcolor 1,1,1,1

background "guis/assets/hud/crosshairs/rlauncher"

}

windowDef RLSCenter {

rect 80, 0, 480, 480

visible ("gui::gui_parm12" == 1)

matcolor 1,1,1,flickertable [ time * 0.0025 ]

background "guis/assets/hud/crosshairs/rlaunchercenter"

}

windowDef RLS2 {

rect 80, 0, 480, 480

visible ("gui::gui_parm12" == 1)

matcolor 1,1,1,1

background "guis/assets/hud/crosshairs/rlaunchermask"

}

windowDef RLSText {

rect 0,455,640,480

visible ("gui::gui_parm12" == 1)

forecolor 1,1,1,1

text "[ALT FIRE] = ZOOM X2"

textscale 0.14

textalign 1

font "fonts/zerohour"

onTime 0 {

transition "forecolor" "1 1 1 0.2" "1 1 1 0.05" "200" ;

}

onTime 200 {

transition "forecolor" "1 1 1 0.05" "1 1 1 0.2" "100" ;

}

onTime 300 {

resetTime "0" ;

}

}

}

//**************************************************************************

// RL SCOPE OVERLAY END

//**************************************************************************


And here are the events that turn gui_parm12 off and on which are called in the rocket launcher script file:


/*
// Rocket launcher scope
*/
void RLCS_ON() {
$player1.setGuiParm("gui_parm12", 1);
}
void RLCS_OFF() {
$player1.setGuiParm("gui_parm12", 0);
}


And of course here are the commands I'm using in the rocket launcher script file to call on these events. I've even called the event to turn on gui_parm12 in the rocket launcher's idle state just to get the dang thing to come on as soon as the weapon is selected:


RLCS_ON();
&
RLCS_OFF();


Please help if you can. I have not heard anything from CED2011 about this scope overlay issue. I wish he would respond.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

VGames

Still lost here. For some reason the Parms are not being used by the game. I don't want these hud effects to work unless the parm has been enabled but the parm is not being activated at all. It's like the game doesn't even know what they are but its not giving me an error. Does anybody know anything about adding new content to the player hud using Parms to enable or disable them?
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

VGames

Event setguiparm that's called in the utility script file simply does not work for me. Has anybody found this to be true for them?
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500