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 - Bizzarre

Pages: [1]
1
Modification Help / Changing animation speed.
« on: November 10, 2010, 08:03:01 PM »
As I return to blockland I want to make something to brush up on my old add-on making skills. I simply wanted to take the normal gun, edit the model a bit and add an ammo, headshot support, and iron sight. But I already ran into a problem that I should know the answer to. Last time I made some sort of animated item, all I had to do was change the "stateTimeoutValue" code segment to change the animation speed (the animations name is reload), but all it does now is wait 1.7 seconds after I fire, then plays the animation slowly. Was there some sort of a change in the blockland engine since I last played in V16 or am I just doing something wrong?


Code: [Select]
//AmmoGun.cs

AddDamageType("AmmoGun",   '<bitmap:add-ons/Weapon_Gun/CI_gun> %1',    '%2 <bitmap:add-ons/Weapon_Gun/CI_gun> %1',0.2,1);
datablock ProjectileData(AmmoGunProjectile)
{
   projectileShapeName = "add-ons/Weapon_Gun/bullet.dts";
   directDamage        = 30;
   directDamageType    = $DamageType::AmmoGun;
   radiusDamageType    = $DamageType::AmmoGun;

   brickExplosionRadius = 0;
   brickExplosionImpact = true;       
   brickExplosionForce  = 10;
   brickExplosionMaxVolume = 1;       
   brickExplosionMaxVolumeFloating = 2; 

   impactImpulse      = 400;
   verticalImpulse   = 400;
   explosion           = gunExplosion;
   particleEmitter     = "";

   muzzleVelocity      = 90;
   velInheritFactor    = 1;

   armingDelay         = 00;
   lifetime            = 4000;
   fadeDelay           = 3500;
   bounceElasticity    = 0.5;
   bounceFriction      = 0.20;
   isBallistic         = false;
   gravityMod = 0.0;

   hasLight    = false;
   lightRadius = 3.0;
   lightColor  = "0 0 0.5";
};

datablock ItemData(AmmoGunItem)
{
category = "Weapon";
className = "Weapon";

shapeFile = "Add-Ons/Weapon_Gun/pistol.dts";
rotate = false;
mass = 1;
density = 0.2;
elasticity = 0.2;
friction = 0.6;
emap = true;

uiName = "Ammo Gun";
iconName = "add-ons/Weapon_Gun/icon_gun";
doColorShift = true;
colorShiftColor = "0.25 0.25 0.25 1.000";

image = AmmoGunImage;
canDrop = true;
};

datablock ShapeBaseImageData(AmmoGunImage)
{
   shapeFile = "./AmmoGun.dts";
   emap = true;

   mountPoint = 0;
   offset = "0 0 0";
   eyeOffset = 0; //"0.7 1.2 -0.5";
   rotation = eulerToMatrix( "0 0 0" );
 
   correctMuzzleVector = true;

   className = "WeaponImage";

   item = BowItem;
   ammo = " ";
   projectile = AmmoGunProjectile;
   projectileType = Projectile;

casing = gunShellDebris;
shellExitDir        = "1.0 -1.3 1.0";
shellExitOffset     = "0 0 0";
shellExitVariance   = 15.0;
shellVelocity       = 7.0;

   melee = false;
   armReady = true;

   doColorShift = false;
   colorShiftColor = "0.400 0.196 0 1.000";

   //casing = " ";

stateName[0]                     = "Activate";
stateTimeoutValue[0]             = 0.15;
stateTransitionOnTimeout[0]       = "Ready";
stateSound[0] = weaponSwitchSound;

stateName[1]                     = "Ready";
stateTransitionOnTriggerDown[1]  = "Fire";
stateAllowImageChange[1]         = true;
stateSequence[1] = "Ready";

stateName[2]                    = "Fire";
stateTransitionOnTimeout[2]     = "Smoke";
stateTimeoutValue[2]            = 0.14;
stateFire[2]                    = true;
stateAllowImageChange[2]        = false;
stateSequence[2]                = "Fire";
stateScript[2]                  = "onFire";
stateWaitForTimeout[2] = true;
stateEmitter[2] = gunFlashEmitter;
stateEmitterTime[2] = 0.05;
stateEmitterNode[2] = "muzzleNode";
stateSound[2] = gunShot1Sound;
stateEjectShell[2]       = true;

stateName[3] = "Smoke";
stateEmitter[3] = gunSmokeEmitter;
stateEmitterTime[3] = 0.05;
stateEmitterNode[3] = "muzzleNode";
stateTimeoutValue[3]            = 0.01;
stateTransitionOnTimeout[3]     = "Reload";

stateName[4] = "Reload";
stateSequence[4]                = "Reload";
stateTransitionOnTimeout[4]     = "Wait";
stateTimeoutValue[2]            = 1.7;
stateSequence[4] = "Reload";

stateName[5] = "Wait";
stateTransitionOnTriggerUp[5]     = "Ready";

};

function AmmoGunImage::onFire(%this,%obj,%slot)
{
if(%obj.getDamagePercent() < 1.0)
%obj.playThread(1, shiftUp);
Parent::onFire(%this,%obj,%slot);
}

function AmmoGunImage::onMount(%this, %obj, %slot)
{
   Parent::onMount(%this, %obj, %slot);
   %obj.playThread(2, armreadyboth);
   
   %obj.hideNode("lhand");
   %obj.hideNode("rhand");
   %obj.hideNode("lhook");
   %obj.hideNode("rhook");
   
}

