• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Confusing bug :c

Status
Not open for further replies.
Level 2
Joined
Jul 23, 2010
Messages
6
Okay, so somehow i managed to make different weapons give different attack type/range/damage by manipulating with the ability "chaos"
Picking up a bow replaces the unit with a ranged one, dropping the bow will make it basic again, same is with melee, where only damage type is modified.
Anyway, when i had only one bow and sword, it all worked fine.. after i made 2 more items (1sword1bow) the triggers started to malfunction, and the stupid thing is that if a unit gets the same "chaos" based ability, the base damage starts to multiply or something like that :/. im wondering if someone chould just help me figure all this out.. its too difficult to explain so its better if i upload my problem here.
 

Attachments

  • Mapwithnoname.w3x
    80.5 KB · Views: 34
Don't use chaos; use this instead:
  • T
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Set ItemTypes[1] = Bow
    • Set ItemTypes[2] = Sword
    • Set UnitTypes[1] = Human (Bow)
    • Set UnitTypes[2] = Human (Sword)
  • Trigger
  • Events
    • Unit - A unit acquires an item
  • Conditions
  • Actions
    • Custom script: local integer i = 0
    • Custom script: local unit u
    • For each (Integer A) from 1 to 2, do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • (Item-type of (Item being manipulated)) Equal to ItemTypes[(IntegerA)]
          • Then - Actions
            • Custom script: set i = i + 1
          • Else - Actions
    • Custom script: if i > 0 and GetUnitTypeId (GetTriggerUnit()) != udg_UnitTypes[i] then
    • Custom script: set u = GetTriggerUnit()
    • Custom script: call ShowUnit (u, false)
    • Custom script: call KillUnit (u)
    • Custom script: call CreateUnit (GetOwningPlayer(u), udg_UnitTypes[i], GetUnitX (u), GetUnitY (u), GetUnitFacing (u))
    • Custom script: endif
ItemTypes[] is an Item-type variable and UnitTypes[] a Unit-type one.
 
Last edited:
Status
Not open for further replies.
Top