• 🏆 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!

[Trigger] Allready have item of that class problem

Status
Not open for further replies.
Level 10
Joined
Nov 24, 2010
Messages
546
Hello guys,

So I've tried to create simple system but it allways buggs with certain item categories.

Here are triggers:
I've done this 7 times, for each item category but I'dont know why it works only for 4 of them. Maybe it comes from Warcraft but I'm not really sure.

  • AllreadyHaveItemCampaing
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-class of (Item being manipulated)) Equal to Campaign
        • Then - Actions
          • Set CampaingCount = (CampaingCount + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CampaingCount Equal to 2
            • Then - Actions
              • Hero - Drop (Item being manipulated) from (Hero manipulating item)
            • Else - Actions
        • Else - Actions
  • AllreadyHaveItemCampaingLoop
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to Campaign
    • Actions
      • Set CampaingCount = (CampaingCount - 1)
If anyone know why this system don't work for some item classes and for some yes let me know. Also, if anyone have more effecient system free to share please upload it and let me download it. Thank you.

Palooo3
 
Level 4
Joined
May 23, 2010
Messages
83
I don't know what you're trying to do, but it's a really simple code. If it's a multiplayer map, be aware: you're not using arrays. And your should try this:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • CampaingCount Greater than 1
    • Then - Actions
      • Hero - Drop (Item being manipulated) from (Hero manipulating item)
If you say it worked with the other item classes, try to re-check your global variables. It should have worked. Enjoy your map.
 
Level 10
Joined
Nov 24, 2010
Messages
546
Yeah it works really fine but only for Campaing, Permanent, Artifact and don't remeber 4th.. code is the same for others too just different variable names... it comes from game not from triggers I guess. And no it is SPRPG with max hero, so it dont need to be MUI/MPI
 
Status
Not open for further replies.
Top