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

Pages: [1] 2 3 4 5
1
Modification Help / Get client from player.
« on: May 02, 2010, 05:33:43 PM »
Any idea how to do this?

2




My server is an infinite mining server, with a deathmatch built in. With the money you get from mining you can buy tools to build better bases and weapons to defend/attack with. Though it's usually pretty peaceful and you can make teams if you wish. You start with a pickaxe at level one and a trowel. The pickaxe can be upgraded with /upgradepick and the trowel will create one block of a random type where you choose for eight dollars.

Other tools include:

Pickaxe -- Basic mining tool, upgradeable.
Trowel -- Basic building tool, 7$ to build a dirt cube 10$ for a rock cube. /placerock to choose rock /placedirt to choose dirt
E.R.T. -- Also called the Laz.Man. it costs 1250$ and can instantly plow though all ores even lava but doesn't pay you back. /ert to buy
Pistol -- It's a pistol, you kill with it. 175$       /buygun to buy
Knife -- Butterfly Kinfe, costs 25$. /buyknife to buy
Sniper -- A sniper rifle, costs 300$. /buysniper to buy
Light -- Dur a light. 25$ /buylight to buy
Lavasuit -- A lavasuit, prevents you from dieing when you touch lava blocks. 1500$ /buylavasuit to buy

Block types include:

Dirt --
Rock --

Iron --
Copper --
Tin --

Zinc --
Alumnium --
Nickel --

Gold --
Silver--

Platnium --
Pallidium --

Urainium --
Tarznium --

You can also get certain gems from certain ores, these include:

Diamond -- Has a 1:50 chance of getting it from all block types mined including dirt, is worth 25$.


DONATE BY SAYING /donate <player name> <amount>
Check your money by saying /checkmoney


Any questions?
And how do I make one of those server status images?



V 2.1
-gun price lowered to 175$ from 200$
-value of ores rasied a bit

V2.3
-ERT improved
-Urainium added.

V2.5
Now the game saves your cash.

V2.6
Diamonds added
Price to build reduced from 50$ to 8$

v2.8
New "classes" added, different layers of the game where if you go deep enough the chances of getting ores change.

V 3
Pickaxe level saves now.
Pickaxe max level increase to 10.
New serface/land level 400 bricks high above spawn.
New ores.

3
Code: [Select]
function serverCmdBuyGun(%client)
{
%player = %client.player;

   for(%i = 0; %i < %player.getDatablock().maxTools; %i++)
   {
      %tool = %player.tool[%i];
      if(%tool == 0)
    {

         %player.tool[%i] = TF2PistolImage;
         %player.weaponCount++;
messageClient(%client,'MsgItemPickup','',%i,TF2PistolItem);
break;    
}
}
}

Any ideas why?



Never mind, apparently you have to use some nametoid function on the datablock names.

4
Modification Help / Gamemode_Farming
« on: April 30, 2010, 05:23:18 PM »
So I have decided to take up the task of making a farming gamemode. And yes, I do realize that there is the Farming RP mod out, but although I have seen it working a bit, I'm pretty sure it was abondened by killer2 at least a month ago. The basic framework for this game mode is to have a wide variety of plants and crops you can grow. Each player will start with X (probally 10) seeds of a random crop and some money. They will have to pay money to "plow fields" which is building an 8x8 plate to grow plants on. Then they will have to "plant" their seed on a field of theirs. After a while it will grow and depending on it's maturity level (sprouting, growing, ripe, overripe, etc.) it will yield seeds/fruit/crop that you can use to replant or sell. Not to mention there will probably be other things to spend your money on, like irrigation and houses and weapons and such. Unless I lose my internet or something, I expect to have public testing within a few hours and a prototype/beta version out in 24 hours. And no I have never played farmville or farmtown, just fyi.

5
Modification Help / locked
« on: April 20, 2010, 03:32:16 PM »
.

