(Keeps Hive Alive)
Go Back   The Hive Workshop - A Warcraft III Modding Site > Warcraft III Modding > World Editor Help Zone

World Editor Help Zone Need help with Blizzard's World Editor? Ask general questions about its features and use in this forum. README!

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 09-28-2007, 08:51 PM   #1 (permalink)

User
 
Join Date: Aug 2007
Posts: 36

bloodybrains has a little shameless behavior in the past (-3)


Passive abilities as upgrades?

I've been searching through the forums about upgrades, and I've noticed a lot threads talking about using passive abilities instead of upgrades. I've yet to find one that really goes into detail about how it works though. And I have no clue of how to do this. All I can seem to use in the Object editor is "techtree req's" which only allows units, upgrades or equivalents.
If someone could direct me to a tutorial on this, or give me a brief summary on how to do this, I would greatly appreciate it.
Thanks.
bloodybrains is offline  
Old 09-28-2007, 08:58 PM   #2 (permalink)

iRawr
 
Join Date: Dec 2005
Posts: 8,349

PurplePoot is a splendid one to behold (807)PurplePoot is a splendid one to behold (807)PurplePoot is a splendid one to behold (807)

Paired Mapping Contest #4 Winner: Fallen Angel - Lucifer's Keep Respected User: This user has been given the respected user award. Map Development Mini-Contest #1 Winner: Stand of the Elements 

Maybe they're talking about Engineering Upgrade?

You can't actually literally have abilities as upgrades, but you could create a unit when you learn that ability.
PurplePoot is offline  
Old 09-28-2007, 09:05 PM   #3 (permalink)

User
 
Join Date: Aug 2007
Posts: 36

bloodybrains has a little shameless behavior in the past (-3)


I'm not exactly sure what you mean by that.
What I'm interested in, is a way to control spell requirements. Initially I was using upgrades, but that doesn't work because you can't downgrade.
Example: A spell costs two white mana and 1 green mana. If you have enough of mana of those types, you can cast the spell. If not, the spell is disabled and when you roll over the icon with the cursor, the tooltip tells you what is required to cast it.
Any clue of how to do that?
bloodybrains is offline  
Old 09-28-2007, 09:13 PM   #4 (permalink)

iRawr
 
Join Date: Dec 2005
Posts: 8,349

PurplePoot is a splendid one to behold (807)PurplePoot is a splendid one to behold (807)PurplePoot is a splendid one to behold (807)

Paired Mapping Contest #4 Winner: Fallen Angel - Lucifer's Keep Respected User: This user has been given the respected user award. Map Development Mini-Contest #1 Winner: Stand of the Elements 

Create and remove units that are requirements?
PurplePoot is offline  
Old 09-29-2007, 05:57 AM   #5 (permalink)

User
 
Join Date: Aug 2007
Posts: 36

bloodybrains has a little shameless behavior in the past (-3)


So, every time a player gains a point of a certain mana type, I create a dummy unit and use it as a requirement for spells.
Example:
A player gains 1 red mana, and it increases the total amount of red mana to 4.
I create a dummy unit named "4 Red Mana ", that is used in a spells techtree req.'s.
Q1) If I create the dummy unit "4 Red Mana" would I still have to have 1,2 and 3, or could I delete them and still cast a spell that requires only 2 Red mana?
Q2)If so, how would this be done? (dummy unit levels?)
-(If not, that would require up to 432 dummy units!!! Saying, 6 players, with 6 mana types, maxed out at 12)

If I'm leaving out any steps, please let me know.
Thanks.
bloodybrains is offline  
Old 09-29-2007, 11:02 AM   #6 (permalink)
 
Shados's Avatar

1st Disciple of kharmism.
 
Join Date: Jan 2006
Posts: 2,303

Shados is a glorious beacon of light (461)Shados is a glorious beacon of light (461)Shados is a glorious beacon of light (461)

Respected User: This user has been given the respected user award. PayPal Donor: This user has donated to The Hive. 

