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

[Trigger] Unit Indexer merge (JASS)

Status
Not open for further replies.
Level 8
Joined
May 19, 2016
Messages
146
Hello,

Iam currently trying to implement 2 awesome Systems from Hive in my Map but i have a problem with the Indexer. I know there can only be ONE Unit Indexer but i am not able to deleted one and merge both Systems.
Maybe someone can help me get the ''Is Unit Moving'' (Bribe) working in the ''Yu'lon Hero Concept'' (Chopinski) Map.
I need both of them together somehow ;;
(Iam using retail)



THANKS :)
 
Level 17
Joined
Mar 21, 2011
Messages
1,608
You would have to replace all usage of its API (Indexer by Chopinski) with Bribes API. Everything else should be the same.

JASS:
    function RegisterUnitIndexEvent takes code c returns nothing
        call TriggerAddCondition(Indexer.onIndex, Filter(c))
    endfunction
-->
  • Game - UnitIndexEvent becomes Equal to 1.00

JASS:
    function RegisterUnitDeindexEvent takes code c returns nothing
        call TriggerAddCondition(Indexer.onDeindex, Filter(c))
    endfunction
-->
  • Game - UnitIndexEvent becomes Equal to 2.00

JASS:
    function GetIndexUnit takes nothing returns unit
        return Indexer.unit
    endfunction
-->
  • UDexUnits[UDex]
 
Level 8
Joined
May 19, 2016
Messages
146
Nice! thanks for the quick answer. But i dont really know what to change.
because the Event with Bribes System is ''equal 1 and 2'' and Chopsinski has a script with ''Index'' and ''Deindex''
Sorry for being silly but i dont really know how to change it with your example >.<
 
Level 8
Joined
May 19, 2016
Messages
146
Wow thank you for the Example Map.
Now i added the ''Is moving'' and everythings works!


Thanks alot :)
 
Status
Not open for further replies.
Top