6
As I look though servers to find a game to play I notice a lot of free builds, a lot of rp games, and a lot of freebuild places, there are also other fads which seem to come and go in server themes. So, I was thinking, what if there was a mod that let server hosts bring up a gui which had a few preset place types (other/none being an option) that they could choose from. (radio button style) And to the player the servers list had another column that let you sort places by these types. (freebuild dm and rpg to name the most likely choices)

I almost would expect this to be something that's proposed to go on the RTB mod, but if it doesn't I'd try to take it on my self as a project. I've been doing php and C++ for a long time, so a server isn't a real problem here, I was just wondering if this was a good idea or if anyone's working on it yet?

7
Modification Help / Weapon_Faytsjard (wip)
« on: April 18, 2010, 04:39:28 PM »
TEST MODEL: http://www.filefront.com/16165269Weapon_Fytsjard.zip

To be short about it, basically I'm making a sniper class/type weapon, except it shoots four projectiles at once. The gun will have it's own projectile and gun models, and each shot will be capable of a kill. Not a lot to say really, so I'll show pictures of what it looks like now:

The gun as it is atm:    (gonna change the model a lot though   FIRST CHANGE)


The projectiles coming from the gun:     (using default gun projectile model atm)


Any suggestions welcome, don't flame too much as I practically just started it.

