• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Class Items

Status
Not open for further replies.
Level 3
Joined
Nov 17, 2010
Messages
47
Hey ya'll, can somebody show what a trigger looks like if had something to wich only a type of hero can use it like: I have made an item for a Dreadlord... How can I make a trigger so that ONLY he can use it?
 
Level 3
Joined
Nov 17, 2010
Messages
47
Thank you very much sir.... Or madam...
EDIT:
  • Unit - A unit Acquires an item
  • (Unit-type of (Triggering unit)) Not equal to Balnazzar
  • (Item-type of (Item being manipulated)) Equal to Balnazzar's Bloody Claws
  • Hero - Drop (Item being manipulated) from (Triggering unit)
Why dosn't this work?? Even if I pick Balnazzar... it still dosn't work?
 
Last edited:
Level 3
Joined
Nov 17, 2010
Messages
47
Its under the "Unit" dropdown list; Event Response - Hero Manipulating Item
  • Balanzzar
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Unit-type of (Hero manipulating item)) Not equal to Balnazzar
      • (Item-type of (Item being manipulated)) Equal to Balnazzar's Bloody Claws
    • Actions
      • Hero - Drop (Item being manipulated) from (Triggering unit)
Soo this should work right?
 
Last edited:
Level 1
Joined
Feb 26, 2011
Messages
6
Try this trigger

  • Events:
  • Unit - A unit Acquires an item
  • Conditions:
  • (Item-type of (Item being manipulated)) Equal to Balanzars Bloody Claws
  • Actions:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Unit-type of (Hero Manipulating Item)) Equal to Balnazzar
    • Then - Actions
      • Do Nothing
    • Else - Actions
      • Hero - Drop (Item being manipulated) from (Hero manipulating item)
 
Try this trigger

  • Events:
  • Unit - A unit Acquires an item
  • Conditions:
  • (Item-type of (Item being manipulated)) Equal to Balanzars Bloody Claws
  • Actions:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Unit-type of (Hero Manipulating Item)) Equal to Balnazzar
    • Then - Actions
      • Do Nothing
    • Else - Actions
      • Hero - Drop (Item being manipulated) from (Hero manipulating item)
You should remove Do Nothing from triggers. Also your trigger is worse than one suggested by Pharoh_

Main reason is that your trigger is activated each time when unit pick item, Pharoh_ trigger, will activate trigger only when it need to be activated.
Ofc this isn't such problem now, but in some maps that have over 100 triggers everything should be optimized.

Originally Posted by That One Guy
Try using "Hero Manipulating Item" instead of "Triggering Unit".
Wrong, triggering unit is the best way.

Please upload test map so we can check what you did wrong.
 
Level 3
Joined
Nov 17, 2010
Messages
47
You should remove Do Nothing from triggers. Also your trigger is worse than one suggested by Pharoh_

Main reason is that your trigger is activated each time when unit pick item, Pharoh_ trigger, will activate trigger only when it need to be activated.
Ofc this isn't such problem now, but in some maps that have over 100 triggers everything should be optimized.

Wrong, triggering unit is the best way.

Please upload test map so we can check what you did wrong.
Its under Hero class items... hope you have better luck than I did...
If you would do a GIGANTIC favor.... could you fix the Sylvanas with the murlocs cause its bugged too... ? =)
 

Attachments

  • An Icy Adventure {ORPG}.w3x
    2.5 MB · Views: 39
  • Balanzzar
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Balanzzar's Bloody Claws
      • Or - Any (Conditions) are true
        • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Balnazzar
        • Then - Actions
          • Do nothing
        • Else - Actions
          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
      • Quest - Display to (All players) the Warning message: You are NOT the req...
Do not look like one suggested by Pharoh_
Do it like this:

  • Balanzzar
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Balanzzar's Bloody Claws
      • (Unit-type of (Triggering unit)) Not equal to Balnazzar
    • Actions
      • Hero - Drop (Item being manipulated) from (Triggering unit)
      • Game - Display to (All players) for 3.00 seconds the text: You can't carry thi...
 
Level 3
Joined
Nov 17, 2010
Messages
47
Hmm okay I'll try
Edit: Hehe guess what.... IT STILL DOSN'T WORK! and it looks EXACTLY like yours??
  • Balanzzar
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Balnazzar's Bloody Claws
      • (Unit-type of (Triggering unit)) Not equal to Balnazzar
    • Actions
      • Hero - Drop (Item being manipulated) from (Triggering unit)
      • Game - Display to (All players) for 5.00 seconds the text: You are NOT the req...
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,191
Does the game text display at all? If not then eithor triggering unit does not return the manipulating unit, or you have hit the map initialization opperation limit.

If you are hitting the map initialization opperation limit, it is probably cause you are initializing huge arrays (dont, arrays do not need to be initialized as they are array lists and so expand as needed) or have too many triggers (can happen if you make 12 duplicates of the same code for each player on the map and 100s of triggers).
 
Level 3
Joined
Nov 17, 2010
Messages
47
It must work because trigger worked when I edited map :sad:
..... That be annoying as sh!t mon....

Does the game text display at all? If not then eithor triggering unit does not return the manipulating unit, or you have hit the map initialization opperation limit.

If you are hitting the map initialization opperation limit, it is probably cause you are initializing huge arrays (dont, arrays do not need to be initialized as they are array lists and so expand as needed) or have too many triggers (can happen if you make 12 duplicates of the same code for each player on the map and 100s of triggers).
Didn't get much of that but this much I can tell ya: I don't have that many triggers yet, I just started creating this map i have like 1 quest with 3 parts and such and yea the text appears saying what it's suppose to OTHER heros..
 
Status
Not open for further replies.
Top