Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - tommybricksetti

Pages: 1 2 3 4 5 [6] 7 8 9 10 11 ... 13
76
Modification Help / getItem from WeaponImage?
« on: June 03, 2013, 01:14:59 AM »
I want to find the item image from a weapon image.

77
General Discussion / Yemen DM: Looking for Builders
« on: May 29, 2013, 03:46:40 AM »
Working on builds for my mods is very difficult, seeing them from a scripter's perspective. I would like some help so I we can actually get these builds finished and up and running.

78
Modification Help / Source Code for my Corner/Edge Detection
« on: May 27, 2013, 12:43:36 AM »
Code: [Select]
//Edge Detection and Rotation
function Player::BoundaryCheck(%obj)
{
if(%obj.isHanging || %obj.isClimbing)
{
// talk("Boundary Check loop");
// centerPrint(%obj.client,"<font:impact:24><br><br><br><br><color:FFF200><just:right>Boundary Check Loop ",0.1);
if(!%obj.isLeaping)
{
%obj.grabchk2 = %obj.schedule(5,GrabCheck);
// talk("Secondary Grab Check");
// bottomPrint(%obj.client,"<font:impact:24><br><br><br><br><color:FFF200><just:right>Secondary Grab Check scheduled ",0.1);
}
cancel(%obj.bcheck);
%obj.bcheck = %obj.schedule(10,BoundaryCheck);
if(%obj.isHanging)
{
cancel(%obj.dirfix);
%obj.dirfix = %obj.schedule(5,DirectionalFix);
}
%vec = %obj.getForwardVector();
%vel = %obj.getVelocity();
%pos = %obj.getPosition();
%rv = relativevelocity(%vec,%vel);
%lvec = %obj.getLeftVector();
%rvec = %obj.getRightVector();
%x = getWord(%rv,0);
%y = getWord(%rv,1);
%z = getWord(%vel,2);
%up = getWord(%pos,2);
%fwdX = getWord(%vec,0);
%fwdY = getWord(%vec,1);
if(%x > 5)
{
%obj.setVelocity(vectorScale(%dv,0.25) SPC %upv);
}
if(%x < -5)
{
%obj.setVelocity(vectorScale(%dv,0.25) SPC %upv);
}
if(%x > 0.1)
{
%xAdd = 0.2;
%xAdd2 = 1;
%xSub = -0.1;
%sv = %lvec;
}
else if(%x < -0.1)
{
%xAdd = -0.2;
%xAdd2 = -1;
%xSub = 0.1;
%sv = %rvec;
}
%ap = (%xAdd * %fwdY + %yAdd * %fwdX) SPC (%yAdd * %fwdY + %xAdd * -%fwdX) SPC %zAdd;
%ap2 = (%xAdd2 * %fwdY + %yAdd2 * %fwdX) SPC (%yAdd2 * %fwdY + %xAdd2 * -%fwdX) SPC %zAdd2;
%sp = (%xSub * %fwdY + %ySub * %fwdX) SPC (%ySub * %fwdY + %xSub * -%fwdX) SPC %zSub;
%ledgePos = vectorAdd(%obj.getHackPosition(),"0 0 0.15");
%startA = vectorAdd(%ledgePos,%ap);
%beam = vectorScale(%vec,1);
%endA = vectorAdd(%startA, %beam);
%rayA = containerRayCast(%startA, %endA, $TypeMasks::fxBrickObjectType | $TypeMasks::TerrainObjectType | $Typemasks::VehicleObjectType, %obj);
%spacePos = vectorAdd(%obj.getEyePoint(),"0 0 -0.55");
%startB = vectorAdd(%spacePos,%ap);
%endB = vectorAdd(%startB, %beam);
%rayB = containerRayCast(%startB, %endB, $TypeMasks::fxBrickObjectType | $TypeMasks::TerrainObjectType | $Typemasks::VehicleObjectType, %obj);
%ledgePos = vectorAdd(%obj.getHackPosition(),"0 0 0.15");

%endC = vectorAdd(%ledgePos, %beam);
%rayC = containerRayCast(%ledgePos, %endC, $TypeMasks::fxBrickObjectType | $TypeMasks::TerrainObjectType | $Typemasks::VehicleObjectType, %obj);
%endD = vectorAdd(%spacePos, %beam);
%rayD = containerRayCast(%spacePos, %endD, $TypeMasks::fxBrickObjectType | $TypeMasks::TerrainObjectType | $Typemasks::VehicleObjectType, %obj);
if(!%obj.isClimbing && %obj.isHanging)
{
%startA2 = %ledgePos;
%beam2 = vectorScale(%sv,1);
%endA2 = vectorAdd(%startA2, %beam2);
%rayA2 = containerRayCast(%startA2, %endA2, $TypeMasks::fxBrickObjectType | $TypeMasks::TerrainObjectType | $Typemasks::VehicleObjectType, %obj);
%startB2 = %spacePos;
%endB2 = vectorAdd(%startB2, %beam2);
%rayB2 = containerRayCast(%startB2, %endB2, $TypeMasks::fxBrickObjectType | $TypeMasks::TerrainObjectType | $Typemasks::VehicleObjectType, %obj);
if(isObject(%colA2 = firstWord(%rayA2)) && !isObject(%colB2 = firstWord(%rayB2)) && !%obj.isRotated)
{
if(%x < 5 && %x > 0)
{
%sideRotation = "0 0 -90";
}
if(%x > -5 && %x < 0)
{
%sideRotation = "0 0 90";
}
%obj.sideRotation = %sideRotation;
%obj.Rotate90();
return;
}
%new3 = vectorAdd(VectorScale(%ap,1),vectorScale(%vec,1));
%startA3 = vectorAdd(%ledgePos,%new3);
%beam3 = vectorScale(%sv,-0.5);
%endA3 = vectorAdd(%startA3, %beam3);
%rayA3 = containerRayCast(%startA3, %endA3, $TypeMasks::fxBrickObjectType | $TypeMasks::TerrainObjectType | $Typemasks::VehicleObjectType, %obj);
%startB3 = vectorAdd(%spacePos,%new3);
%endB3 = vectorAdd(%startB3, %beam3);
%rayB3 = containerRayCast(%startB3, %endB3, $TypeMasks::fxBrickObjectType | $TypeMasks::TerrainObjectType | $Typemasks::VehicleObjectType, %obj);
if(isObject(%colA3 = firstWord(%rayA3)) && !isObject(%colB3 = firstWord(%rayB3)))
{
if(!isObject(%colA = firstWord(%rayA)) || isObject(%colB = firstWord(%rayB)))
{
%newVector = vectorAdd(vectorScale(%ap2,0.8),vectorScale(%vec,1));
%start = vectorAdd(%obj.getHackPosition(),%newVector);
initContainerBoxSearch(%start, "1.3 1.3 1.6", $TypeMasks::fxBrickObjectType | $TypeMasks::TerrainObjectType | $Typemasks::VehicleObjectType);
%colD = containerSearchNext();
if(!isObject(%colD) && !%obj.isRotated)
{
if(%x < 5 && %x > 0)
{
%sideRotation = "0 0 90";
}
if(%x > -5 && %x < 0)
{
%sideRotation = "0 0 -90";
}
%add = vectorAdd(%pos,"0 0 0.0");
%obj.setVelocity("0 0 0");
%obj.setTransform(vectorAdd(%add,%newVector));
%obj.sideRotation = %sideRotation;
%obj.Rotate90();
return;
}
}
}
}
if(!isObject(%colA = firstWord(%rayA)) || isObject(%colB = firstWord(%rayB)))
{
if(isObject(%colC = firstWord(%rayC)) && !isObject(%colC = firstWord(%rayD)))
{
if(!%obj.isRotated)
{
%obj.setTransform(vectorAdd(%pos,%sp));
}
}
}
}
}