(note that the angle for showing the model is horrible and you can't really see much, sorry)


EDIT: Changed the first picture.

8
First, my code at this time a heavy modification of the guns_akimbo mod:

Code: [Select]
//akimbogun.cs

//we'll only get this far if we actually have the gun add-on
//  so it's safe to directly use stuff from that
//AddDamageType(<name>, <Self Delete message>, <kill message>, <vehicle damage scale>, <is direct damage>);
AddDamageType("AkimboGun",   '<bitmap:add-ons/Weapon_Guns_Akimbo/CI_2guns> %1',    '%2 <bitmap:add-ons/Weapon_Guns_Akimbo/CI_2guns> %1',0.05,1);
datablock ProjectileData(akimboGunProjectile)
{
   projectileShapeName = "add-ons/Weapon_Gun/bullet.dts";
   directDamage        = 30;
   directDamageType    = $DamageType::AkimboGun;
   radiusDamageType    = $DamageType::AkimboGun;

   brickExplosionRadius = 0;
   brickExplosionImpact = true;          //destroy a brick if we hit it directly?
   brickExplosionForce  = 10;
   brickExplosionMaxVolume = 1;          //max volume of bricks that we can destroy
   brickExplosionMaxVolumeFloating = 2;  //max volume of bricks that we can destroy if they aren't connected to the ground

   impactImpulse      = 0;
   verticalImpulse   = 0;
   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";

   uiName = "Akimbo Gun Bullet";
};

//////////
// item //
//////////
datablock ItemData(AkimboGunItem)
{
category = "Weapon";  // Mission editor category
className = "Weapon"; // For inventory system

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

//gui stuff
uiName = "Guns Akimbo";
iconName = "./Icon_2guns";
doColorShift = true;
colorShiftColor = "0.1 0.1 0.2 1.000";

// Dynamic properties defined by the scripts
image = AkimboGunImage;
canDrop = true;
};

////////////////
//weapon image//
////////////////
datablock ShapeBaseImageData(AkimboGunImage)
{
   // Basic Item properties
   shapeFile = "Add-Ons/Weapon_Gun/pistol.dts";
   emap = true;

   // Specify mount point & offset for 3rd person, and eye offset
   // for first person rendering.
   mountPoint = 0;
   offset = "0 0 0";
   eyeOffset = 0; //"0.7 1.2 -0.5";
   rotation = eulerToMatrix( "0 0 0" );

   // When firing from a point offset from the eye, muzzle correction
   // will adjust the muzzle vector to point to the eye LOS point.
   // Since this weapon doesn't actually fire from the muzzle point,
   // we need to turn this off. 
   correctMuzzleVector = true;

   // Add the WeaponImage namespace as a parent, WeaponImage namespace
   // provides some hooks into the inventory system.
   className = "WeaponImage";

   // Projectile && Ammo.
   item = BowItem;
   ammo = " ";
   projectile = akimboGunProjectile;
   projectileType = Projectile;

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

   //melee particles shoot from eye node for consistancy
   melee = false;
   //raise your arm up or not
   armReady = true;

   doColorShift = true;
   colorShiftColor = AkimboGunItem.colorShiftColor;//"0.400 0.196 0 1.000";

   //casing = " ";

   // Images have a state system which controls how the animations
   // are run, which sounds are played, script callbacks, etc. This
   // state system is downloaded to the client so that clients can
   // predict state changes and animate accordingly.  The following
   // system supports basic ready->fire->reload transitions as
   // well as a no-ammo->dryfire idle state.

   // Initial start up state
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "Ready";
stateTimeoutValue[0] = 0.2;
stateSequence[0] = "ready";

stateName[1] = "Ready";
stateSequence[1] = "ready";
stateTransitionOnTriggerDown[1] = "Fire";

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

stateName[5] = "FireAkimbo";
stateTimeoutValue[5] = 0.00;
stateScript[5] = "onFireAkimbo";
stateTransitionOnTimeOut[5] = "FireTop";

stateName[6] = "FireTop";
stateTimeoutValue[6] = 2;
stateScript[6] = "onFireTop";
stateTransitionOnTimeOut[6] = "ready";
};


function AkimboGunImage::onFireAkimbo(%this,%obj,%slot)
{
   %obj.setImageTrigger(1,1);
}

function AkimboGunImage::onFireTop(%this,%obj,%slot)
{
   %obj.setImageTrigger(2,1);

   %obj.setImageTrigger(1,2);
}

datablock ShapeBaseImageData(TopHandedGunImage)
{
   // Basic Item properties
   shapeFile = "Add-Ons/Weapon_Gun/pistol.dts";
   emap = true;

   // Specify mount point & offset for 3rd person, and eye offset
   // for first person rendering.
   mountPoint = 1;
   offset = "0.5 0 1";
   eyeOffset = 0; //"0.7 1.2 -0.5";
   rotation = eulerToMatrix( "0 0 0" );

   // When firing from a point offset from the eye, muzzle correction
   // will adjust the muzzle vector to point to the eye LOS point.
   // Since this weapon doesn't actually fire from the muzzle point,
   // we need to turn this off. 
   correctMuzzleVector = true;

   // Add the WeaponImage namespace as a parent, WeaponImage namespace
   // provides some hooks into the inventory system.
   className = "WeaponImage";

   // Projectile && Ammo.
   item = BowItem;
   ammo = " ";
   projectile = akimboGunProjectile;
   projectileType = Projectile;

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

   //melee particles shoot from eye node for consistancy
   melee = false;
   //raise your arm up or not
   armReady = false;

   doColorShift = true;
   colorShiftColor = AkimboGunItem.colorShiftColor;//"0.400 0.196 0 1.000";

   //casing = " ";

   // Images have a state system which controls how the animations
   // are run, which sounds are played, script callbacks, etc. This
   // state system is downloaded to the client so that clients can
   // predict state changes and animate accordingly.  The following
   // system supports basic ready->fire->reload transitions as
   // well as a no-ammo->dryfire idle state.

   // Initial start up state
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "Ready";
stateTimeoutValue[0] = 0.2;
stateSequence[0] = "ready";
   stateSound[0] = weaponSwitchSound;

stateName[1] = "Ready";
stateSequence[1] = "ready";
stateTransitionOnTriggerDown[1] = "Fire";

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

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

stateName[4] = "Reload";
stateAllowImageChange[4] = false;
stateTransitionOnTriggerUp[4] = "Ready";
stateSequence[4] = "ready";


};


datablock ShapeBaseImageData(BottomHandedGunImage)
{
   // Basic Item properties
   shapeFile = "Add-Ons/Weapon_Gun/pistol.dts";
   emap = true;

   // Specify mount point & offset for 3rd person, and eye offset
   // for first person rendering.
   mountPoint = 1;
   offset = "0.5 0 -1";
   eyeOffset = 0; //"0.7 1.2 -0.5";
   rotation = eulerToMatrix( "0 0 0" );

   // When firing from a point offset from the eye, muzzle correction
   // will adjust the muzzle vector to point to the eye LOS point.
   // Since this weapon doesn't actually fire from the muzzle point,
   // we need to turn this off. 
   correctMuzzleVector = true;

   // Add the WeaponImage namespace as a parent, WeaponImage namespace
   // provides some hooks into the inventory system.
   className = "WeaponImage";

   // Projectile && Ammo.
   item = BowItem;
   ammo = " ";
   projectile = akimboGunProjectile;
   projectileType = Projectile;

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

   //melee particles shoot from eye node for consistancy
   melee = false;
   //raise your arm up or not
   armReady = false;

   doColorShift = true;
   colorShiftColor = AkimboGunItem.colorShiftColor;//"0.400 0.196 0 1.000";

   //casing = " ";

   // Images have a state system which controls how the animations
   // are run, which sounds are played, script callbacks, etc. This
   // state system is downloaded to the client so that clients can
   // predict state changes and animate accordingly.  The following
   // system supports basic ready->fire->reload transitions as
   // well as a no-ammo->dryfire idle state.

   // Initial start up state
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "Ready";
stateTimeoutValue[0] = 0.2;
stateSequence[0] = "ready";
   stateSound[0] = weaponSwitchSound;

stateName[1] = "Ready";
stateSequence[1] = "ready";
stateTransitionOnTriggerDown[1] = "Fire";

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

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

stateName[4] = "Reload";
stateAllowImageChange[4] = false;
stateTransitionOnTriggerUp[4] = "Ready";
stateSequence[4] = "ready";


};


datablock ShapeBaseImageData(LeftHandedGunImage)
{
   // Basic Item properties
   shapeFile = "Add-Ons/Weapon_Gun/pistol.dts";
   emap = true;

   // Specify mount point & offset for 3rd person, and eye offset
   // for first person rendering.
   mountPoint = 1;
   offset = "0 0 0";
   eyeOffset = 0; //"0.7 1.2 -0.5";
   rotation = eulerToMatrix( "0 0 0" );

   // When firing from a point offset from the eye, muzzle correction
   // will adjust the muzzle vector to point to the eye LOS point.
   // Since this weapon doesn't actually fire from the muzzle point,
   // we need to turn this off. 
   correctMuzzleVector = true;

   // Add the WeaponImage namespace as a parent, WeaponImage namespace
   // provides some hooks into the inventory system.
   className = "WeaponImage";

   // Projectile && Ammo.
   item = BowItem;
   ammo = " ";
   projectile = akimboGunProjectile;
   projectileType = Projectile;

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

   //melee particles shoot from eye node for consistancy
   melee = false;
   //raise your arm up or not
   armReady = false;

   doColorShift = true;
   colorShiftColor = AkimboGunItem.colorShiftColor;//"0.400 0.196 0 1.000";

   //casing = " ";

   // Images have a state system which controls how the animations
   // are run, which sounds are played, script callbacks, etc. This
   // state system is downloaded to the client so that clients can
   // predict state changes and animate accordingly.  The following
   // system supports basic ready->fire->reload transitions as
   // well as a no-ammo->dryfire idle state.

   // Initial start up state
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "Ready";
stateTimeoutValue[0] = 0.2;
stateSequence[0] = "ready";
   stateSound[0] = weaponSwitchSound;

stateName[1] = "Ready";
stateSequence[1] = "ready";
stateTransitionOnTriggerDown[1] = "Fire";

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

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

stateName[4] = "Reload";
stateAllowImageChange[4] = false;
stateTransitionOnTriggerUp[4] = "Ready";
stateSequence[4] = "ready";


};

function LeftHandedGunImage::onFire(%this, %obj, %slot)
{
   Parent::onFire(%this,%obj,%slot);
   if(%obj.getDamagePercent() < 1.0)
%obj.playThread(2, leftrecoil);
}

function AkimboGunImage::onMount(%this, %obj, %slot)
{
   Parent::onMount(%this, %obj, %slot);
   //mount lefthanded gun
   %obj.mountImage(LeftHandedGunImage, 1);
   %obj.mountImage(TopHandedGunImage, 2);
   %obj.mountImage(BottomHandedGunImage, 3);
}
function AkimboGunImage::onUnMount(%this, %obj, %slot)
{
   Parent::onUnMount(%this, %obj, %slot);
   //unmount lefthanded gun
   %obj.unMountImage(1);
}


function LeftHandedGunImage::onMount(%this, %obj, %slot)
{
   Parent::onMount(%this, %obj, %slot);
   %obj.playThread(1, armreadyboth);
   %obj.playThread(2, armreadyboth);
   %obj.playThread(3, armreadyboth);
}
function LeftHandedGunImage::onUnMount(%this, %obj, %slot)
{
   Parent::onUnMount(%this, %obj, %slot);
}

function AkimboGunImage::onFire(%this,%obj,%slot)
{
if(%obj.getDamagePercent() < 1.0)
%obj.playThread(2, shiftAway);
Parent::onFire(%this,%obj,%slot);

   %obj.setImageTrigger(1,1);

   %obj.setImageTrigger(2,1);

   %obj.setImageTrigger(3,1);
}

I was wondering if anyone could help me make a projectile shoot from all four gunimages consistently. (as in, with I fire it)

9
Modification Help / A new weapon idea I might start working on.....
« on: April 10, 2010, 11:19:51 PM »
               In short I was think of making a more realistic (fairer) version of the Rocket Launcher. I realize there already are a few variations, like the RPG-7 and such (which I though was on the Crapons list), but I wanted to make a rocket launcher type weapon that you could put in any TDM without ruining your game because everyone will just choose it and it'll turn into people going around firing rockets off at anything that moves.

                So, I'll probably be creating a bigger, heavier rocket launcher that has more recoil and a longer reload time, possibly even limited shots per item, in an effort to balance it out with some of the more commonly accepted TDM/CTF weapons. Not to mention changing the damage on the new weapon so it doesn't allow you to super jump with it, as that just not only adds to, but doubles over the attraction of it over any other weapon that might be available. I'll probably be taking this change to practice modeling, as I didn't start too long ago, and will be making the projectile and weapon models over again.

                So, can anyone think of any other rocket launcher type weapons that exist other than the RPG? And does this sound like a horrible idea?


tl;dr    Anyone think I should make a more realistic (less overpowered/new models) version of the rocket launcher, so it might become a way to make a rocket launcher type weapon feasible in TDM type games without unbalancing classes and such?

10
Modification Help / Changeing the intial position of a fired bullet.
« on: April 09, 2010, 03:14:54 PM »
I was playing around with a shotgun script and was able to take off the spread of the gun, making it fire accurately. I then took out the for function, to make it shoot only one bullet, I copied the code that seems to create the bullet, and pasted it again, thus hopefully making it shoot two bullets. In the code there's two bolded lines, (bolding dosn't work in code) and I thought they'd make one of the bullets start off higher when it was fired but it didn't. Can anyone explain how to change the in ital position of a bullet?

