Post: vector_scal() versus vectorScale()
10-31-2015, 05:15 PM #1
BullyWiiPlaza
Climbing up the ladder
(adsbygoogle = window.adsbygoogle || []).push({}); There are mods using the custom function vector_scal which is defined as follows:
    vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}

However, there already is a built-in function called
    vectorScale
which seems to take the same amount of parameters. I tried using vectorScale instead of vector_scal and it always worked except for once. It froze the game on the shooting fake care packages mod. Why is that? Aren't those functions identical? Apparently not. Anyone who knows their actual difference? Snail

    // Working just fine
carepBullets()
{
self endon("stop_bullets2");
while(1)
{
self waittill ( "weapon_fired" );
forward = self getTagOrigin("j_head");
end = self thread vector_scal(anglestoforward(self getPlayerAngles()),1000000);
SPLOSIONlocation = bulletTrace( forward, end, 0, self )[ "position" ];
M = spawn("script_model",SPLOSIONlocation);
M setModel("t6_wpn_supply_drop_ally");
}
}

vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}


    // Freezes when gun is fired
carepBullets()
{
self endon("stop_bullets2");
while(1)
{
self waittill ( "weapon_fired" );
forward = self getTagOrigin("j_head");
end = self thread vectorScale(anglestoforward(self getPlayerAngles()),1000000);
SPLOSIONlocation = bulletTrace( forward, end, 0, self )[ "position" ];
M = spawn("script_model",SPLOSIONlocation);
M setModel("t6_wpn_supply_drop_ally");
}
}
(adsbygoogle = window.adsbygoogle || []).push({});
10-31-2015, 05:23 PM #2
-Numb
You talkin to me?
Originally posted by BullyWiiPlaza View Post
There are mods using the custom function vector_scal which is defined as follows:
    vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}

However, there already is a built-in function called
    vectorScale
which seems to take the same amount of parameters. I tried using vectorScale instead of vector_scal and it always worked except for once. It froze the game on the shooting fake care packages mod. Why is that? Aren't those functions identical? Apparently not. Anyone who knows their actual difference? Snail

    // Working just fine
toggleFakeCarePackageBullets()
{
if(self.bullets2==false)
{
self thread carepBullets();
self.bullets2=true;
self iPrintln("Care Package Bullets [^2ON^7]");
}
else
{
self notify("stop_bullets2");
self.bullets2=false;
self iPrintln("Care Package Bullets [^1OFF^7]");
}
}

carepBullets()
{
self endon("stop_bullets2");
while(1)
{
self waittill ( "weapon_fired" );
forward = self getTagOrigin("j_head");
end = self thread vector_scal(anglestoforward(self getPlayerAngles()),1000000);
SPLOSIONlocation = bulletTrace( forward, end, 0, self )[ "position" ];
M = spawn("script_model",SPLOSIONlocation);
M setModel("t6_wpn_supply_drop_ally");
}
}

vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}


    // Freezes when gun is fired
toggleFakeCarePackageBullets()
{
if(self.bullets2==false)
{
self thread carepBullets();
self.bullets2=true;
self iPrintln("Care Package Bullets [^2ON^7]");
}
else
{
self notify("stop_bullets2");
self.bullets2=false;
self iPrintln("Care Package Bullets [^1OFF^7]");
}
}

carepBullets()
{
self endon("stop_bullets2");
while(1)
{
self waittill ( "weapon_fired" );
forward = self getTagOrigin("j_head");
end = self thread vectorScalr(anglestoforward(self getPlayerAngles()),1000000);
SPLOSIONlocation = bulletTrace( forward, end, 0, self )[ "position" ];
M = spawn("script_model",SPLOSIONlocation);
M setModel("t6_wpn_supply_drop_ally");
}
}


I think you miss spelled? You must login or register to view this content.
You said it was vectorScale, and you wrote vectorScalr Smile
10-31-2015, 05:47 PM #3
BullyWiiPlaza
Climbing up the ladder
Originally posted by Numb View Post
I think you miss spelled? You must login or register to view this content.
You said it was vectorScale, and you wrote vectorScalr Smile

No, I spelled it correctly. It's by the way already fixed Smile
10-31-2015, 06:07 PM #4
itsSorrow
In my man cave
Originally posted by BullyWiiPlaza View Post
No, I spelled it correctly. It's by the way already fixed Smile


how so?
10-31-2015, 06:12 PM #5
BullyWiiPlaza
Climbing up the ladder
Originally posted by GentleSlugger View Post
how so?

I typed it for this post also it didn't get a script error which it would when I misspelled...
10-31-2015, 06:31 PM #6
itsSorrow
In my man cave
Originally posted by BullyWiiPlaza View Post
I typed it for this post also it didn't get a script error which it would when I misspelled...


how u fix it doe?
10-31-2015, 06:59 PM #7
BullyWiiPlaza
Climbing up the ladder
Originally posted by GentleSlugger View Post
how u fix it doe?

Seriously, just get back on topic. I edited my post shortly after...
10-31-2015, 07:35 PM #8
itsSorrow
In my man cave
Originally posted by BullyWiiPlaza View Post
Seriously, just get back on topic. I edited my post shortly after...


Seriously, I am on topic lmfao

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo