The 3rd Age

The Wars of Arda

The Wars of Arda

A huge expansion for RotWK, adding multiple eras, numerous new factions and a full campaign.

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
PING POWER


Part 1


I am writing a series/multi part tutorial covering one of my favourite things in coding.
The ping.

This is intended as a simple tutorial to show some examples of the things that can be done with pings.
It is my hope that you'll come away thinking about the ways you can use this to create really cool powers instead of simple
Blademaster abilities.


(The next bit is for beginners so if you have solid skills and know about pings feel free to skip this next part and head to page 2)
What is a ping you ask?
Well sit down young man and I shall tell you a story so vivid and real you'll feel like you are there :p

Pings are essentially fake units.
They have different names for different games but EA seemed to call them pings.
Pings are what make powers like Palantir Vision and Heal work.

I'll use Palantir Vision as an example-
How the power works is the power spawns an OCL which spawns a ping.
Shown below

This ping is invisible and has a timer and a vision range.
So when this spawns it reveals the target area.
As of patch 1.02 (or 1.03 I can't remember which one) they added an AttributeModifierAuraUpdate
which gives the units their speed boost,they also generously threw in a stealth revealer.

The heal spell also uses a ping to replenish hordes with new members using a similar code to the well.


              
Code

;------------------------------------------------------------------------------
Object PalantirVisionPing

EvaEnemyUnitSightedEvent = None ; Not a real unit

; ***DESIGN parameters ***
VisionRange = 300.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 = 120000
MaxLifetime = 120000
End

; Gives ally trrops bonus
Behavior = AttributeModifierAuraUpdate ModuleTag_TroopBonus
StartsActive = Yes ;If no, requires upgrade to turn on.
BonusName = PalantirVision
RefreshDelay = 1000
Range = 200
ObjectFilter = ANY -ORC -URUK +CAVALRY -STRUCTURE -BASE_FOUNDATION -HERO
End

; Detects other stealth units
Behavior = StealthDetectorUpdate StealthDetectorUpdateModuleTag
DetectionRate = 500 ; how often to rescan for stealthed things in my sight (msec)
End

End

Links / Downloads

 HitsAdded
Negative Leadership - by Radspakr1165March 31, 2010 - 6:54
Radiance Tutorial - by Radspakr1158March 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."

 
10:30:37