how about a conacle explosion explosive for mining out tunnels?
local actor Victims;
local float damageScale, dist,RotP,DistP;
local vector dir,VictimHitLoc,PRot;
dir=Victims.Location-Location;
dist=FMax(1,VSize(dir));
dir=dir/dist;
PRot=Dir-vector(Rotation);
RotP=1-VSize(PRot/(maxrot/2));
DistP=1-(Dist/(TraceRange/2));
damageScale=(DistP+RotP)/2;
this is a scrap of old code but you get the idea maxrot is the max rotation it can damage, and tracerange is the max distance. don't remember why that fmax is in there.
And with this we have the power to make a Modern Claymore (it can be activated by redstone right?), I wouldn't mind it
(If anyone has a texture pack that has C4 instead of TnT PM me, lol)
Rollback Post to RevisionRollBack
These guys make awesome art for Mods (Items, New Blocks and Mobs)
I will be using them soon
I'm Starting to be known as a Balancer, A.K.A. I'm starting to become pessimist
your location(relative to the center of the world) - the center of the explosion (relative to the center of the world) will tell the non relative location you are from the explosion.
Vector size (VSize) tells the size of the vector (XYZ) in a single number giving the distance you are from the explosion.
your location and distance from the explosion gives a rotation that minus the rotation of the explosion can give the diffrence.
then you can use the maximum distance, and rotation that you can be damaged at to calculate the damage you will receve based on your distance, and the amount of rotation between you and the explosion.
think thats right.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
local actor Victims; local float damageScale, dist,RotP,DistP; local vector dir,VictimHitLoc,PRot; dir=Victims.Location-Location; dist=FMax(1,VSize(dir)); dir=dir/dist; PRot=Dir-vector(Rotation); RotP=1-VSize(PRot/(maxrot/2)); DistP=1-(Dist/(TraceRange/2)); damageScale=(DistP+RotP)/2;this is a scrap of old code but you get the idea maxrot is the max rotation it can damage, and tracerange is the max distance. don't remember why that fmax is in there.
at least reduce damage when standing behind several layers of mats
-
View User Profile
-
View Posts
-
Send Message
Retired StaffSig made by llama66613
Follow me on twitter
yes, sort of tear drop shaped.
(If anyone has a texture pack that has C4 instead of TnT PM me, lol)
I will be using them soon
I'm Starting to be known as a Balancer, A.K.A. I'm starting to become pessimist
its harder to describe how it works in math.
your location(relative to the center of the world) - the center of the explosion (relative to the center of the world) will tell the non relative location you are from the explosion.
Vector size (VSize) tells the size of the vector (XYZ) in a single number giving the distance you are from the explosion.
your location and distance from the explosion gives a rotation that minus the rotation of the explosion can give the diffrence.
then you can use the maximum distance, and rotation that you can be damaged at to calculate the damage you will receve based on your distance, and the amount of rotation between you and the explosion.
think thats right.