The 3rd Age

Helm's Deep Last Hope

Helm's Deep Last Hope

The ultimate map mod

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

Broadcast Stealth

Tutorial for Battle for Middle-earth BFME, Battle for Middle-earth II BFME 2, Battle for Middle-earth II: Rise of the Witch-king ROTWK

Avatar of Radspakr Wolfbane

Radspakr Wolfbane

Category: Code
Level: Intermediate
Created: Wednesday August 13, 2008 - 19:40
Updated: Friday January 25, 2013 - 7:38
Views: 4493
Summary: Teaches how to use the Broadcast Stealth ability

Rating

Staff says

3.3

Members say

-

Average

3.3/5.0

4 votes

Broadcast Stealth

In this Tutorial I will show how to add the Broadcast Stealth ability to a Hero.
This Tutorial is intended for those who have a sound knowledge of coding and can add powers to heroes.

The Broadcast Stealth ability is something I found in a map.ini as an override module for Lurtz.
My guess is that EA intended Lurtz to have this power but it was removed a some point.
Since then I have been working on getting it to work and after some time I got it work.

This is how it works -
The Broadcast Stealth power on the hero switches on the Stealth Modules on units when nearby.
Broadcast Stealth is a passive power that functions like a leadership.

Before I start I should mention that I have not figured all the nuances of this ability
so I encourage you to play around with it.

Ok here we go -

On your Hero (I'll use Lurtz) add the following module to him in the usual place.

              
Code



        Behavior = BroadcastStealthUpdate ModuleTag_BroadcastStealth
TriggeredBy = Upgrade_EomerSpear
            Radius = 100.0
        End


This is code needed to tell the unit's stealth to become active.

Next go to specialpower.ini and add the following
              
Code

;---------------------------------------
SpecialPower SpecialAbilityBroadcastStealth
Enum = SPECIAL_GENERAL_TARGETLESS
ReloadTime = 30000
PublicTimer = No
;InitiateSound = PhialOn ;this works but too much of a delay
;InitiateAtLocationSound = GenericSpell ;this doesn't work
End


Next go to the unit you want to stealth and add the following

uncomment the BecomeStealthedFX lines if you want FX for when they stealth

              
Code


Behavior = StealthUpdate ModuleTag_Stealth
    StealthDelay = 0 ; msec
    StealthForbiddenConditions = ATTACKING
    HintDetectableConditions = IS_FIRING_WEAPON
    FriendlyOpacityMin = 10.0%
    FriendlyOpacityMax = 60.0%
    PulseFrequency = 750 ; msec
    OrderIdleEnemiesToAttackMeUponReveal = Yes
    StartsActive                = Yes
    InnateStealth                = No
;BecomeStealthedFX = FX_ElvenCloakOn
;ExitStealthFX = FX_ElvenCloakOff
End


If the unit is a part of a horde add the same code to the Horde.

This stealth starts off inactive until triggered by the Broadcast Stealth.

Now go to experiencelevels.ini and add the upgrade to the hero.
Then you can make a commandbutton for it.

That should do it units nearby your hero should stealth.


Update:
From what I can tell after some experimenting the way this actually seems to work is that the hero broadcasts his stealth to the target.
The target still needs a stealthupdate though possibly the same as the hero.
So this ability literally Broadcasts his stealth instead of just acting as a trigger.

Comments

Display order: Newest first

GothmogtheOrc (Team Chamber Member) - Wednesday August 20, 2008 - 12:27

Very interesting. I always wondered how this code was supposed to work. Good job on figuring it out ;)

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:01:19