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

[JASS] 1024 trackables?

Status
Not open for further replies.
Would 1024 trackables, represented by 128x128 planes/panels slow down a 32x32 map? They would be placed to cover the whole map. If it would cause some delay in-game, or any other negative consequences, please state that here.

Another thing: How do I set the size of a Trackable while it maintains invisibility?

And one more thing: Could GetLocalPlayer help determining the triggering player, and if not, how could I determine the triggering player?

I need answers as soon as possible, please :)
All help will be rewarded and credited :)
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Another thing: How do I set the size of a Trackable while it maintains invisibility?

Make the model's material transparent with 0 alpha.

how could I determine the triggering player?

Give each player a private set of trackables:

JASS:
function CreateTrackableForPlayer takes string path, real x, real y, real angle, player p returns trackable
    if (GetLocalPlayer() != p) then
        set path = ""
    endif

    return CreateTrackable(path, x, y, angle)
endfunction

So a different player won't be able to trigger track/hit of the same trackable.
 
That adds up to a total sum of more than 12000. Will this cause lag?

I mean, 12k units or doodads would cause lag, but will 12k trackables (with only 1000 being visible to a player at any time) cause lag?

It'll only create 12k if it is a full-house map (if all 12 slots are taken by players). My system checks if the player is playing/is a user before creating the trackables, because only playable players can interact with trackables. ;)
 
Status
Not open for further replies.
Top