Blockland Welcome, Guest. Please login or register.
Did you miss your activation email?
January 19, 2018, 05:21:00 AM

Home Help Login Register
  Show Posts
Pages: 1 [2] 3 4 5 6 7 ... 601
16  Blockland Files / Add-Ons / Re: [Weapon Pack] SWeps v1.3 (Upcoming updates post on page 16) on: January 12, 2018, 02:48:08 PM
The proportions are the problem, it isn't even very fitting for blockland, just made the stock less thick and the barrel shorter to fit the handguard.

The rest is acceptable honestly.

don't download it then, I don't care
I like it how it is and I only made it for myself

I'm only releasing it because I like the community and in hopes that someone else will make some cool content with it
17  Blockland Files / Add-Ons / Re: [Weapon Pack] SWeps v1.3 (Upcoming updates post on page 16) on: January 12, 2018, 03:49:21 AM
i mean it could be better but realism isn't really my concern mostly just gameplay comes first and then 'feeling good' but not realism

however thank you for your input, you actually provided quality input rather than UMMMMM I DONT LIKE IT LOL IM FREAKING OUT IT LOOKS WEIRD
18  Blockland Files / Add-Ons / Re: [Weapon Pack] SWeps v1.3 (Upcoming updates post on page 16) on: January 12, 2018, 01:54:51 AM
Where are the fucking sling mounts? I'm going to have an aneurysm if I don't see some fucking sling mounts.
please do
19  Blockland Files / Add-Ons / Re: [Weapon Pack] SWeps v1.3 (Upcoming updates post on page 16) on: January 12, 2018, 01:50:51 AM
i just made it look good for blockland
the blockhead models aren't exactly proportional to human beings

had to shorten up the back so the stock didnt stick all the way through the back of the players arm
the barrel was lengthed and thickened to look more cartoony

and the i took off the front sight to make it look further differentiate it from the ak47 and make it look more streamlined

I could have still done a better job but I'd rather move onto making something new and more interesting
20  Blockland Files / Add-Ons / Re: [Weapon Pack] SWeps v1.3 (Upcoming updates post on page 16) on: January 11, 2018, 08:33:37 PM
its coming im just taking a break also theres now revolver tricks where you can spin them and throw them up and catch them and secret animations
21  Blockland Forums / Modification Help / Re: anyway of having two muzzle points? on: January 11, 2018, 05:50:51 PM
the reason that it fucks up is because people just use getUpVector which always returns "0 0 1" unless you are in a vehicle, since its not getting the upward vector of your aim rather the upwards vector angle of how your player object is rotated
22  Blockland Forums / Modification Help / Re: anyway of having two muzzle points? on: January 11, 2018, 05:46:18 PM
that function definitely works right, notice my usage of getUpVectorHack
but your function looks better since you don't need as many reference angles

however it would be nice if you renamed your function so it didn't fuck up other people's addons
nameplay apache attack helicopter and my weapons pack etc, which all implement that version of vectorRelativeShift correctly
23  Blockland Forums / Modification Help / Re: anyway of having two muzzle points? on: January 11, 2018, 05:33:14 PM
put the muzzle point in the middle
when creating projectiles just do a little bit of math to create a projectile or projectiles at 2 locations

