• 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] solutions?

Status
Not open for further replies.
Level 2
Joined
May 25, 2009
Messages
8
Hi I've just started modding wc3 maps just a few hours ago, read some guides/tut and some introduction about JASS(still don't know how to apply it for real use).

I saw this really cool item http://www.hiveworkshop.com/forums/models-530/ice-shield-128538/ wanted to make it so when unit picks up it create a special effect on unit.

i actually got it with simple triggers:

  • Events -
  • Unit - A unit Acquires an item
  • Conditions -
  • (item carried by (Triggering Unit) in slot 1) Equal to Ice Shield 0001 <gen>
  • (item carried by (Triggering Unit) in slot 2) Equal to Ice Shield 0001 <gen>
  • (item carried by (Triggering Unit) in slot 3) Equal to Ice Shield 0001 <gen>
  • (item carried by (Triggering Unit) in slot 4) Equal to Ice Shield 0001 <gen>
  • (item carried by (Triggering Unit) in slot 5) Equal to Ice Shield 0001 <gen>
  • (item carried by (Triggering Unit) in slot 6) Equal to Ice Shield 0001 <gen>
  • Actions -
  • Special Effect - Create a special effect attached to the right, hand of (Trigerring unit) using war3mapImported\IceShard.mdx
but this simple trigger i use doesn't destroy the effect when i drop Ice Shield, and it create multiple effects when picked up again.

so i tried to do this:
55432d1243294111-solutions-trigger.jpg


it doesn't work, anyone knows why?
 

Attachments

  • trigger.jpg
    trigger.jpg
    68.3 KB · Views: 170
Last edited:
yes thats easy^^one second.
Edit:Here
You need to create a variable with the name:....(doesnt matter what) and classify it as an effect.
  • Event - A unit acquires an item.
  • Condition - Item being manipulated equal to Ice Shield
  • Action - Create a special effect attached to the right hand of manipulating Hero/Unit using war3mapImported\IceShard.mdx
  • set variable(the one you created)=Last created special effect.
(You have to type "right hand" without ","
Then how to destroy it.
  • Event - A unit loses an item.
  • Conditon - Item being dropped(or something like that) equal to Ice Shield.
  • Action - Destroy variable(the one you created).
 
Level 10
Joined
Aug 19, 2008
Messages
491
No one really explained why his trigger didn't work :hohum:
1: In your "Iceskull Shield", Triggering Unit refers to the unit which activated the trigger. In this case it's no one, since another trigger activated it (trigger =/= unit)
2: You created a trigger that creates a special effect. 'Turn on trigger' only makes it able to be activated by events, or called from another trigger.

What you've basically done is "when a unit drops an item, enable a trigger with no events or ways to use it".
If you want to destroy the effect, you gotta save it to a variable somehow (like Vengeancekael suggested), and then destroy it in a similar trigger.
I suggest you don't try to make this MUI for starters, don't worry about stuff like two units picking up this item.
 
Status
Not open for further replies.
Top