• 🏆 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] Questions about Trackables

Status
Not open for further replies.
Level 9
Joined
Jul 24, 2007
Messages
308
i have seen about the trackables, and i was wondering :
1 - are they considered as a unit/object? and do they leak? what model type they use?
2 - how to write a variable about them.. like set v = last created trackable or what?
3 - how to limit trackables on a region only?
 
Level 11
Joined
Feb 18, 2004
Messages
394
Trackables are a type of handle object in Warcraft 3 which can detect mouse events. They do this via triggers:
JASS:
native TriggerRegisterTrackableHitEvent takes trigger whichTrigger, trackable t returns event
native TriggerRegisterTrackableTrackEvent takes trigger whichTrigger, trackable t returns event
constant native GetTriggeringTrackable takes nothing returns trackable

Trackables are created with the CreateTrackable() function:
JASS:
native CreateTrackable takes string trackableModelPath, real x, real y, real facing returns trackable

Trackables can not be destroyed. Trackables can not be moved. I recall its possible to create trackables at a Z offset using walkable doodads, but I'm unsure if I remember correctly.

The area in which a trackable registers mouse events has something to do with the model. I forget.
 
Status
Not open for further replies.
Top