Sure you can downgrade upgrades, I do it all the time.

-*meow*
__________________
[04-08-02] LiOneSS: Rao Dao Zao, ROGUE IS THE STUFF YOU PUT ON YOUR LIPS :D
Shados is offline  
Old 09-29-2007, 11:35 AM   #7 (permalink)

I'm right, you're wrong.
 
Join Date: Aug 2005
Posts: 2,538

Eleandor is just really nice (333)Eleandor is just really nice (333)Eleandor is just really nice (333)


Sure you can't.

What you do is: you create 1 dummy unit for each mana type, for example "Red Mana" or "Green Mana".
Now you need to create a trigger like this:
Events
don't know what event you want, let's say a unit picks up an item
Conditions
Item - Item being manipulated = Red Mana pool
Actions
Unit - create 1 'red mana' for owner of unit manipulating the item
Since you have 12 mana types, you'll need 12 of these triggers...
then you add for example "red mana" and "green mana" to techtree requirements and "1" and "3" to techtree requirements levels in your ability. This means that, in order to cast the ability, you need to have 1 red mana and 3 green mana.

Finally, you need to create a trigger for each spell that actually removes 1 red mana and 3 green mana from your mana dummies whenever you cast the spell. this trigger would be something like:
Events
Unit - a unit starts casting an ability
Conditions
Ability - ability being cast equal to Myuberability
Actions
Unit - remove random unit from (units of unit type "Red mana" owned by owner of casting unit)
For each Integer A from 1 to 3 do actions:
Loop - Actions
Unit - remove random unit from (units of unit type "Green mana" owned by owner of casting unit)
Leaks 2 unit groups.
You need one of these triggers for each spell... Spells that use the same mana can share 1 trigger ofcourse.
__________________
Eleandor is offline  
Old 10-01-2007, 04:54 AM   #8 (permalink)

User
 
Join Date: Aug 2007
Posts: 36

bloodybrains has a little shameless behavior in the past (-3)


Ok. I'm using a dummy unit (it's a hero actually, I tried using a footman at first but I couldn't find a way to increase or decrease his levels??)
The problem I'm having now, is that I can't seem to get my dummy to level up past level 2. It works the first time I use the ability, but only once.
Here's the code
function Trig_ChannelManaBeginCast_Copy_Conditions takes nothing returns boolean
    return ( GetSpellAbilityId() == 'A00D' ) // A00D is Channel Mana
endfunction

function Trig_ChannelManaBeginCast_Copy_Actions takes nothing returns nothing
    local player p = GetOwningPlayer(GetTriggerUnit())
    local multiboarditem mbitem
    local group g = CreateGroup()
    local unit dummy

  //===== Gold is Magic that's collected from the mine. Channel Mana is an ability =====
  //===== that takes harvested Magic and channels it into a specific Mana Pool =========
    if ( GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD) > 0 ) then
                                           //Magic Miner //
        if (GetUnitTypeId(GetTriggerUnit()) == 'e002') then
       //===== Decrease magic and increase Generic Mana (1 of the 6 types) =============
            call SetPlayerState(p, PLAYER_STATE_RESOURCE_GOLD, (GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD) - 1) )
            set udg_genericMana[GetPlayerId(p)] = (udg_genericMana[GetPlayerId(p)]+1)

       //===== Show the mana gain on the multiboard ====================================
            set mbitem = MultiboardGetItem(udg_mboard[GetPlayerId(p)],1,2)
            call MultiboardSetItemValueBJ( udg_mboard[GetPlayerId(p)],2, 1, I2S(udg_genericMana[GetPlayerId(p)]))

       //===== Raise the level of Generic Mana dummy to be used as spell requirements ===
            set g = GetUnitsOfPlayerAndTypeId(p,'H005')
            set dummy = FirstOfGroup(g)
            call SetHeroLevelBJ(dummy,2,false)

              //call LeaderboardSetItemValue(bj_lastCreatedLeaderboard,LeaderboardGetPlayerIndex(bj_lastCreatedLeaderboard,p),GetHeroLevel(dummy))
