The 3rd Age

The Elven LegacY MoD

The Elven LegacY MoD

This mod for bfme 1 Mod based on Elvestar 5.5

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

The Power of the DoCommandUpgrade Behavior

Avatar of modboy451

modboy451

Category: Code
Level: Beginner
Created: Tuesday December 14, 2010 - 11:57
Updated: Thursday November 3, 2016 - 17:53
Views: 5972
Summary: A neat behavior that is will show you

Rating

Staff says

3.0

Members say

-

Average

3.0/5.0

1 vote

Page 1 2 3 4
Triggering Powers

On this page im going to show you how you can use the "triggered by feature in the docommandupgrade beahvior to automatically have the hero use his power

Im going to use Aragorn Use his Blade master ability once he reaches Level 7

First:
Put this in aragorn.ini
              
Code

Behavior = DoCommandUpgrade ModuleTag_UseSwordInitially
TriggeredBy = Upgrade_UseBladeMaster
GetUpgradeCommandButtonName = Command_SpecialAbilityBladeMaster
End


Second:
Put this in Upgrade.ini
              
Code

Upgrade Upgrade_UseBladeMaster
Type = OBJECT
End


Third and Finally:
GO to experiencelevels.ini and find this code:
              
Code

ExperienceLevel    AragornLevelMP7
TargetNames                        =    ARAGORN    
RequiredExperience                =    ARAGORN_LVL7_EXP_NEEDED
ExperienceAward                    =    ARAGORN_LVL7_EXP_AWARD     
LevelUpFx                        =    FX:GandalfLevelUp1FX
;LevelUpOCL                        =    OCL_GandalfLevelUp1OCL
Rank                            =    7
AttributeModifiers                =    HeroLevelUpDamage6
SelectionDecal
Texture                        =    decal_hero_good
    Style                        =    SHADOW_ALPHA_DECAL
    OpacityMin                    =    50%
    OpacityMax                    =    100%
    MinRadius                    =    40
    MaxRadius                    =    200
    MaxSelectedUnits            =    40
    End    
End


and add:

              
Code

Upgrades = Upgrade_UseBladeMaster


Above:

              
Code

SelectionDecal


it will look something like this:

              
Code

ExperienceLevel    AragornLevelMP7
TargetNames                        =    ARAGORN    
RequiredExperience                =    ARAGORN_LVL7_EXP_NEEDED
ExperienceAward                    =    ARAGORN_LVL7_EXP_AWARD     
LevelUpFx                        =    FX:GandalfLevelUp1FX
;LevelUpOCL                        =    OCL_GandalfLevelUp1OCL
Rank                            =    7
AttributeModifiers                =    HeroLevelUpDamage6
Upgrades = Upgrade_UseBladeMaster
SelectionDecal
Texture                        =    decal_hero_good
    Style                        =    SHADOW_ALPHA_DECAL
    OpacityMin                    =    50%
    OpacityMax                    =    100%
    MinRadius                    =    40
    MaxRadius                    =    200
    MaxSelectedUnits            =    40
    End    
End


now i will go through what each file does...

experiencelevels.ini code:
              
Code

Upgrades = Upgrade_UseBladeMaster

tell the game that when aragorn reaches level 7 give him this upgrade:


aragorn.ini code
              
Code

Behavior = DoCommandUpgrade ModuleTag_UseSwordInitially
TriggeredBy = Upgrade_UseBladeMaster
GetUpgradeCommandButtonName = Command_SpecialAbilityBladeMaster
End

the TriggeredBy line tells that when this unit will do the GetUpgradeCommandButtonName when aragorn receives the upgrade "Upgrade_UseBladeMaster"

Upgrade.ini code
              
Code

Upgrade Upgrade_UseBladeMaster
Type = OBJECT
End


defines the upgrade referenced in experiencelevels.ini and in aragorn.ini

Comments

Display order: Newest first

modboy451 - Thursday December 16, 2010 - 8:31

Yes, im sure there are other uses

clank234 - Thursday December 16, 2010 - 5:39

so this teaches you how to use a power straight away without cicking it???

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."

 
1:51:14