Edit, the code I tried to change position is here:
Code: [Select]

%addvector = MatrixCreateFromEuler(0 @ " " @ 1 @ " " @ 0);
%shotvector =  VectorAdd(%addvector,%obj.getMuzzlePoint(%slot));

%p = new (%this.projectileType)()
{
dataBlock = %projectile;
initialVelocity = %velocity;
initialPosition = %shotvector;
sourceObject = %obj;
sourceSlot = %slot;
client = %obj.client;
};

And this is it in a bigger context:


Code: [Select]

%vector = %obj.getMuzzleVector(%slot);
%objectVelocity = %obj.getVelocity();
%vector1 = VectorScale(%vector, %projectile.muzzleVelocity);
%vector2 = VectorScale(%objectVelocity, %projectile.velInheritFactor);
%velocity = VectorAdd(%vector1,%vector2);
%x = (0) * 10 * 3.1415926 * %spread;
%y = (0) * 10 * 3.1415926 * %spread;
%z = (0) * 10 * 3.1415926 * %spread;
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%velocity = MatrixMulVector(%mat, %velocity);

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

%vector = %obj.getMuzzleVector(%slot);
%objectVelocity = %obj.getVelocity();
%vector1 = VectorScale(%vector, %projectile.muzzleVelocity);
%vector2 = VectorScale(%objectVelocity, %projectile.velInheritFactor);
%velocity = VectorAdd(%vector1,%vector2);
%x = (2) * 10 * 3.1415926 * %spread;
%y = (2) * 10 * 3.1415926 * %spread;
%z = (2) * 10 * 3.1415926 * %spread;
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%velocity = MatrixMulVector(%mat, %velocity);