Code:
function gunImage::onFire(%db,%pl,%slot)
{
%upHack = %pl.getUpVectorHack();
%muzBase = %pl.getMuzzlePoint(%slot);
%forward = %pl.getMuzzleVector(%slot);
%muzPos0 = vectorAdd(%muzBase,vectorRelativeShift(%forward,%upHack,0 SPC -1 SPC 0));
%muzPos1 = vectorAdd(%muzBase,vectorRelativeShift(%forward,%upHack,0 SPC 1 SPC 0));

%proj = %db.projectile;
%pvel = %pl.getVelocity();
%vel = vectorAdd(%proj.muzzleVelocity,vectorScale(%pvel,%proj.velInheritFactor));
for(%i=0;%i<=1;%i++)
{
%p = new projectile()
{
dataBlock = %proj;
initialVelocity = %vel;
initialPosition = %muzPos[%i];
sourceObject = %pl;
sourceSlot = %slot;
client = %pl.client;
};
missionCleanup.add(%p);
}
}
function vectorRelativeShift(%forward,%up,%shift)
{
return vectorAdd(vectorAdd(vectorScale(%forward,getWord(%shift,0)),vectorScale(vectorCross(%forward,%up),getWord(%shift,1))),vectorScale(%up,getWord(%shift,2)));
}
function vectorAngleRotate(%vec,%ref,%ang)
{
%x = getWord(%vec,0);
%y = getWord(%vec,1);
%z = getWord(%vec,2);
%u = getWord(%ref,0);
%v = getWord(%ref,1);
%w = getWord(%ref,2);
%cos = mCos(%ang);
%sin = mSin(%ang);
return %u*(%u*%x+%v*%y+%w*%z)*(1-%cos)+%x*%cos+(%v*%z-%w*%y)*%sin SPC %u*(%u*%x+%v*%y+%w*%z)*(1-%cos)+%y*%cos+(%w*%x-%u*%z)*%sin SPC %u*(%u*%x+%v*%y+%w*%z)*(1-%cos)+%z*%cos+(%u*%y-%v*%x)*%sin;
}
function player::getUpVectorHack(%pl)
{
%muz = MatrixMulVector(%pl.getSlotTransform(0),"0 1 0");
%forward = %pl.getForwardVector();
%up = %pl.getUpVector();
return vectorAngleRotate(%muz,vectorCross(%forward,%up),$PI/2);
}

this would create two projectiles when the gun fires, one shifted 1 unit to the left and the other shifted 1 unit to the right
obviously if you wanted to create some projectiles spreading you could use some spread code to create multiple projectiles at each point

the bottom 3 functions are just support functions and you don't need to worry about anything in them
the only thing you need to tinker with is muzPos0 and muzPos1 and the projectile creation part
24  Blockland Forums / Modification Help / Re: Help: Custom turret aiming on: January 11, 2018, 03:40:13 PM
you can specify the look limits in the player datablock with
minLookAngle = -$PI/2;
maxLookAngle = $PI/2;

this would allow the player type to look all the way up and all the way down
-PI/2 being straight down and PI/2 being straight up
for my turret player i use -0.2 and 0.2

this way you don't need to package and functions or anything for setting the look angle


http://files.swololol.com/bl/o/turretExample.blend

here is an example blend file of the animations you will have to make
please note any of the node/object names can be anything you want
EXCEPT for the node called eye, keep that as eye and just leave it where it is, it should be facing forwards towards where a player in control of this datablock will be looking
AND
mount0, this is where the player will be mounted to the turret

it shows two animations that are required for making a player, look and root

each of these animations will be exported to a seperate dsq file
you will want to export your turret model without any animations on it and the turret should be facing straight ahead for the animationless version

the look animation will be having the turret aim from directly up to directly down

in each dsq file open the blender text editor and add a file called Sequences
you will add one line of text respectivley for look and root animations

look: priority 8, blend
root: priority 0

at the end of all this you should have

turret.dts
t_look.dsq
t_root.dsq


(file names can be whatever you want but these are a good baseline)



now in your code you will have to create a TSShapeConstructor

