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.


Messages - The Titanium

Pages: 1 ... 416 417 418 419 420 [421] 422 423 424 425 426 ... 450
6301
Modification Help / Re: Support_AmmoReserve - Ammo System
« on: September 03, 2010, 04:00:42 PM »
Space, is there a way to make a model produce emitters via function/script instead of using states?
For example, if I wanted an image to produce an emitter at WeaponImage::OnFire without using states?

6302
I believe it actually works now.
Code: [Select]
package AmmoReserve
{
function ItemData::onCollision(%this, %obj, %col, %a, %b, %c, %d, %e, %f)
{
if(%obj.weaponReserveLoaded >= 1 && (%col.getType() & $TypeMasks::PlayerObjectType))
{
echo("ONCOLLISION");
%col.pickup(%obj);
}
else
Parent::onCollision(%this, %obj, %col, %a, %b, %c, %d, %e, %f);
}
function ItemData::onPickup(%this,%obj,%user,%amt)
{
echo("hi");
%data = %obj.dataBlock;
%dropReserve = %obj.weaponReserveLoaded;
%p = %dropReserve / 100;
%addslot0 = %user.maxReserve[0] * %p;
%addslot1 = %user.maxReserve[1] * %p;
%addslot2 = %user.maxReserve[2] * %p;
%addslot3 = %user.maxReserve[3] * %p;
%addslot4 = %user.maxReserve[4] * %p;
if(%dropReserve >= 1)
{
//if(%user.tool[0].getID() !$= "" && %user.toolReserve[%user.tool[0]] !$= "")
//if(%user.getID[%user.tool[0]] !$= "" && %user.toolReserve[%user.tool[0]] !$= "")
if(%user.toolReserve[0] !$= "")
%user.toolReserve[0] += %addslot0;

if(%user.toolReserve[1] !$= "")
%user.toolReserve[1] += %addslot1;

if(%user.toolReserve[2] !$= "")
%user.toolReserve[2] += %addslot2;

if(%user.toolReserve[3] !$= "")
%user.toolReserve[3] += %addslot3;

if(%user.toolReserve[4] !$= "")
%user.toolReserve[4] += %addslot4;

echo("err");
%user.playAudio(0,ErrorSound);
%obj.delete();
schedule(10,0,ResetReserve,%user);
schedule(10,0,DisplayAmmo,%user);
return;
}
else
Parent::OnPickup(%this,%obj,%user,%amt);
}
function ItemData::onAdd(%this,%obj)
{
if($weaponReserveLoaded !$= "")
{
%obj.weaponReserveLoaded = $weaponReserveLoaded;
$weaponReserveLoaded = "";
echo("lol");
}
Parent::onAdd(%this,%obj);
}
function WeaponImage::onMount(%this, %obj, %slot)
{
if(%obj.currTool == -1 || %obj.toolReserve[%obj.currTool] $= "")
{
%obj.maxReserve[%obj.currTool] = %this.item.maxReserve;
%obj.dropReserve[%obj.currTool] = %this.item.dropReserve;
%obj.toolReserve[%obj.currTool] = %this.item.spawnReserve;
echo("onmount");
}
Parent::onMount(%this, %obj, %slot);
}
function servercmdDropTool(%client,%slot)
{
if(!isObject(%client.player))
return Parent::servercmdDropTool(%client,%slot);

//if(!isObject(%client.player.tool[%slot]) || %client.player.tool[%slot].maxReserve <= 0)
// return Parent::servercmdDropTool(%client,%slot);

//$weaponAmmoLoaded = %client.player.dropReserve[%client.player.currTool];
//if(%client.player.tool[%slot].dropReserve >= 0)
//if(%client.player.maxReserve[%client.player.currTool] == 800)
//$WeaponReserveLoaded = 1;
if(%client.player.dropReserve[%client.player.currTool] !$= "")
$WeaponReserveLoaded = %client.player.dropReserve[%client.player.currTool];

%client.player.maxReserve[%client.player.currTool] = "";
%client.player.dropReserve[%client.player.currTool] = "";
%client.player.toolReserve[%client.player.currTool] = "";
return Parent::servercmdDropTool(%client,%slot);
}
function ResetReserve(%this)
{
if(%this.toolReserve[0] > %this.maxReserve[0])
%this.toolReserve[0] = %this.MaxReserve[0];

if(%this.toolReserve[1] > %this.maxReserve[1])
%this.toolReserve[1] = %this.MaxReserve[1];

if(%this.toolReserve[2] > %this.maxReserve[2])
%this.toolReserve[2] = %this.MaxReserve[2];

if(%this.toolReserve[3] > %this.maxReserve[3])
%this.toolReserve[3] = %this.MaxReserve[3];

if(%this.toolReserve[4] > %this.maxReserve[4])
%this.toolReserve[4] = %this.MaxReserve[4];

if(%this.toolReserve[0] < 0)
%this.toolReserve[0] = 0;

if(%this.toolReserve[1] < 0)
%this.toolReserve[1] = 0;

if(%this.toolReserve[2] < 0)
%this.toolReserve[2] = 0;

if(%this.toolReserve[3] < 0)
%this.toolReserve[3] = 0;

if(%this.toolReserve[4] < 0)
%this.toolReserve[4] = 0;
}
function DisplayAmmo(%this)
{
%this.client.bottomprint("<just:right><color:FFFF00>Ammo <color:FFFFFF>:<color:FF0000>" SPC %this.toolReserve[%this.currTool], 3);
}
};activatePackage(AmmoReserve);

6303
Help / Re: I sent my key to the wrong email.
« on: September 02, 2010, 09:01:58 PM »
HAHAHA.
HAHA.
HA.
Dude, this is a "personal" issue. Searching will do nothing.