79
General Discussion / RTB Down?
« on: May 25, 2013, 12:38:24 AM »
Website does not work, and I can't sign in inGame. I tried flushing my DNS and trouble shooting the network even specifically for the website. But it says that the problem is the website. Every other site works. And Blockland connects to everything fine.

80
Gallery / Weapon Ambidexterity
« on: May 17, 2013, 12:22:43 PM »
Here's a video of a mod I've been working on for a couple days: Click Here

81
Modification Help / Left Horizontal Offset?
« on: May 15, 2013, 02:50:18 PM »
Doesn't seem to work. I think Badspot didn't make this.

Code: [Select]
datablock PlayerData(PlayerUnchartedAim : PlayerUnchartedHip)
{
minLookAngle = -1;
cameraMaxDist = 2;

maxForwardSpeed = 4;
maxBackwardSpeed = 4;
maxSideSpeed = 4;

uiName = "";
};
datablock PlayerData(PlayerUnchartedAimLeft : PlayerUnchartedAim)
{
cameraHorizontalOffset = -0.526; //0.8; //0.5245;

uiName = "";
};
Should work, logically. But...
this is what happens ingame. Basically negative cameraHorizontalOffset defaults to 0 inGame.

82
Modification Help / getNodeColor? [Solved]
« on: May 10, 2013, 02:15:48 PM »
I need a function to check what color a node is. I want to change the node's color, then change it back later.

