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

Pages: [1]
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.

2
Modification Help / Re: Universal Currency Mod?
« on: December 25, 2011, 11:29:36 PM »
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.

3
Modification Help / Re: Universal Currency Mod?
« on: December 25, 2011, 08:06:54 PM »
Use a MySQL thing and keep money assigned by ID. Would just need to load it when entering a server and save when leaving.

4
Modification Help / Re: Checking if an object is a vehicle
« on: December 11, 2011, 01:36:11 AM »
Oh WOW. I had written the points part of the script before V20. All this time I'd been sending my changes to C:/Blockland rather than My Documents/Blockland. As you may guess, everything works now.

5
Modification Help / Re: Checking if an object is a vehicle
« on: December 08, 2011, 09:50:30 PM »
I have fixed both of those issues and updated the code with them. However, I still have run into the same issue - it prints the points value but neither adjusts damage for armor or prints "Vehicle hit" when I shoot a vehicle.

6
Modification Help / Re: Checking if an object is a vehicle
« on: December 07, 2011, 10:18:31 PM »
Changed that, didn't work. I've updated the previous post with the current code.

What it DOES do is spit back the points value earned, but it doesn't say anything about hitting a vehicle.

7
Modification Help / Re: Checking if an object is a vehicle
« on: December 07, 2011, 09:16:27 PM »
Is that s in the actual code?
Anyhow, I suggest you use if(%col.getType() & $TypeMasks::VehicleObjectType) instead of if(%col.getClassName() $= "WheeledVehicle").
Yes, turns out it is. Here's the code as it stands, right now, after changes:
Code: [Select]
//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);

As you can see, I used Projectile::damage and the Typemask suggestions, but neither works. Does Projectile::damage have the same arguments as ProjectileData::damage?

8
Modification Help / Re: Dual guns + r-launcher(Vehicle)
« on: December 07, 2011, 07:23:49 PM »
If you bind the rocket launcher to right-click, you'll eject. You should bind it to "light" or something similar.

9
Modification Help / Re: Checking if an object is a vehicle
« on: December 06, 2011, 10:15:57 PM »
I just checked. Replace the == with $= and you have the actual code.

10
Modification Help / Re: Checking if an object is a vehicle
« on: December 06, 2011, 10:10:21 PM »
Typed from memory, actual code has that. Still doesn't work, though.

11
Modification Help / Re: Checking if an object is a vehicle
« on: December 06, 2011, 10:03:02 PM »
Code: [Select]
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.

12
Modification Help / Re: Checking if an object is a vehicle
« on: December 06, 2011, 05:01:36 PM »
Actually, neither of the .getClassName() solutions seem to be working. It doesn't seem to recognize that it's hit a car.

13
Modification Help / Re: Checking if an object is a vehicle
« on: December 06, 2011, 04:17:49 PM »
Thanks! One more thing - how would I check if a variable exists within the WheeledVehicleData block and if it does, retrieve it? It wouldn't just be col.<variablename>, would it?

14
Modification Help / Checking if an object is a vehicle
« on: December 06, 2011, 03:55:15 PM »
How do I check if an object is a vehicle? I want to check if the object a projectile has hit is a vehicle but I'm not sure how.

15
Suggestions & Requests / Re: Advanced Bow
« on: October 12, 2011, 08:44:06 PM »
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.

Pages: [1]