%addvector = MatrixCreateFromEuler(0 @ " " @ 1 @ " " @ 0);
%shotvector =  VectorAdd(%addvector,%obj.getMuzzlePoint(%slot));

%p = new (%this.projectileType)()
{
dataBlock = %projectile;
initialVelocity = %velocity;
initialPosition = %shotvector;
sourceObject = %obj;
sourceSlot = %slot;
client = %obj.client;
};

11
Just wondering, because as far as I know I haven't seen any weapon that does this.....
If so, any tutorials on that, or weapon script in general?

12
So I have a function that takes a position as it's argument.
And I have this line of code:
Code: [Select]
registerOutputEvent("fxDTSBrick","NoaddAirstrikePlaneClient");
That can trigger the event, but how would I get it to pass the bricks position as the first argument of the function?

13
Modification Help / Supply Drop?
« on: April 02, 2010, 08:45:07 AM »
EDIT:
New video:
http://www.youtube.com/watch?v=3WrnufMVdNQ


First of all, has there been any mod that basically is an item that you can toss like an artillery beacon and have something drop supplies down where you throw the beacon?

Second, I have started to make something like that, because I really couldn't find anything like it. I started with the weapon_airstrike mod, I changed the name and all and deleted the part that spawned the rockets from the plane, and added in a few functions of my own in it's place. So now I have a mod that adds an item like the airstrike beacon to the game, (Weapon_Air_Supply_Drop) and when you throw it a plane comes by and drops 3 pills and 2 guns (of your choice) in a line near by. I even have gone so far as to make events for it, so you could set up a brick to automatically send supply drop requests and such.

