Author Topic: Corp's Errors and questions thread. I need some coding help here!  (Read 1537 times)

5 posts in a row, can someone please help me?


have you verified that setcontrolcamerafov is an actual server sided function?

It might be a client sided one

Edit: nevermind I verified it is a server sided function

However, the zoom key completely negates the effect

also fyi the default fov is 90 so if the client exists there will be no noticable change
« Last Edit: March 15, 2012, 10:18:42 PM by Nexus »

have you verified that setcontrolcamerafov is an actual server sided function?

It might be a client sided one

Edit: nevermind I verified it is a server sided function

However, the zoom key completely negates the effect

also fyi the default fov is 90 so if the client exists there will be no noticable change
Still, is there a way to change the FOV upon viewing in?
I added an if function, and so far, nothing worked.

I mean, I'm about to finish the model for the dragunov, I gotta figure this out sooner or later.

Still, is there a way to change the FOV upon viewing in?

Not sure what this means

I added an if function, and so far, nothing worked.

Not too clear about what you mean by this either.

I'm pretty sure that your problem is

the default fov is 90 so if the client exists there will be no noticable change

Because I took the default gun and added a function that made it go to 20 instead of staying at 90 and it worked fine

Not sure what this means
Not too clear about what you mean by this either.

I presume this is what happens when the player uses Ironsights.
I tried adding that line of code that would set the FOV, but it does nothing for me.
Code: [Select]
function MK11ImageScoped::onMount(%this,%obj,%slot)
{
if(%obj.toolMag[%obj.currTool]$="")
{
%obj.toolMag[%obj.currTool]=%this.item.MK11maxmag;
}
parent::onMount(%this,%obj,%slot);
%obj.hideNode("LHand");
%obj.hideNode("RHand");
%obj.hideNode("LHook");
%obj.hideNode("RHook");
}


I'm pretty sure that your problem is
Because I took the default gun and added a function that made it go to 20 instead of staying at 90 and it worked fine
I know the default is 90, but that is upon going out of ironsights.
I've been trying to get it where player right-clicks, and when they switch to the scope, the FOV is set to 20 or lower.
I'm still having a problem with that.

that is upon going out of ironsights.

Not according to your code.
It will always set it to 90 unless the client doesn't exist, in which case it doesn't matter.

I tried doing this on the default gun and it worked fine.

Not according to your code.
It will always set it to 90 unless the client doesn't exist, in which case it doesn't matter.

I tried doing this on the default gun and it worked fine.
Can I just send this to you?
I think I'm not understanding something, or something is getting miscommunicated here.

Can I just send this to you?
I think I'm not understanding something, or something is getting miscommunicated here.

I was basing that off of the code you posted here

In this code, if the client exists, it sets the fov to default (90).  If the client does not exist, then it has no effect because there is no client.  The game doesn't ignore it.  It is simply a case of the executed code does diddly squat.  There is no way that the 20 degree fov can be in effect.  The code is good except the if statement you use makes no sense.

I was basing that off of the code you posted here
In this code, if the client exists, it sets the fov to default (90).  If the client does not exist, then it has no effect because there is no client.  The game doesn't ignore it.  It is simply a case of the executed code does diddly squat.  There is no way that the 20 degree fov can be in effect.  The code is good except the if statement you use makes no sense.
Oh...
Back to work.


EDIT-New problem has arisen, I'm trying to parent datablocks for my dragonuv in order to reduce datablocks for the addon I'm making. I basically took a look at bushido's magnum skin's codes for reference on how to do it.
It's using the MK11's datablocks, but when I used it ingame, this is what happened-
It worked normal despite a few model errors that can be fixed later on.
But one problem I'm having is the fact that there are no sounds being played.
It's really bothering me, and I just really want to get this out of the way.


EDIT-nevermind, doesn't matter now.
« Last Edit: March 24, 2012, 03:09:27 PM by The Corporation »