The 3rd Age

Battles of Gondor, the War in the South

Battles of Gondor, the War in the South

Converts BfME2 RotWK to the war in the south, bettween the armys of Gondor and Mordor. 4.0 released.

Button for The 3rd AgeButton for The Dwarf HoldsButton for The Elven AllianceButton for Helm's Deep Last HopeButton for GothmogtheOrcButton for BFME+Button for The Four AgesButton for HDR HeadquartersButton for Middle Earth CenterButton for Project Perfect Mod

Become an affiliate!

   

Quick Lists

Top Rated Popular New Updated Last Comments Users

Register and log in to move these advertisements down

Ping Power

Avatar of Radspakr Wolfbane

Radspakr Wolfbane

Category: Code
Level: Intermediate
Created: Wednesday March 31, 2010 - 6:49
Updated: Wednesday March 31, 2010 - 6:55
Views: 6042
Summary: A tutorial that will show how to code some cool abilities using pings.

Rating

Staff says

4.0

Members say

4.0

Average

4.0/5.0

2 votes

Page 1 2 3
This first part I'll be using the Radiance ability from my Radiance tutorial to create a spell that freezes enemies in place and does damage
over time till the spell runs out.
In Lone Wolf mod this ability is Ring of Shadows or ROS for short.
This is what I'll refer to this ability as from here on.

First you need your ping

              
Code


Object ShadowRingPing

EvaEnemyUnitSightedEvent = None ; Not a real unit

; ***DESIGN parameters ***
VisionRange = 75.0
EditorSorting = SYSTEM
KindOf = NO_COLLIDE IMMOBILE UNATTACKABLE IGNORE_FOR_VICTORY IGNORE_FOR_EVA_SPEECH_POSITION MOVE_ONLY ;INERT
ThreatLevel = 0
; *** ENGINEERING Parameters ***
Body = ActiveBody ModuleTag_01
MaxHealth = 999999
InitialHealth = 999999
End


;;; ???? I don't think this works right -- shouldn't it be a DeletionUpdate?
;;; LifetimeUpdate can't kill ImmortalBody
Behavior = LifetimeUpdate ModuleTag_LifetimeUpdate
MinLifetime = 20000
MaxLifetime = 20000
End


End



This ping is very basic and only reveals the a small area and runs out after a while.

Next we need to add the Attribute modifier to create a negative leadership to pin the units in place.
(For more on Negative leaderships check out my tutorial)

              
Code

; Gives ally trrops bonus
Behavior = AttributeModifierAuraUpdate ModuleTag_TroopBonus
StartsActive = Yes ;If no, requires upgrade to turn on.
BonusName = ShadowRing
RefreshDelay = 3000
Range = 100
TargetEnemy = Yes
ObjectFilter = ANY ENEMIES +INFANTRY +ORC +URUK +CAVALRY -STRUCTURE -BASE_FOUNDATION +HERO
End



This effects all infantry,heroes and cavalry caught in a 100 range of the centre of the spell and stops them from going anywhere.
Just paste this in under the LifetimeUpdate.


Next is the Radiance ability.
I won't show how to code that here so check out the Radiance tutorial for the rest of this part.
Paste the following under the AttributeModifierAuraUpdate part.

              
Code

Behavior = FireWeaponUpdate ModuleTag_radi;radiance
Weapon = GurgukRadianceWeapon
End


This is all very simple next head over to AttributeModifier.ini
and put something like the following

              
Code

ModifierList ShadowRing
Category = LEADERSHIP
Modifier = SPEED 0% ; multiplier - 0% means max speed is 0. jba
Duration = 3000 ;WARNING if you change this you must change the system life of the FX below (FXList.ini)
ClearModelCondition = MOVING ; Make him stop moving... NOW!
;FX = FX_yourfx
End


This basically has the same effect as Lurtz' cripple.

Now just add the ping to a OCLSpecialPower in the hero's/spell store's code.
Which I'm sure you can figure out yourself.

In my version I added in some FX but you can make your own.
Pings can have drawmodules just like other units.

This is the first part and the simplest example of ping coding but creates a cool spell.
In Part 2 I will show you how to code the Avenge the King power from my mod.
So head on over to page 3.

Links / Downloads

 HitsAdded
Negative Leadership - by Radspakr1165March 31, 2010 - 6:54
Radiance Tutorial - by Radspakr1159March 31, 2010 - 6:53

Comments

Display order: Newest first

forshire - Wednesday September 22, 2010 - 19:36

I am glad about that, these shit codes doesnt work on EA server. otherwise everyone will use cheats.

Go to top

 

"One site to rule them all, one site to find them,
one site to host them all, and on the network bind them."

 
11:30:59