• 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.

Problem with attack speed detection 2

Status
Not open for further replies.
Okay, now it's work for every attacker on the map, but it clash with another unit.
when unit 1 attack (2.0 attack interval), and unit 2 attack after 1 second unit 1 attack.
unit 1 attack speed will detected as 1.0 second interval.

+2 REP if solved.

  • 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_UDex
      • 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(Ur1)))
      • 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)
thanks for advance :ogre_haosis:
 

Attachments

  • asdasd.w3x
    32.6 KB · Views: 58
I got 'attack speed tracking' mini-system in one of my test maps, will share with you after I come back from work. But it is with Unit Indexer /no hashtable/. As I remember you have to filter 851974 order *and* detect when attacker start moving (imagine target running and your attacker follow him - in this case you wont get any order issued, you must detect if unit start moving)
zibi
 
I got 'attack speed tracking' mini-system in one of my test maps, will share with you after I come back from work. But it is with Unit Indexer /no hashtable/. As I remember you have to filter 851974 order *and* detect when attacker start moving (imagine target running and your attacker follow him - in this case you wont get any order issued, you must detect if unit start moving)
zibi

oh, let see :)
i can wait.
 
Status
Not open for further replies.
Top