• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[JASS] MPI Trackables

Status
Not open for further replies.
Level 24
Joined
Aug 1, 2013
Messages
4,658
Hi all.

I am creating a dungeon map and I want to have a custom inventory system.
Full screen etc.
Next to that a custom (full screen) skilltree thingy and maybe more of that kind.
I have done the concept before but I cannot figure out how to make it mpi/mui.

I know I can't do GetTriggerPlayer() but I thought that there was something with GetLocalPlayer() that it would make it perfect.

Can anyone remind me of how you make trackables MPI?

Thanks in advantage.
 
Ah thanks.

I got it again.

EDIT:
Can I not put everything inside the "(GetLocalPlayer() == p)"?
Or is that bullshit?
JASS:
loop
        exitwhen i > udg_Player_Amount
        set p = Player(i)
        if GetPlayerSlotState(p) == PLAYER_SLOT_STATE_PLAYING and GetPlayerController(p) == MAP_CONTROL_USER then
            if GetLocalPlayer() == p then
                set s = "war3mapImported\\Trackable.mdx"
            else
                set s = ""
            endif
            set t = CreateTrackable(s, x, y, 0)
            set id = GetHandleId(t)
            
            //Register the events for the trackable.
            call TriggerRegisterTrackableHitEvent(fcw_Trigger_TrackableClick, t)
            call TriggerRegisterTrackableTrackEvent(fcw_Trigger_TrackableHover, t)
            
            //Save the data to the hashtable.
            call SaveInteger(fcw_Hashtable, id, 0, whichFCW)
            call SaveInteger(fcw_Hashtable, id, 1, i)
            call SaveInteger(fcw_Hashtable, id, 2, x)
            call SaveInteger(fcw_Hashtable, id, 3, y)
        endif
        set i = i + 1
    endloop
 
You can't "create" something inside GetLocalPlayer block.Only exceptions are floating texts.

The reason this works is, you are creating a trackable for all players but since trackables of player 2 has invalid model for other players they can't click it.
 
Status
Not open for further replies.
Back
Top