increase walking speed by 5 and reduce fall damage by 30?

View previous topic View next topic Go down

increase walking speed by 5 and reduce fall damage by 30?

Post  Wound on Wed Jan 02, 2013 11:52 am

I need help to increase walking speed by 5 and reduce fall damage by 30 when picking up an item/model or whatever.

Thanks.

___________________________________________________
Check out http://garpch.com/index.html
avatar
Wound
Blocklandian

Posts : 16
Join date : 2013-01-01
Age : 19
Location : USA

View user profile

Back to top Go down

Re: increase walking speed by 5 and reduce fall damage by 30?

Post  Ipquarx on Wed Jan 02, 2013 1:05 pm

Well first, you'd need to have a seperate player datablock in order to have the walking speed increase, and I'm not sure about the fall damage, but I think that's also controlled by the player datablock.

___________________________________________________
Were you expecting a signature?
avatar
Ipquarx
Blocklandian

Posts : 19
Join date : 2012-12-27
Age : 21
Location : Manitoba, Canada

View user profile http://www.Ipquarx.com

Back to top Go down

Re: increase walking speed by 5 and reduce fall damage by 30?

Post  Meshiest on Wed Jan 02, 2013 6:27 pm

for fall damage, you will need to parent onImpact for armor
function PlayerArmorName::onImpact(%this, %b, %c, %d, %e, %f, %g)

Meshiest
Blocklandian

Posts : 68
Join date : 2013-01-02
Age : 20
Location : The Internet

View user profile http://marblemodz.forumotion.com

Back to top Go down

Re: increase walking speed by 5 and reduce fall damage by 30?

Post  Innocent on Thu Jan 03, 2013 10:03 am

I've been around some tests and here's the variable for : function PlayerStandardArmor::onImpact(%this, %b, %c, %d, %e)

%this = The datablock (in this case "PlayerStandardArmor")

%b = The player

%c = The object you've hit; can be FxPlane, A brick, A player...

%d = The velocity at wich you've hit the wall. (Only the one via you've hit the wall will have a value) Because this one might be hard to understand, I'ma make examples:
If you hit the FxPlane in diagonal, only the third velocity will have a value.. Even if you were dashing foward. ("0 0 ?")
If you hit a wall, only the velocity in the direction of the brick will have a value so: ("? 0 0") or ("0 ? 0")

%e = The "Speed".. The relative ? from %d.. Use this one

I've made an experience, to know what dmg it would do relatively to the velocity you hit the wall.. The formula is exponantial.. I can't give you an EXACT number..
But my 1st experience gave me the multipler 2.88767 (Velocity * MULTIPLIER = damage)
And my 2nd experience gave me the multiplier 2.84999

So, knowing that:

I see 2 way to remove 30 dmg from the impact:

1st. addhealth(30); to the player who just had an impact ( The problem is, if he died, the addhealth(30) won't do shit.
2nd. modify the value of %e to %e -= 10; (30 divided by the multiplier wich is APPROX. 3)


PS: Sorry if my english sucks.. I'm french soz :P Anyway, I've hope you understood everything :)
avatar
Innocent
Blocklandian

Posts : 17
Join date : 2012-12-31
Age : 21
Location : Montreal

View user profile

Back to top Go down

Re: increase walking speed by 5 and reduce fall damage by 30?

Post  Honor on Thu Jan 03, 2013 10:19 am

Very detailed explanation, thankyou Innocent.
avatar
Honor
Admin

Posts : 56
Join date : 2012-12-27
Age : 20

View user profile http://elitesq.forumotion.com

Back to top Go down

Re: increase walking speed by 5 and reduce fall damage by 30?

Post  Meshiest on Thu Jan 03, 2013 9:39 pm

Innocent wrote:I've been around some tests and here's the variable for : function PlayerStandardArmor::onImpact(%this, %b, %c, %d, %e)
Let's use this for now:
function ArmorName::onImpact(%this, %player, %collisionObject, %velocity, %speed)

Meshiest
Blocklandian

Posts : 68
Join date : 2013-01-02
Age : 20
Location : The Internet

View user profile http://marblemodz.forumotion.com

Back to top Go down

Re: increase walking speed by 5 and reduce fall damage by 30?

Post  Innocent on Fri Jan 04, 2013 6:42 pm

Meshiest wrote:Let's use this for now:
function ArmorName::onImpact(%this, %player, %collisionObject, %velocity, %speed)

Thanks :) Wasn't sure on what to name them ;p

And thanks honor :D
avatar
Innocent
Blocklandian

Posts : 17
Join date : 2012-12-31
Age : 21
Location : Montreal

View user profile

Back to top Go down

Re: increase walking speed by 5 and reduce fall damage by 30?

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum