• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

Problem with this trigger

Status
Not open for further replies.
Level 10
Joined
Jun 17, 2014
Messages
236
Hello hive!
I have a problem with this trigger :
Credit to Maker for creating this system.
  • Attack
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set Uu1 = (Attacking unit)
      • Custom script: set udg_Ui1 = GetHandleId(udg_Uu1)
      • Custom script: set udg_UTempTimer = LoadTimerHandle( udg_Uhash , udg_Ui1 , StringHash("timer") )
      • Custom script: if udg_UTempTimer == null then
      • Custom script: set udg_UTimerIndex = udg_UTimerIndex + 1
      • Custom script: call SaveTimerHandle( udg_Uhash , udg_Ui1 , StringHash("timer") , udg_UTimer[udg_UTimerIndex] )
      • Custom script: call SaveUnitHandle( udg_Uhash , GetHandleId( udg_UTimer[udg_UTimerIndex] ) , StringHash("unit") , udg_Uu1 )
      • Custom script: else
      • Custom script: if LoadBoolean( udg_Uhash , udg_Ui1 , StringHash("boolean") ) != false then
      • Custom script: set udg_Ur1 = TimerGetElapsed( LoadTimerHandle( udg_Uhash , udg_Ui1 , StringHash("timer") ) )
      • Custom script: set udg_UnitASPD[GetUnitUserData(udg_Uu1)] = udg_Ur1
      • Game - Display to Player Group - Player 1 (Red) the text: (Attack interval was: + (String(UnitASPD[(Custom value of Uu1)])))
      • Custom script: endif
      • Custom script: endif
      • Custom script: call TimerStart( LoadTimerHandle( udg_Uhash , udg_Ui1 , StringHash("timer") ) , 30. , false , null )
      • Custom script: call SaveBoolean( udg_Uhash , udg_Ui1 , StringHash("boolean") , true )
  • Error
    • Events
      • Unit - A unit Is issued an order with no target
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order targeting an object
    • Conditions
    • Actions
      • Custom script: if LoadBoolean( udg_Uhash , udg_Ui1 , StringHash("boolean") ) == true then
      • Custom script: call SaveBoolean( udg_Uhash , udg_Ui1 , StringHash("boolean") , false )
      • Custom script: endif
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set Uhash = (Last created hashtable)
When i test it on the test map it's working properly, but when i import on any other map it's not working properly!, i dont know what's the problem. you can try it to your map
i will give +2 REP
Here the test map
Attack_Speed_Detection.w3x
 

Attachments

  • Attack_Speed_Detection.w3x
    25.8 KB · Views: 109
Level 10
Joined
Jun 17, 2014
Messages
236
lol, i've try it even in a new blank map, and import it, it does'nt work.
oh my god......., what's wrong with me.

EDIT : it still not solved!
why people go away?
if i try it, it only work for first attacker in the map, else it don't work.

EDIT2 : SOLVED!
WITH MY OWN SOLUTION
 
Last edited:
Status
Not open for further replies.
Top