Code:
datablock TSShapeConstructor(turretNAMEDts)
{
baseShape  = "./turret.dts";
sequence0  = "./t_root.dsq root";

sequence1  = "./t_root.dsq run";
sequence2  = "./t_root.dsq walk";
sequence3  = "./t_root.dsq back";
sequence4  = "./t_root.dsq side";

sequence5  = "./t_root.dsq crouch";
sequence6  = "./t_root.dsq crouchRun";
sequence7  = "./t_root.dsq crouchBack";
sequence8  = "./t_root.dsq crouchSide";

sequence9  = "./t_look.dsq look";
sequence10 = "./t_root.dsq headside";
sequence11 = "./t_root.dsq headUp";

sequence12 = "./t_root.dsq jump";
sequence13 = "./t_root.dsq standjump";
sequence14 = "./t_root.dsq fall";
sequence15 = "./t_root.dsq land";

sequence16 = "./t_root.dsq armAttack";
sequence17 = "./t_root.dsq armReadyLeft";
sequence18 = "./t_root.dsq armReadyRight";
sequence19 = "./t_root.dsq armReadyBoth";
sequence20 = "./t_root.dsq spearready"; 
sequence21 = "./t_root.dsq spearThrow";

sequence22 = "./t_root.dsq talk"; 

sequence23 = "./t_root.dsq death1";

sequence24 = "./t_root.dsq shiftUp";
sequence25 = "./t_root.dsq shiftDown";
sequence26 = "./t_root.dsq shiftAway";
sequence27 = "./t_root.dsq shiftTo";
sequence28 = "./t_root.dsq shiftLeft";
sequence29 = "./t_root.dsq shiftRight";
sequence30 = "./t_root.dsq rotCW";
sequence31 = "./t_root.dsq rotCCW";

sequence32 = "./t_root.dsq undo";
sequence33 = "./t_pop.dsq plant";

sequence34 = "./t_root.dsq sit";

sequence35 = "./t_root.dsq wrench";
};
   

essentially you will be setting every single default blockland animation to root except for the look animation, however you can of course add more animations to this either to an existing blockland animation by specifying a different dsq file or adding another line like
sequences36 = "./t_fire.dsq fire";
which would add a new animation under the name fire



if you have any further questions ask here,
also a really good reference is the default tank turret, you can import the dts model and look at the dsq animations and the playertype datablock in the tank turret file
25  Off Topic / Off Topic / Re: Has anyone ever encountered real life surveys - I'm shook on: January 11, 2018, 02:57:23 AM
26  Blockland Forums / General Discussion / Re: [POLL] What FOV do you use? on: January 10, 2018, 03:21:49 PM
i feel like the poll is weird for not having a 90 option
27  Blockland Forums / General Discussion / Re: [POLL] What FOV do you use? on: January 10, 2018, 02:58:52 PM
The server CAN detect the client's FOV, but most weapon packs are old and dont use this new function.
in my experience theres some sort of network issue where the clients fov doesn't get transmitted so the server assumes 90 so about 2-10% of the time it defaults to 90 even if that isn't the correct fov
28  Blockland Forums / Modification Help / Re: Provide Your Custom Scripts for Streamlining Development on: January 08, 2018, 01:44:13 PM
can you commentate the vector functions because they're really confusing and its unclear on what they return. the names give some guess but already im confused on how geteyevectorhack is any different from the default geteye vector
getEyeVectorHack gets the vector of where your body is facing from your eyepoint even if you are freelooking

rotate vector angle something like this
Code:
%upHack = %pl.getUpVectorHack();
%forward = %pl.getForwardVector();
%rightVec = vectorCross(%forward,%up);
%muzVec = %pl.getEyeVectorHack();
%a = (getRandom()-0.5)*($PI*2);
%x = mCos(%a)*(getRandom()*%spread);
%y = mSin(%a)*(getRandom()*%spread);
vectorAngleRotate(vectorAngleRotate(%muzVec,%upHack,%x),%rightVec,%y);
this is something along the lines of what my weapon pack uses to create circular spread instead of how most weapons create cubic spread



vector relative shift, shifts a transform with a vector as its local axis

