Author Topic: Screen overlay for looking through a scope  (Read 1622 times)

0 Members and 1 Guest are viewing this topic.

VGames

  • PD3 Beta Testers
  • Hero Member
  • *
  • Posts: 754
  • Karma: +17/-69
    • View Profile
Screen overlay for looking through a scope
« on: June 12, 2015, 12:29:10 PM »
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

  • PD3 Beta Testers
  • Hero Member
  • *
  • Posts: 754
  • Karma: +17/-69
    • View Profile
Re: Screen overlay for looking through a scope
« Reply #1 on: June 13, 2015, 12:31:27 PM »
Do u guys understand my question?
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

BielBdeLuna

  • Full Member
  • ***
  • Posts: 242
  • Karma: +8/-20
  • Doom Newbie
    • View Profile
    • my Github repositories
Re: Screen overlay for looking through a scope
« Reply #2 on: June 13, 2015, 03:16:25 PM »
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

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 858
  • Karma: +42/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
Re: Screen overlay for looking through a scope
« Reply #3 on: June 14, 2015, 01:03:35 PM »
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

  • PD3 Beta Testers
  • Hero Member
  • *
  • Posts: 754
  • Karma: +17/-69
    • View Profile
Re: Screen overlay for looking through a scope
« Reply #4 on: June 14, 2015, 01:08:42 PM »
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

  • PD3 Beta Testers
  • Hero Member
  • *
  • Posts: 754
  • Karma: +17/-69
    • View Profile
Re: Screen overlay for looking through a scope
« Reply #5 on: September 01, 2015, 08:07:19 PM »
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

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 858
  • Karma: +42/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
Re: Screen overlay for looking through a scope
« Reply #6 on: September 02, 2015, 06:46:21 AM »
I modeled the scope & crosshairs.

chimueloeldragon2011

  • Newbie
  • *
  • Posts: 10
  • Karma: +4/-0
  • Stratofortress
    • View Profile
Re: Screen overlay for looking through a scope
« Reply #7 on: September 02, 2015, 10:50:32 AM »
Man I did that in my assets pack you can take a look here, is this what you're looking for?

http://www.moddb.com/mods/star1088/images/new-media-hud-and-mod-internal-changes2
FFYL

VGames

  • PD3 Beta Testers
  • Hero Member
  • *
  • Posts: 754
  • Karma: +17/-69
    • View Profile
Re: Screen overlay for looking through a scope
« Reply #8 on: September 02, 2015, 11:06:16 AM »
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

  • PD3 Beta Testers
  • Hero Member
  • *
  • Posts: 754
  • Karma: +17/-69
    • View Profile
Re: Screen overlay for looking through a scope
« Reply #9 on: September 08, 2015, 09:56:51 PM »
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

  • Jr. Member
  • **
  • Posts: 96
  • Karma: +12/-2
  • Doom Newbie
    • View Profile
Re: Screen overlay for looking through a scope
« Reply #10 on: September 09, 2015, 11:27:44 AM »
It's all in the files somewhere.  Dig deeper into the pack to find it. 

VGames

  • PD3 Beta Testers
  • Hero Member
  • *
  • Posts: 754
  • Karma: +17/-69
    • View Profile
Re: Screen overlay for looking through a scope
« Reply #11 on: September 09, 2015, 11:43:39 AM »
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

  • PD3 Beta Testers
  • Hero Member
  • *
  • Posts: 754
  • Karma: +17/-69
    • View Profile
Re: Screen overlay for looking through a scope
« Reply #12 on: October 24, 2015, 02:43:25 PM »
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:

Code: [Select]
//**************************************************************************

// 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:

Code: [Select]
/*
// 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:

Code: [Select]
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.
« Last Edit: October 24, 2015, 02:45:11 PM by VGames »
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

VGames

  • PD3 Beta Testers
  • Hero Member
  • *
  • Posts: 754
  • Karma: +17/-69
    • View Profile
Re: Screen overlay for looking through a scope
« Reply #13 on: November 19, 2015, 08:12:41 AM »
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

  • PD3 Beta Testers
  • Hero Member
  • *
  • Posts: 754
  • Karma: +17/-69
    • View Profile
Re: Screen overlay for looking through a scope
« Reply #14 on: November 19, 2015, 08:26:25 PM »
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