UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

FOV Messing up after Teleportation?

broken avatar :(
Created 11 years ago
by FLUXtrance
0 Members and 1 Guest are viewing this topic.
2,141 views
broken avatar :(
×
broken avatar :(
Location: usColorado
Date Registered: 13 June 2013
Last active: 7 years ago
Posts
40
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
Signature
×
FLUXtrance's Groups
Hey All.

I have finally got teleporters working in my newest map. I'm using Der Riese style teleporters with KVP's from this website here:

http://www.customcod.com/~custo96/wiki/index.php?title=Custom_Nazi_Zombie_Maps_(Der_Riese)#Teleporters_2

I have them working perfectly, with only one problem. before Implementing these, I went into my _zombiemode.GSC file, and changed every instance of "cg_fov", "65", to "cg_fov", "90", so the FOV would be increased to 90. I later found out that after teleporting, the FOV would be changed back to 65, so I went into dlc3_teleporter.GSC and changed all THOSE instances to 90. Finally, it works... but with one small thing. For some reason, every 10-20 teleports my FOV is changed back to 65. I have tested this many times, and I'm pretty confident it is being caused by a "teleportation after effect" (such as flashing screen/blurry screen/etc.) because every time the FOV changes, there is never an accompanying after effect. I can't for the life of me figure out which files need to be changed to fix this. If anyone has a slolution, that would be greatly appreciated, as I really want to have the full 90 FOV and working teleporters!

A quick rundown of all files I have altered, and changed all instances having to do with FOV to (90):

_zombiemode.GSC
dlc3_teleporter.GSC
payload_zombiemode.GSC

Before altering any of these, I copied them into my mods/MAPNAME/maps folder, altered them there, then built the mod with the new folder checked. Any help would be GREATLY appreciated. Thanks to any of you who took the time to read this whole thing, I appreciate it.
broken avatar :(
×
broken avatar :(
[UGX] Maintainer (Admin & Programmer)
Location: deFriedrichshafen, Baden-Württemberg, Germany
Date Registered: 29 August 2012
Last active: 7 hours ago
Posts
435
Respect
Forum Rank
Perk Hacker
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
Personal Quote
Dolphin!
Signature
changed one line of code, bug is fixed


Coming to work on monday morning.
When a bug mysteriously disappears.


:ugxmods: Developer ;)
×
Delta's Groups
UGX Administrator
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
UGX Chat Moderator Has the ability to mute, kick, or ban chat members for being abusive or breaking the rules of the forum.
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Delta's Contact & Social Linksthe-deltaugxDeltaItsDeltaigDelta igdeltaigdeltaUGX_DeltaDelta#6147Personal Site
Wait, so the player start with a FOV of 90 and when you get teleported back for a certain amount your FOV is changing back to 65?

Well, first of all, I wouldn't recommand using such a hard limit to force everyone to use a FOV of 90.
It depends on everyone, some ppl like a higer FOV, some not. (I used to have 85 in competition)

You could make a small loop, to check every frame if the fov changed to 65 and if so, simply set it to 90 again.

I also think payload_zombie has nothing to do with it - as long as you don't include and use it in your  map, do you?

Did you changed the fov there aswell:
Code Snippet
Plaintext
root\raw\maps\nazi_zombie_factory_teleporter.gsc:
   55  if( !IsSplitscreen() )
   56  {
   57: level.teleport_ae_funcs[level.teleport_ae_funcs.size] = maps\nazi_zombie_factory_teleporter::teleport_aftereffect_fov;
   58  }
   59  level.teleport_ae_funcs[level.teleport_ae_funcs.size] = maps\nazi_zombie_factory_teleporter::teleport_aftereffect_shellshock;
   ..
  986  // tae indicates to Clientscripts that a teleporter aftereffect should start
  987 
  988: teleport_aftereffect_fov()
  989  {
  990  setClientSysState( "levelNotify", "tae", self );

As you can see, he is calling a function called teleport_aftereffect_fov. - This function (line 988) calls a client state.

soooooo, check  root/raw/clientscripts/dlc3_teleporter.csc - line 71
Code Snippet
Plaintext
teleport_aftereffect_fov( localClientNum )
{
println( "***FOV Aftereffect***\n" );

start_fov = 30;
end_fov = 65;
duration = 0.5;

for( i = 0; i < duration; i += 0.017 )
{
fov = start_fov + (end_fov - start_fov)*(i/duration);
SetClientDvar( "cg_fov", fov );
realwait( 0.017 );
}
}

There you got it ;) - The reason on why it is random is that they implemented different effects for it (which you already noticed correctly)

But I still recommand creating an endless loop to check the fov and if it isn't 90 then set it to 90 - in this case you cover all other fov changes which might be in effect.

broken avatar :(
×
broken avatar :(
Location: usColorado
Date Registered: 13 June 2013
Last active: 7 years ago
Posts
40
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
FLUXtrance's Groups
Quote
As you can see, he is calling a function called teleport_aftereffect_fov. - This function (line 988) calls a client state.

First of all, thanks for the quick reply Delta, I appreciate it. I did forget to mention, but I also went in and put a // before the 2 instances in which the teleport_aftereffect_fov was called, so as to prevent the after effect from occurring.

As for the other two files, I didn't know of them, so I'll try changing them now. Quick question about that though: Typically, whenever I edit say _zombiemode.GSC, I first copy/paste it into my mods/MAPNAME/maps, then edit it. If I plan on editing for example the file you mentioned under raw/clientscripts... do i need to make a blank "clientscripts" folder in my mods/MAPNAME/ folder, then copy/paste dlc3_teleporter.csc inside? of course then select it when building mods.

One last thing. As you can probably tell, I'm not very experienced in scripting yet, so I could use some help on creating a loop to check if the FOV is set to (X) (I may bump it down to 80, just for players use to 65) just so I can be sure a player doesn't randomly get his FOV switched back to 65. Where would I put this loop? _zombiemode.GSC? Either way, thanks for your help, I really appreciate it!
broken avatar :(
×
broken avatar :(
[UGX] Maintainer (Admin & Programmer)
Location: deFriedrichshafen, Baden-Württemberg, Germany
Date Registered: 29 August 2012
Last active: 7 hours ago
Posts
435
Respect
Forum Rank
Perk Hacker
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
Personal Quote
Dolphin!
×
Delta's Groups
UGX Administrator
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
UGX Chat Moderator Has the ability to mute, kick, or ban chat members for being abusive or breaking the rules of the forum.
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Delta's Contact & Social Linksthe-deltaugxDeltaItsDeltaigDelta igdeltaigdeltaUGX_DeltaDelta#6147Personal Site
see your "mods" folder as a virtual "raw".

so any file which is in raw/<foldername>
has to be the same as in mods/<modname>/<foldername>

for the loop, try this:

Code Snippet
Plaintext
// call it in maps/<your map>.gsc main function
thread force_fov();

// put it in maps/<your map>.gsc
force_fov()
{
endon("disconnect");

fov = 90;

while(true)
{
if( GetDvarInt("cg_fov") != fov )
SetDvar( "cg_fov", fov );
wait(0.05);
}
}

( I have to time to test it, so this was scripting in a freaking forum lol, if it doesn't work I fix it later when I get time ~4h)
broken avatar :(
×
broken avatar :(
Location: usColorado
Date Registered: 13 June 2013
Last active: 7 years ago
Posts
40
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
FLUXtrance's Groups
Awesome, Editing the clientscripts did the trick! Thanks a ton man! I appreciate it :D

 
Loading ...