Code:
%up = %pl.getUpVectorHack();
%forward = %pl.getEyeVectorHack();
%pos = vectorAdd(%pl.getMuzzlePoint(%slot),vectorRelativeShift(%forward,%up,"3 3 0"));
this would get the position 3 units in front and 3 units to the right of the muzzlePoint
29  Blockland Forums / Modification Help / Re: Provide Your Custom Scripts for Streamlining Development on: January 08, 2018, 05:34:28 AM
Code:
function rgbGradient(%step, %c1, %c2)
{
%r1 = getWord(%c1, 0);
%g1 = getWord(%c1, 1);
%b1 = getWord(%c1, 2);

%r2 = getWord(%c2, 0);
%g2 = getWord(%c2, 1);
%b2 = getWord(%c2, 2);

%r3 = %r1 + %step * (%r2 - %r1);
%g3 = %g1 + %step * (%g2 - %g1);
%b3 = %b1 + %step * (%b2 - %b1);

return %r3 SPC %g3 SPC %b3;
}
function rgbToHex( %rgb )
{
%r = _compToHex( 255 * getWord( %rgb, 0 ) );
%g = _compToHex( 255 * getWord( %rgb, 1 ) );
%b = _compToHex( 255 * getWord( %rgb, 2 ) );

return %r @ %g @ %b;
}
function _compToHex( %comp )
{
%left = mFloor( %comp / 16 );
%comp = mFloor( %comp - %left * 16 );

%left = getSubStr( "0123456789ABCDEF", %left, 1 );
%comp = getSubStr( "0123456789ABCDEF", %comp, 1 );

return %left @ %comp;
}

function hexToRgb( %rgb )
{
%r = _hexToComp( getSubStr( %rgb, 0, 2 ) ) / 255;
%g = _hexToComp( getSubStr( %rgb, 2, 2 ) ) / 255;
%b = _hexToComp( getSubStr( %rgb, 4, 2 ) ) / 255;

return %r SPC %g SPC %b;
}
function _hexToComp(%hex)
{
%left = getSubStr(%hex,0,1);
%comp = getSubStr(%hex,1,2);

%left = striPos("0123456789ABCDEF",%left);
%comp = striPos("0123456789ABCDEF",%comp);

if(%left < 0 || %comp < 0)
{
return 0;
}

return %left * 16 + %comp;
}



Code:
function vectorAngleRotate(%vec,%ref,%ang)
{
%x = getWord(%vec,0);
%y = getWord(%vec,1);
%z = getWord(%vec,2);
%u = getWord(%ref,0);
%v = getWord(%ref,1);
%w = getWord(%ref,2);
%cos = mCos(%ang);
%sin = mSin(%ang);
return %u*(%u*%x+%v*%y+%w*%z)*(1-%cos)+%x*%cos+(%v*%z-%w*%y)*%sin SPC %u*(%u*%x+%v*%y+%w*%z)*(1-%cos)+%y*%cos+(%w*%x-%u*%z)*%sin SPC %u*(%u*%x+%v*%y+%w*%z)*(1-%cos)+%z*%cos+(%u*%y-%v*%x)*%sin;
}
function player::getUpVectorHack(%pl)
{
%muz = MatrixMulVector(%pl.getSlotTransform(0),"0 1 0");
%forward = %pl.getForwardVector();
%up = %pl.getUpVector();
return vectorAngleRotate(%muz,vectorCross(%forward,%up),$PI/2);
}
function player::getEyeVectorHack(%pl)
{
    %forward = %pl.getForwardVector();
    %eye = %pl.getEyeVector();

    %x = getWord(%eye, 0);
    %y = getWord(%eye, 1);

    %yaw = mATan(getWord(%forward,0),getWord(%forward,1));
    %pitch = mATan(getWord(%eye,2),mSqrt(%x*%x+%y*%y));

    return MatrixMulVector(MatrixCreateFromEuler(%pitch SPC 0 SPC -%yaw),"0 1 0");
}
function vectorRelativeShift(%forward,%up,%shift)
{
return vectorAdd(vectorAdd(vectorScale(%forward,getWord(%shift,0)),vectorScale(vectorCross(%forward,%up),getWord(%shift,1))),vectorScale(%up,getWord(%shift,2)));
}

i don't leave home without these functions

credit to my ex wife port and old friend amade
30  Blockland Files / Add-Ons / Re: Flip Mod (Player_PhysicsJump) [by Hata/tommybricksetti] on: January 07, 2018, 05:14:45 AM
pathetic
Pages: 1 [2] 3 4 5 6 7 ... 601


Login with username, password and session length

Powered by SMF 1.1.20 | SMF © 2013, Simple Machines
Page created in 0.019 seconds with 18 queries.