Jump to content


Photo

How can i make Sauron's mace knock back heroes?


  • Please log in to reply
6 replies to this topic

#1 hash

hash
  • Members
  • 28 posts

Posted 11 January 2012 - 07:35 PM

Hi guys,

How can i make Sauron's mace knock back heroes? Only heroes like normal heroes Aragorn, Gimli Etc, not Balrog or Mumakils, etc.. :p

#2 modboy451

modboy451

    A small Big-time Modder!

  • Project Team
  • 783 posts
  • Location:U.S.A
  •  Experienced INI Coder, Advanced Rigger/Binder.

Posted 12 January 2012 - 02:47 AM

This is the code for Saurons Mace weapon :)

;------------------------------------------------------------------------------
Weapon SauronMace
	RadiusDamageAffects		= ENEMIES NEUTRALS NOT_SIMILAR
	LeechRangeWeapon		= Yes
	CanFireWhileMoving		= No
	AttackRange			= STANDARD_MELEE_ATTACK_RANGE
	MeleeWeapon			= Yes
	AcceptableAimDelta		= 60				; Just needs to sort of face in the general direction.
	FireFX				= FX_SauronMaceHit
	DelayBetweenShots		= 500				; time between shots, msec
	PreAttackDelay			= 2000				; 300 is mace swing delay time before contact with target.
	PreAttackType			= PER_SHOT			; Do the delay each time we attack
	FiringDuration			= 3667				; Duration of the mace swing
	DamageDealtAtSelfPosition = Yes				; A melee based AoE.  Arc radiates from me, not them

	; Crush damage.
	DamageNugget								; A basic Nugget that just does damage
		Damage			= SAURON_DAMAGE
		Radius			= 80.0
		DamageArc		= 75
		DelayTime		= 0
		DamageType		= SIEGE
		DamageFXType		= MAGIC
		DeathType		= NORMAL
		DamageScalar  		= 40% NONE +HERO
	End

	; Magic damage.
	DamageNugget								; A basic Nugget that just does damage
		Damage			= SAURON_DAMAGE
		Radius			= 80.0
		DamageArc		= 75
		DelayTime		= 0
		DamageType		= MAGIC
		DamageFXType		= MAGIC
		DeathType		= NORMAL
		DamageScalar  		= 40% NONE +HERO
	End

	; Push back
	MetaImpactNugget							; A Nugget that throws things back with force
;		HeroResist			= .75
		ShockWaveAmount		= 70
		ShockWaveRadius		= 75
		ShockWaveArc		= 75				; Should generally be equal to damage arc
		ShockWaveTaperOff	= 1.0
		ShockWaveSpeed		= 0.0
		ShockWaveZMult		= 1.6
	End
End

This controls Knockback for the weapon (as you can see, This is the same one from Saurons Mace weapon code.

MetaImpactNugget							; A Nugget that throws things back with force
;		HeroResist			= .75
		ShockWaveAmount		= 70
		ShockWaveRadius		= 75
		ShockWaveArc		= 75				; Should generally be equal to damage arc
		ShockWaveTaperOff	= 1.0
		ShockWaveSpeed		= 0.0
		ShockWaveZMult		= 1.6
	End


See anything that may cahnge it? like per say....?
HeroResist			= .75

Edited by modboy451, 12 January 2012 - 02:59 AM.

John 3:16 (NIV)
For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.


Psalm 23:1 (ESV)
A Psalm of David.
The LORD is my shepherd; I shall not want.


Posted Image
Posted Image
Posted Image
Posted Image

#3 hash

hash
  • Members
  • 28 posts

Posted 13 January 2012 - 11:36 AM

It didnt work :(

I tried changing it to .25 and 1.0, I also removed the " ; "

#4 modboy451

modboy451

    A small Big-time Modder!

  • Project Team
  • 783 posts
  • Location:U.S.A
  •  Experienced INI Coder, Advanced Rigger/Binder.

Posted 13 January 2012 - 01:23 PM

AHA! I think i may have found it... :p stupid mistake on my part.

DamageScalar            = 40% NONE +HERO

Just delete this line i think.

John 3:16 (NIV)
For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.


Psalm 23:1 (ESV)
A Psalm of David.
The LORD is my shepherd; I shall not want.


Posted Image
Posted Image
Posted Image
Posted Image

#5 hash

hash
  • Members
  • 28 posts

Posted 14 January 2012 - 01:22 PM

I tried removing the "DamageScalar" but it inflicts more damage to Heroes.

It worked but only when i changed "ShockWaveAmount = .90" :p

Sauron can Knockback Heroes but not heavy units like Ents and Trolls.

How can I know what the unit's weight or knock back resistance value is? Why does Sauron knock back Heroes only when I set it above .85?

#6 JUS_SAURON

JUS_SAURON

    El Shaddai

  • Members
  • 1,581 posts
  • Location:Trinidad
  • Projects: BFME2 MOD - Power Of The Ring
  •   INI Coder

Posted 14 January 2012 - 09:11 PM

It worked but only when i changed "ShockWaveAmount = .90" :p

Sauron can Knockback Heroes but not heavy units like Ents and Trolls.

How can I know what the unit's weight or knock back resistance value is? Why does Sauron knock back Heroes only when I set it above .85?



#define SHOCKWAVE_RESISTANCE_WEAK			20
#define SHOCKWAVE_RESISTANCE_STRONG			74
#define SHOCKWAVE_RESISTANCE_IMMUNE			99
#define SHOCKWAVE_RESISTANCE_ALWAYS			9999 ; always resist meta-impact

A units resistance value is in the unit's ini file as ShockwaveResistance =

Most heroes have
ShockwaveResistance = SHOCKWAVE_RESISTANCE_STRONG therefore
ShockwaveResistance = 74

Ents are SHOCKWAVE_RESISTANCE_IMMUNE = 99
So for Heroes 90 would be a good value to get them to be KnockBacked !
Good find ! I could never really figure this out ...until now

#7 hash

hash
  • Members
  • 28 posts

Posted 15 January 2012 - 11:48 AM

It worked but only when i changed "ShockWaveAmount = .90" :p

Sauron can Knockback Heroes but not heavy units like Ents and Trolls.

How can I know what the unit's weight or knock back resistance value is? Why does Sauron knock back Heroes only when I set it above .85?



#define SHOCKWAVE_RESISTANCE_WEAK			20
#define SHOCKWAVE_RESISTANCE_STRONG			74
#define SHOCKWAVE_RESISTANCE_IMMUNE			99
#define SHOCKWAVE_RESISTANCE_ALWAYS			9999 ; always resist meta-impact

A units resistance value is in the unit's ini file as ShockwaveResistance =

Most heroes have
ShockwaveResistance = SHOCKWAVE_RESISTANCE_STRONG therefore
ShockwaveResistance = 74

Ents are SHOCKWAVE_RESISTANCE_IMMUNE = 99
So for Heroes 90 would be a good value to get them to be KnockBacked !
Good find ! I could never really figure this out ...until now


Lol thanks Lord Sauron :p and thanks for the detailed explanation its all clear now :cool2:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users