6304
dear god what am i doing
Code: [Select]
package ReserveAmmo
{
//function ItemData::onCollision(%this, %obj, %col, %a, %b, %c, %d, %e, %f)
//{
// if(%obj.weaponReserveLoaded == 1 && (%col.getType() & $TypeMasks::PlayerObjectType))
// {
// echo("ONCOLLISION");
// %col.pickup(%obj);
// }
// else
// Parent::onCollision(%this, %obj, %col, %a, %b, %c, %d, %e, %f);
//}
function Player::pickup(%this,%item)
{
echo("hi");
%p = %item.dropReserve / 100;
%addslot1 = %this.maxReserve[%this.tool[0]] * %p;
%addslot2 = %this.maxReserve[%this.tool[1]] * %p;
%addslot3 = %this.maxReserve[%this.tool[2]] * %p;
%addslot4 = %this.maxReserve[%this.tool[3]] * %p;
%addslot5 = %this.maxReserve[%this.tool[4]] * %p;
%data = %item.dataBlock;
%ammo = %item.weaponReserveLoaded;
%val = Parent::pickup(%this,%item);
//if(%data.dropReserve > 0 && isObject(%this.client) && %item.weaponReserveLoaded == 1)// && %val == 1)
if(%item.weaponReserveLoaded == 1)
{
if(%this.tool[0].getID() !$= "" && %this.toolReserve[%this.tool[0]] !$= "")
%this.toolReserve[0] += %addslot1;

if(%this.tool[1].getID() !$= "" && %this.toolReserve[%this.tool[1]] !$= "")
%this.toolReserve[1] += %addslot2;

if(%this.tool[2].getID() !$= "" && %this.toolReserve[%this.tool[2]] !$= "")
%this.toolReserve[2] += %addslot3;

if(%this.tool[3].getID() !$= "" && %this.toolReserve[%this.tool[3]] !$= "")
%this.toolReserve[3] += %addslot4;

if(%this.tool[4].getID() !$= "" && %this.toolReserve[%this.tool[4]] !$= "")
%this.toolReserve[4] += %addslot5;

echo("err");
}
return %val;
}
function ItemData::onAdd(%this,%obj)
{
if($weaponReserveLoaded !$= "")
{
%obj.weaponReserveLoaded = $weaponReserveLoaded;
$weaponReserveLoaded = "";
echo("lol");
}
Parent::onAdd(%this,%obj);
}
function WeaponImage::onMount(%this, %obj, %slot)
{
if(%obj.currTool == -1 || %obj.toolReserve[%obj.currTool] $= "")
{
%obj.maxReserve[%obj.currTool] = %this.item.maxReserve;
%obj.dropReserve[%obj.currTool] = %this.item.dropReserve;
%obj.toolReserve[%obj.currTool] = %this.item.spawnReserve;
echo("onmount");
}
Parent::onMount(%this, %obj, %slot);
}
function servercmdDropTool(%client,%slot)
{
if(!isObject(%client.player))
return Parent::servercmdDropTool(%client,%slot);

//if(!isObject(%client.player.tool[%slot]) || %client.player.tool[%slot].maxReserve <= 0)
// return Parent::servercmdDropTool(%client,%slot);

//$weaponAmmoLoaded = %client.player.dropReserve[%client.player.currTool];
//if(%client.player.tool[%slot].dropReserve >= 0)
//if(%client.player.maxReserve[%client.player.currTool] == 800)
$WeaponReserveLoaded = 1;

%client.player.maxReserve[%client.player.currTool] = "";
%client.player.dropReserve[%client.player.currTool] = "";
%client.player.toolReserve[%client.player.currTool] = "";
return Parent::servercmdDropTool(%client,%slot);
}
};activatePackage(ReserveAmmo);
sdfdsadfd player::pickup cant recognize that the item has WeaponReserveLoaded at 1 :c
HEAVY: HELP NAO :C

6305
Help / Re: I sent my key to the wrong email.
« on: September 02, 2010, 06:08:02 PM »
So wait, first we gotta know how the first email got broken in the first place to know whether or not it was his own fault. If he deleted it himself, it's his own problem. If it was deleted by means other than his own, it is not is fault. I think.

6306
and if i do that its probably a little less prone to problems, no?

6307
the only thing is how we are going to do this.
._.

6308
Suggestions & Requests / Re: Model for Syringe gun?
« on: September 02, 2010, 01:24:21 PM »
Could you add a few points to why its a bad idea please?

6309
Help / Re: I sent my key to the wrong email.
« on: September 02, 2010, 11:38:24 AM »
now lets hope that badspot doesn't ban me for saying that or saying this because technically this post makes him look bad and i dont want to piss him off and... well yeah.

6310
Help / Re: I sent my key to the wrong email.
« on: September 02, 2010, 11:14:00 AM »
My sarcasm detector isn't working today.

Was that sarcastic?
no, because technically badspot is stealing money from you by ignoring you

6311
halp

6312
Suggestions & Requests / Re: Player_Inventory
« on: September 01, 2010, 11:23:27 PM »
:/
I hope you realize he is trying to be the person he's quoting.

6313
Modification Help / Re: A great torque functions guide!
« on: September 01, 2010, 07:17:43 PM »
goddamnit why you bumped f
how do you bump a sticky

6314
Suggestions & Requests / Re: Player_Inventory
« on: September 01, 2010, 07:16:26 PM »
why would you want it now if its almost done

6315
Help / Re: I sent my key to the wrong email.
« on: September 01, 2010, 07:14:18 PM »
Yeah, this is not really responsible on Badspot's part.

Pages: 1 ... 416 417 418 419 420 [421] 422 423 424 425 426 ... 450