function AmmoGunImage::onUnMount(%this, %obj, %slot)
{
   Parent::onUnMount(%this, %obj, %slot);
   
   if(isObject(%obj.client))
   {
      %obj.client.applyBodyParts();
      %obj.client.applyBodyColors();
   }
   else
   {
      %obj.unHideNode("lhand");
      %obj.unHideNode("lhook");
   }
   
}

Just throwing in a picture so you have an idea as to what my goal is:

2
Modification Help / Milkshape 3d reference model.
« on: August 29, 2010, 07:59:20 PM »
Does anyone happen to have a download link for the ms3d blockhead reference model? The old link is broken.

3
Modification Help / Warning script
« on: March 13, 2010, 12:27:46 AM »
Im trying scripting out and Ive decided to make a warning script for personal uses. Later I will make is so it bans you on second warning but for now this is all I've got:

Code: [Select]
function serverCmdWarn (%client,%target)
{
if(%client.isAdmin == true && isObject (findclientbyname(%target)))
{
messageall(c2/"@%client.name@" has warned ",findclientbyname(%target).name@".");
}
}

But the message doesn't show up. Where did I go wrong?

4
Drama / Light and Day- ego trip
« on: March 12, 2010, 09:07:07 AM »
This guy seems to be convinced he is some respected scripter. He spues out stupid stuff in order to measure his internet snake. Looking at his profile and posts you can see he's a handicap.

http://forum.blockland.us/index.php?action=profile;u=25908

No I havnt had any friction with him, I just don't like him.

5
General Discussion / asdf and posting pics of others avitars.
« on: February 25, 2010, 02:34:32 PM »
Apparently I havnt been researching my internet slang because I have yet to understand what "asdf" means. I also don't get why some peoples responses are posting pics of other peoples avitars. Could someone fill in the blanks for me?

6
Modification Help / unmount object error
« on: February 19, 2010, 06:54:36 PM »
I tried changing my lego spear to throwing it on charged fire. I wanted it to unmount from your and on the charged fire so I simply added the unmount object script, but it gives me an error. I dont know enough about scripting yet to understand my mistake.

Heres the code:
Code: [Select]
function lkspImage::onChargedFire(%this,%obj,%slot)
{
if((%obj.lastFireTime+%this.minShotTime) > getSimTime())
return;
%obj.lastFireTime = getSimTime();
     
%obj.playThread(2, spearThrow);

%projectile = lkspchargeProjectile;
%spread = 0.0;
%shellcount = 1;

for(%shell=0; %shell<%shellcount; %shell++)
{
%vector = %obj.getMuzzleVector(%slot);
%objectVelocity = %obj.getVelocity();
%vector1 = VectorScale(%vector, %projectile.muzzleVelocity);
%vector2 = VectorScale(%objectVelocity, %projectile.velInheritFactor);
%velocity = VectorAdd(%vector1,%vector2);
%x = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
%y = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
%z = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%velocity = MatrixMulVector(%mat, %velocity);

%p = new (%this.projectileType)()
{
dataBlock = lkspchargeProjectile;
initialVelocity = %velocity;
initialPosition = %obj.getMuzzlePoint(%slot);
sourceObject = %obj;
sourceSlot = %slot;
client = %obj.client;
{
%obj.unMountImage(%slot);
};
MissionCleanup.add(%p);
}
return %p;
}
}

Heres the error:
Code: [Select]
Loading Add-On: Weapon_Legoknights (CRC:-876017223)
Add-Ons/Weapon_Legoknights/Weapon_lksp.cs Line: 254 - Syntax error.
>>> Some error context, with ## on sides of error halt:
^^%velocity = MatrixMulVector(%mat, %velocity);



^^%p = new (%this.projectileType)()

^^{

^^^dataBlock = lkspchargeProjectile;

^^^initialVelocity = %velocity;

^^^initialPosition = %obj.getMuzzlePoint(%slot);

^^^sourceObject = %obj;

^^^sourceSlot = %slot;

^^^client = %obj.client;

^^^{##
##
^^^^%obj.unMountImage(%slot);

^^^};

^^^MissionCleanup.add(%p);

^^}

^^return %p;

^}

}
>>> Error report complete.

7
Drama / Balshakaan is in serious denial
« on: February 19, 2010, 03:24:07 PM »
This guy is a stuck up ass hole. He denies any problem with his model if it takes time to fix. Then says he wants it to look like that. I doubt he has the knowledge to script his weapons beyond a sword with I different model.

Here's his original thread:
http://forum.blockland.us/index.php?topic=100041.0

8
Games / Call of duty "offensive" mission
« on: February 17, 2010, 02:57:12 PM »
I found it funny that some people consider shooting the civilians at the airport offensive. I've been killing innocent civilians in the land of san andreas for a long time. Russia even pulled it out of stores and they said it was a game for americans.

Discuss...

9
General Discussion / LSG link
« on: February 15, 2010, 01:40:12 PM »
Does anyone happen to have the old landscape generator link?

10
Modification Help / unmount player from vehicle on projectile collision?
« on: February 12, 2010, 09:26:21 AM »
I have tried countless times to create a script for my lego lance which knocks the player out their vehicles on projectile collision. But it never ends up well. Could someone help me with this?

11
General Discussion / Am I banned or not.
« on: February 08, 2010, 09:25:14 AM »
I'm messing around on the forums (on my phone) and it randomly says I'm banned for spamming. A couple minutes later, it goes away, then it comes back in a couple minutes. I don't understand.

Pages: [1]