endif
    else
        call IssueImmediateOrder(GetTriggerUnit(),"stop")
    endif

    set p = null
    set mbitem = null
    set dummy = null
    set g = null
endfunction

//===========================================================================
function InitTrig_ChannelManaBeginCast_Copy takes nothing returns nothing
    set gg_trg_ChannelManaBeginCast_Copy = CreateTrigger( )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_ChannelManaBeginCast_Copy, EVENT_PLAYER_UNIT_SPELL_CHANNEL )
    call TriggerAddCondition( gg_trg_ChannelManaBeginCast_Copy, Condition( function Trig_ChannelManaBeginCast_Copy_Conditions ) )
    call TriggerAddAction( gg_trg_ChannelManaBeginCast_Copy, function Trig_ChannelManaBeginCast_Copy_Actions )
endfunction

?????

Does any of this leak, by the way?
bloodybrains is offline  
Old 10-01-2007, 05:01 AM   #9 (permalink)

iRawr
 
Join Date: Dec 2005
Posts: 8,349

PurplePoot is a splendid one to behold (807)PurplePoot is a splendid one to behold (807)PurplePoot is a splendid one to behold (807)

Paired Mapping Contest #4 Winner: Fallen Angel - Lucifer's Keep Respected User: This user has been given the respected user award. Map Development Mini-Contest #1 Winner: Stand of the Elements 

You forgot to destroy g.

Also, the BJ group enumerators create a group.
PurplePoot is offline  
Old 10-01-2007, 05:06 AM   #10 (permalink)

User
 
Join Date: Aug 2007
Posts: 36

bloodybrains has a little shameless behavior in the past (-3)


Do you think that's the problem?
Initially I tried it without the BJ's but I just found it easier for testing purposes.
If you need more info, just let me know.
bloodybrains is offline  
Old 10-01-2007, 07:13 AM   #11 (permalink)

User
 
Join Date: Aug 2007
Posts: 36

bloodybrains has a little shameless behavior in the past (-3)


I fixed the leveling dummy issue. (you'd probably hunt me down and kick me in the nuts if I told you what was wrong)
But now, there is another problem. The use of <techtree-requirements-levels>
with units, is only for an amount of the required unit types.
Example:
unit- Tower
techtree req's - Generic Mana
techtree req's levels - 2

I thought it would mean it requires a level 2 Generic Mana Unit, but it means it actually requires 2 Generic Mana units.
There's got to be a better way to do this.
bloodybrains is offline  
Old 10-01-2007, 08:56 PM   #12 (permalink)

iRawr
 
Join Date: Dec 2005
Posts: 8,349

PurplePoot is a splendid one to behold (807)PurplePoot is a splendid one to behold (807)PurplePoot is a splendid one to behold (807)

Paired Mapping Contest #4 Winner: Fallen Angel - Lucifer's Keep Respected User: This user has been given the respected user award. Map Development Mini-Contest #1 Winner: Stand of the Elements 

No, it wouldn't be the problem you were just leaking ;)

(Your question at the bottom is the only one I noticed)

As for techtree reqs... use more than one unit-type of dummy? That actually helps you that it works that way, though, because it makes it easier to make units that require a lot of basic mana.
PurplePoot is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Neutral Passive cast abilities? ShikamaruShadow Triggers & Scripts 11 01-11-2008 01:12 AM
Can you get remove/hide icons for passive abilities? MacHater Triggers & Scripts 4 11-07-2006 11:24 PM
how to set upgrades for allies/computer teamate(aos upgrades 13lack.1)ragon Map Development 4 04-25-2006 03:32 PM
Item Abilities - Passive Attacks Emigliah Map Development 1 02-05-2005 03:48 PM

All times are GMT. The time now is 05:14 AM.






Your link here 
Guitar Books | Bankruptcy | Bankruptcy | Debt Consolidation | Tesco
Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Copyright©Ralle