(There's also messages that will say "Supply Drop Complete!" when it's done, and ones that will say that a supply drop has been requested by <name> )

So I wanted to know, is it worth me working on this, as in, is this a good idea, and has it been made before?

(I was going to have the plane drop a box that could be opened the release good which the super admin could change what would be in the drop in RTB preferences)

14
So I've created a brick type, OilSource with it's code below:

Code: [Select]
datablock fxDtsBrickData(brick8x8Data)
{
category = "Bricks";
subcategory = "Oil Mod";

uiName = "Oil Source";

specialBrickType = "";

adminOnly = 1;
};

And I want to make it so when you click it (activate) it will automatically, lets say, make a message appear on your screen. (center message) I didn't really want to do this with simply adding events in though, I wanted to do it more like the employment/banking bricks in the RP mod. And yes, I tried to look though the code but when I did nothing I tried to use there worked. For example:

Code: [Select]
datablock fxDtsBrickData(PipeDat : brick2x4Data)
{
category = "Bricks";
subcategory = "Oil Mod";

uiName = "Pipeline";

specialBrickType = "";

adminOnly = 0;
};

function PipeDat::Activate(%datablock, %client)
{
messageClient(%client, '', "\c3Employment Office");
messageClient(%client, '', "\c31. \c6Job list");
messageClient(%client, '', "\c32. \c6Specify job");
messageClient(%client, '', "\c33. \c6Get job");
return true;
}

Doesn't do anything when I click a "Pipe" brick.

15
My name is a sware there!


I used to play before the whole "Azjherbeniex" thing existed under "Akkida" or "The Best1136" but I stopped when I turned 10 or 11. I should have stopped when I was 8 or 9 lol.


So, I haven't played in almost 4 years now and to show how much is changed sence then... the name I use everywhere is censored!


Pages: [1] 2 3 4 5