1
Modification Help / Re: Universal Currency Mod?
« on: December 25, 2011, 11:38:19 PM »
What. This isn't real money. It's a cross-server score, sort of.
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.
loving HELL NO. THIS WOULD RUIN BLOCKLAND. UNLIMITED? NO. WHATEVER YOU WANT? NO. THIS WOULD BE POPULATED WITH THE PEOPLE WHO GET THE MOTHERS TO BUY THEM THIS. As if it's not already. Plus, who the forget would want this on a freebuild? I mean, what the hell? Do you think Badspot would approve of this? Plus, this might not work on Torque. I get it for City RP to City RP, but really? A universal system? Keep to your City Rps, we don't need money.You seem unnecessarily agitated.
Is that s in the actual code?Yes, turns out it is. Here's the code as it stands, right now, after changes:
Anyhow, I suggest you use if(%col.getType() & $TypeMasks::VehicleObjectType) instead of if(%col.getClassName() $= "WheeledVehicle").
//exec("./Weapon_AntiArmor.cs");//test weapon, testing entry 1
//exec("./armorjeep.cs");//test vehicle, set with armor 1
//REMINDER: Added lines to jeep and rocket launcher scripts, must remove
//Main
package testPackage2
{
function ProjectileData::radiusDamage(%this, %obj, %col, %distanceFactor, %pos, %damageAmt)
{
if(%distanceFactor <= 0)
return;
else if(%distanceFactor > 1)
%distanceFactor = 1;
if(%col.getType() & $Typemasks::VehicleObjectType)//it's a vehicle
{
%vehicleArmor = %col.getDatablock().armorValue;
%weaponPiercing = %obj.sourceObject.getDatablock().armorPiercing;
messageClient(%obj.sourceObject.client,' ',"Hit a vehicle.");
if(%vehicleArmor > 0)//if it is armored
{
messageClient(%obj.sourceObject.client,' ',"Hit an armored vehicle.");
if(%weaponPiercing >= %vehicleArmor)//can penetrate, continue normally.
{
%damApply = %damageAmt * %distanceFactor;
}
else
{
%damApply = (%damageAmt * %distanceFactor) * 0.5;//TODO: Make this loop for armor values above 1.
//Would be ((%damageAmt * &distanceFactor) * 0.5)^(armorValue - armorPiercing) but how2power in C#?
}
}
}
else
{
%damApply = %damageAmt * %distanceFactor;//no armor, apply normally
}
%points = %damApply;
//Check if that would be more than the target's health, and if so, set points to max health.
if((%col.getDamageLevel() + %damApply) > %col.getDatablock().maxDamage)
{
%points = %col.getDatablock().maxDamage - %col.getDamageLevel();
}
messageClient(%obj.sourceObject.client,' ',"Points Earned:" @ %points);//display points earned
Parent::radiusDamage(%this,%obj,%col,%distanceFactor,%pos,%damApply);
//Parent::radiusDamage(%this,%obj,%col,%distanceFactor,%pos,%damageAmt);
}
function ProjectileData::damage(%this,%obj,%col,%fade,%pos,%normal)
{
if(%col.getType() & $TypeMasks::VehicleObjectType)//it's a vehicle
{
%vehicleArmor = %col.getDatablock().armorValue;
%weaponPiercing = %obj.sourceObject.getDatablock().armorPiercing;
messageClient(%obj.sourceObject.client,' ',"Hit a vehicle.");
if(%vehicleArmor > 0)//if it is armored
{
messageClient(%obj.sourceObject.client,' ',"Hit an armored vehicle.");
if(%weaponPiercing >= %vehicleArmor)//can penetrate, continue normally.
{
%damApply = %this.directDamage;
}
else
{
%damApply = (%this.directDamage) * 0.5;//TODO: Make this loop for armor values above 1.
//Would be ((%damageAmt * &distanceFactor) * 0.5)^(armorValue - armorPiercing) but how2power in C#?
}
}
else
{
%damApply = %this.directDamage;//no armor, apply normally
}
}
%points = %damApply;
//Check if that would be more than the target's health, and if so, set points to max health.
if((%col.getDamageLevel() + %damApply) > %col.getDatablock().maxDamage)
{
%points = %col.getDatablock().maxDamage - %col.getDamageLevel();
}
messageClient(%obj.sourceObject.client,' ',"Points Earned:" @ %points);
Parent::damage(%this,%obj,%col,%fade,%pos,%normal);
}
};
activatePackage(testPackage2);
function ProjectileData::damage(%this,%obj,%col,%fade,%pos,%normal)
{
if(%col.getClassName() == "WheeledVehicle")//it's a vehicle
//TODO Make this apply to units with armor too
{
%vehicleArmor = %col.getDatablock().armorValue;
%weaponPiercing = %obj.sourceObject.getDatablock().armorPiercing;
messageClient(%obj.sourceObject.client,' ',"Hit a vehicle.");
if(%vehicleArmor > 0)//if it is armored
{
messageClient(%obj.sourceObject.client,' ',"Hit an armored vehicle.");
if(%weaponPiercing >= %vehicleArmor)//can penetrate, continue normally.
{
%damApply = %this.directDamage;
}
else
{
%damApply = (%this.directDamage) * 0.5;
}
}
else
{
%damApply = %this.directDamage;//no armor, apply normally
}
}
s%points = %damApply;
//Check if that would be more than the target's health, and if so, set points to max health.
if((%col.getDamageLevel() + %damApply) > %col.getDatablock().maxDamage)
{
%points = %col.getDatablock().maxDamage - %col.getDamageLevel();
}
messageClient(%obj.sourceObject.client,' ',"Points Earned:" @ %points);
Parent::damage(%this,%obj,%col,%fade,%pos,%normal);
}
When I shoot a jeep with the gun, I get no "hit a vehicle" message.
The quiver part is impossible, but if you could rig the projectile to drop the ammo on hit...Um, no. You can check the avatar's items quite easily.