HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Help Improve this Trigger! >.<

07-30-2004, 03:04 PM#1
Mouse.Pad
i'm trying to create a trigger that's like spell wars where when you have 3 items in your inventory in a certain order, it would create a certain spell. I made one that works, but it only works if they are in the exact slot and in order for the trigger to run, the hero would always need to "acquire an item"... can anyone help me?

My spell is currently like this:

Spell Alpha
Events
Unit - A unit owned by Player 1 (Red) Acquires an item
Conditions
(Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to |c00ffffffOrder of Good|r
(Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to |c000075ffWater Glyph|r
(Item-type of (Item carried by (Triggering unit) in slot 3)) Equal to |c00506432Wind Glyph|r
Actions
Unit - Add Blink to (Triggering unit)
Item - Remove (Item carried by (Triggering unit) in slot 1)
Item - Remove (Item carried by (Triggering unit) in slot 2)
Item - Remove (Item carried by (Triggering unit) in slot 3)
Special Effect - Create a special effect attached to the chest of (Triggering unit) using Abilities\Spells\Orc\LightningShield\LightningShieldTarget.mdl
Wait 1.00 seconds
Special Effect - Destroy (Last created special effect)
Trigger - Run (This trigger) (checking conditions)


plz help me... i also attached spell wars to help clarify what i mean.
07-30-2004, 03:31 PM#2
Ceo
Don't worry about the event, how else are they going to get an item? If you give them one through triggers just run the trigger after you give them it. Now onto changing it up a little...

I'm not sure how you can make the condition better other than checking slot 1-4 for the first item, 2-5 for the second item, and 3-6 for the third item.

For the action loop 1-6 and if slot i has item x remove item x, if slot i has item y remove item y, if slot i has item z remove item z.
07-30-2004, 04:01 PM#3
Mouse.Pad
is it possible to limit the size of a hero's item carrying space? or do i just put undroppable items in other slots?
07-30-2004, 04:03 PM#4
mefist
Do it like this
Create an integer veriable and when the hero accuires one of the needed items set the veriable (veriable + 1). Adn when a hero loses one of the items set the veriable (veriable - 1).

Then create a condision: Veriable = 3 then do the things u need.
07-31-2004, 03:43 AM#5
Mouse.Pad
what do u mean by variables? i never got how to work out the variables....can someone give me an example?