• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Trigger Help - giving heroes abilities

Status
Not open for further replies.
Level 3
Joined
Feb 12, 2005
Messages
22
I need a trigger so that when a unit buys a certain item it gives him a certain ability.

The one i am using now is this-

Event - A unit acquires an item

Condition - (last created item) equal to (item carried by (buying unit) of type critical strike)

Action - Add Critical strike to (triggering unit)

thanks in advance
 
Level 9
Joined
Jan 13, 2005
Messages
553
Pseudocode:

E: a unit acquires an item

C: Item-type of (item being manipulated) equal to Critical Strike

Unit type of Hero manipulating item = your hero

A: Add critical strike to Hero manipulating item

Note: You can change the 2nd condition w/ a boolean somethung that says unit type of hero manipulating item = hero is true.

I hope it will work..
---
harper
 
Level 9
Joined
Jan 13, 2005
Messages
553
You might try this one:

1. Customize a number of normal Critical Strike abilities & indicating them as CS1, CS2 & etc... For the colored text like level 1 perhaps you can just copy/paste & edit it to each of these abilities.

2. Make a trigger

Pseudocode:

E: a unit gains a level

C: unit type of leveling hero = your hero
or
use the boolean condition

A: remove Critical Strike 1

add Critical Strike 2
 
Level 9
Joined
Jan 13, 2005
Messages
553
Xipe_Totec said:
NONONO! damn it harper, why would you say such a thing? put for the adding something like
If- level of spell being given given equal to 0
then- add ability -spell being given
else- increase level of ability -spell given

What :shock:
That is why I used pseudocode so dont shout to me! Besides I dont have WEU w/c I doubt that "the level of ability" is present in the database of my WE & everytime I am online from 10.30am-5.00pm philippine time I am not at home Im in a cafe because I have no internet.
 
Level 7
Joined
May 16, 2004
Messages
355
Okay here i put it in quickly in the editor, it would look something like this
Code:
Events
        Unit - A unit Acquires an item
    Conditions
        (Item being manipulated) Equal to (Critical Strike Giver)
    Actions
        If (All Conditions are True) then do(Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Critical Strike for (Hero manipulating item)) Equal to 0
            Then - Actions
                Unit - Add Critical Strike to (Hero manipulating item)
            Else - Actions
                Unit - Increase Level of Critical Strike for (Hero manipulating item)
 
Status
Not open for further replies.
Top