HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger Powered Items (Cooldown, Permanent items, non-perishable and Powerups)

07-19-2003, 09:55 PM#1
Vexorian
[glow=color=black, strength=4]Introduction[/glow]
The examples I will use are pretty useless but they will help you to learn to use the events and the conditions to get a trigger ability to work.

[glow=color=black, strength=4]Charged Items[/glow]
Well, these are easy and not a new creation.

But now we will give them a cooldown too.

Let's say that we want the OLD Potion of Restoration that completely regenartes both mana and hit points.

First we need an ability that does nothing, doesn't cost mana and has a cooldown. Use the ability editor to create it. Call it "Triggerer (Potion of restoration)"

Now create an item from the Potion of healing, give it the ability "Triggerer (Potion of restoration)" , As cooldown group use the same ability , then call it "OLD Potion of restoration"

Now to make the trigger we use the Unit uses an item event (first choose the Generic unit event) and for condition an item type comparision betwen the "Event response - Item Being manipulated and the OLD Potion of Restoration"

Code:
    Events
        Unit - A unit Uses an item
    Conditions
        Item type of item being manipulated equal to OLD Potion of Restoration
    Actions
        Unit - set health of (Triggering Unit) to 100%
        Unit - set mana of (Triggering Unit) to 100%    


[glow=color=black, strength=4]Permanent Items[/glow]
You only need to use a boolean comparision betwen Hero has item of type and true where you need to run the trigger.

This is a trigger that kills every unit that is attacked by the owner of an item called "Cheese"
Code:
    Events
        Unit - A unit Is attacked
    Conditions
        ((Attacking unit) has an item of type Cheese) Equal to True
    Actions
        Unit - Kill (Triggering unit)

[glow=color=black, strength=4]Powerups[/glow]
Don't give them any ability and then use the Unit Adquires item event.

Let's say we want a Bonus Skill point powerup that gives the hero a bonus skill point:

Code:
    Events
        Unit - A unit adquires an item
    Conditions
        (Item type of (Item being manipulated) equal to Bonus Skill Point)
    Actions
        Hero - modiffy skill points for hero Add 1




[glow=color=black, strength=4]Non Perishable[/glow]
Sadly the Event Unit uses item doesn't work with Staffs so we will need to do something different.

Let's make an item that completely restores the unit's health and mana.

We need to create a new unit called "Staff Triggerer" then we need a new ability made from a summoning item one (Like the item furbolg summon) Just change the Summoned unit type to "Staff Triggerer" And give it a good cooldown.

Give your staff like Item the newly created ability and it's cooldown

Now we need to use the Unit spawns a summoned unit event
Code:
    Events
        Unit - A unit Spawns a summoned unit
    Conditions
        (Unit-type of (Summoned unit)) Equal to Staff Triggerer
    Actions
        Unit - Remove (Summoned unit)
        Unit - set health of (Summoning Unit) to 100%
        Unit - set mana of (Summoning Unit) to 100%

Also you can base the spell from a Ward to have a targeting system too.
08-30-2003, 09:25 AM#2
Zwan
Interesting info. I like the permanent stuff, was discussing with my item guy the other day about ideas for cursed items, this could be of use to us.
11-17-2003, 11:17 AM#3
Phil_123
Don't use remove unit. Remove unit = hide unit, its data is still not removed from RAM. Instead, use Hide unit, then explode unit.
11-23-2003, 11:06 PM#4
Phobos
Quote:
Originally posted by Lord Vexorian
This is a trigger that kills every unit that is attacked by the owner of an item called "Cheese"
Code:
    Events
        Unit - A unit Is attacked
    Conditions
        ((Triggering unit) has an item of type Cheese) Equal to True
    Actions
        Unit - Kill (Triggering unit)
[/b]

The event should be Unit attacks a unit, not unit is attacked coz if u use this then the Hero with the "Cheese" will be killed every time it is attacked.
11-24-2003, 02:58 PM#5
Vexorian
Did you test it?

because it does kill the unit being attacked.
12-08-2003, 10:22 PM#6
Xinlitik
"The event should be Unit attacks a unit, not unit is attacked coz if u use this then the Hero with the "Cheese" will be killed every time it is attacked."

There's no Unit attacks a unit event. :gsmile:

That's in UMSWE and standard WE, at least. Maybe WE Enhanced or something has it..
01-11-2004, 10:07 PM#7
Shadow_Strike
i think it should be
--------
Unit is attacked

attacking unit possesses cheese

kill attacked unit
--------

or something like that