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

How to not index starting locations?

Status
Not open for further replies.
Level 15
Joined
Aug 7, 2013
Messages
1,337
Why would you need to index starting locations?

Not being accusatory--just would like more information in order to help you out best.
 
Level 15
Joined
Nov 30, 2007
Messages
1,202
I dont need to index them, they are indexed. Cus the other units start at 12 or 13 so it can't be any thing else.

While we are at it, if I have a amount of 20-40 unit types I don't want to be indexed... How do i best block them?

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Unit-type of (Matching unit)) Not equal to City Developer
      • (Unit-type of (Matching unit)) Not equal to Military Developer
        • .....
        • 40...
      • UDexEnabled Equal to True
    • Then - Actions
    • IndexStuff()
I don't think this is a good method. Perhaps load every unit-type to not be indexed into a hash and then if the hash returns 1 it doesn't index?
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
If you want to create unit without indexing it via Bribe's indexer you just:
  • Set UnitIndexerEnabled = false
  • Unit - Create (...)
  • Set UnitIndexerEnabled = true
However, you want to customize the index-condition block you need to head directly to Bribe's indexer, and find:
  • -------- --------
  • -------- You can also customize the following block - if conditions are false the (Matching unit) won't be indexed. --------
  • -------- --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • UnitIndexerEnabled Equal to True
Insert any conditions you want with (Matching unit) as a unit reference. Those will be taken into consideration and properly omited.

You could also read the documentation about Bribe's stuff before asking ^)^
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
And what do you expect? Is there easier solution apart from inserting conditions into internal indexer's code? Thats how Bribe intended his filter to work anyway.

Instead of unitid check smap he could just add a hidden ability to each of those unit-types and then check: (Level of "ability" for (Matching unit) == 0). He could also retrieve the constant integer values corresponding to given types, order the types to be on thop of each other - A000, A001, A002 (...) and then perform integer value check: GetUnitTypeId(u) > range and GetUnitTypeId(u) < range.
 
Status
Not open for further replies.
Top