Page 1 of 1

Help Fall Damage SSM!!!

Posted: Sun Jun 20, 2010 3:04 am
by Deadeye
ok i have yet another question how do you make a soldier take no fall damage??? i want this SSM Thnx

Re: Help Fall Damage SSM!!!

Posted: Sun Jun 20, 2010 3:50 am
by Apache Thunder

Code: Select all

ObjectTemplate.active (soldier name here)
ObjectTemplate.speedMod 0
ObjectTemplate.angleMod 0
Simple as that. :D

Replace "solder name here" with the object name of each soldier you are applying it to.

For example:

Code: Select all

ObjectTemplate.active USSoldier
ObjectTemplate.speedMod 0
ObjectTemplate.angleMod 0
The active commands are usually placed in the ObjectSpawnTemplates.con file found in the game mode(s) you will be modding. This should be server-side.

Re: Help Fall Damage SSM!!!

Posted: Mon Jun 21, 2010 10:41 am
by Jeronimo
I was thinking about changing this SSM, too, especially for mods like EoD where you can run with shift key pressed and kill yourself by headbanging on a tank often enough xD

Anyway, what exactly does angleMod do in disticion from speedMod?

Posted: Mon Jun 21, 2010 1:32 pm
by freddy
AngleMod Property

Usage:
ObjectTemplate.AngleMod number

Argument values:
argument 1: 1; most commonly 1

Description: AngleMod is used to modify the collision damage received by an object. This value is set inside the defending object's Objects.con file, similar to SpeedMod.

The actual expression used is:

CollisionAngleMod = AngleMod + (1 - AngleMod) * sine( cosine( angle ) * 90 degrees )

This looks complex, but because the AngleMod is always either 0 or 1, one part or the other of this expression goes away when evaluated. In theory you could set AngleMod to some other value. The angle is the angle of collision between the two objects. Specifically, it is the direction of the attacker compared to the normal of the surface hit of the defender. 0 degrees is head-on. So, for airplanes the final value is simply 1, i.e. the angle an object collides with the plane does not matter, the plane will take full damage. For other objects, this term falls off with angle, e.g. 0 degrees gives 1.0, 30 degrees gives 0.978, 60 degrees gives 0.707, 80 degrees gives 0.270, 90 degrees gives 0.0. So hitting at anything but a glancing blow does nearly full damage.