Warcraft III resources & community, 2003–2006 · archived

Trigger Help - giving heroes abilities

9 posts
#1

Trigger Help - giving heroes abilities

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
#2

Re: Trigger Help - giving heroes abilities

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
#3
Thanks it worked... but do you know how i could get the ability past level 1???
#4
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
#5
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
#6
Xipe_TotecNONONO! 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.
#7
lol u get on the internet at a cafe?
#8
lorothrigslol u get on the internet at a cafe?


Yes :D I am in the Chat Wave Internet Cafe at present. But for days like Monday to friday I am at NetExpress.
#9
Okay here i put it in quickly in the editor, it would look something like this

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)