83
Gallery / Uncharted 3 Climbing Mod
« on: May 09, 2013, 07:13:59 PM »
This is some footage of the ledge climbing mod I have been working on. Video

84
Modification Help / Increase Variable onClick [Solved]
« on: May 08, 2013, 08:28:28 AM »
I want to make a script where every time I call the function it increases a variable by 1. So for example: I click once, it goes from 0 to 1; I click again it goes from 1 to 2, etc.

85
Modification Help / Health Multiplier of less than 1? [Solved]
« on: April 29, 2013, 06:05:34 PM »
The multiplier just doesn't seem to work. It works fine with anything above 1.
Code: [Select]
%damage = %this.directDamage * 0.5 - %this.directDamage;
%damageType = $DamageType::Direct;
if(%this.directDamageType)
{
%damageType = %this.directDamageType;
}
%col.damage(%obj,%pos,%damage,%damageType);

86
Modification Help / Autodesk 3ds Max Design 2013 x64
« on: April 27, 2013, 09:33:47 AM »
How do I export to Blockland from this version of 3ds Max?

87
Modification Help / No Tilt When Looking Up or Down
« on: April 21, 2013, 04:03:39 PM »
How, if possible, do I stop the tilting animation played when you look up or down? Basically I want your player to stand straight up regardless of whether or not you're looking up or down. You know, as if there was an object both in front of and behind you.

88
Modification Help / Get Horizontal Rotation of a Transform
« on: April 13, 2013, 11:32:43 AM »
I need to get the, I think, Z rotation of an object so I can rotate the player precisely on the relative X axis. Basically I want to get the left, right rotation specifically, so I can face the player down based on that instead of where the player currently is, rotation and all. %obj.getPosition(); works but it doesn't include the left, right rotation.

89
Modification Help / Package Doesn't Work [Solved]
« on: April 10, 2013, 03:14:59 AM »
I am completely blown away that this does not work.
Code: [Select]
package PhysicsJump
{
function Armor::onTrigger(%data,%obj,%slot,%val)
{
Parent::onTrigger(%data,%obj,%slot,%val);
if(%slot == 2)
{
talk("onJump called");
%obj.isSpacing = %val;
if(%obj.isSpacing && %data.canPhysicsJump)
{
%obj.schedule(100,startPhysicsJumping);
}
}
}
};activatePackage(PhysicsJump);
The talk(); isn't even called. I have no clue what's going on.

90
Modification Help / Rotate Orbit Camera [Solved]
« on: April 08, 2013, 07:07:08 PM »
I want the camera to face me when I spawn it. I've got the code working already, but I don't know how to rotate the cam.
Code: [Select]
%pos = %obj.getEyeTransform();
%camera = %obj.client.camera;
%camera.setOrbitMode(%obj, %pos, 0.5, 8, 2, 1);
%camera.mode = "Orbit";
%obj.client.setControlObject(%camera);

Pages: 1 2 3 4 5 [6] 7 8 9 10 11 ... 13