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?
Do u guys understand my question?
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.
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.
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.
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.
I modeled the scope & crosshairs.
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
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.
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.
It's all in the files somewhere. Dig deeper into the pack to find it.
Yeah I'm still looking. It's got me stumped.
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.
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?
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?
For some reason I am unable to get a link between setguiparm and new content added to the hud file in the guis folder. Adding stuff to a specific weapons GUI file like the plasmaguns works. But not something added to the global hud file in the GUIs folder. Any ideas?
Seriously?? Nobody has ever tried doing some HUD additions to the global HUD file using setGuiParm as a way to get them to work? Only CED has done this?
Ok even setting the parm12 up as a cvar and setting the scope art to be visible like this:
visible ("cvar::gui_parm12" == 1)
does not work. What the heck is going on here? Is it even possible to make something visible like this? I've even gone as far as making a choiceDef that ontime 0 would set the visible setting for the scope overlay to 1 or 0 depending on what the cvar was set to over in the weapon script. Is the ontime function not possible in the HUD file? Is it only possible in menus?
I'm truly stumped and ready to smash my head through my screen. And if I survive that run into my living room and finish myself off with my 50 inch TV.
I figured it out. I had to make a choiceDef and then use the results of that choice in the visible parameter of the scope overlay. Not at all what CED did. I wonder why this worked for him so much easier.