new to jass, need help with code

SyrisX

New Member
Reaction score
3
Hi guys.. I have a trackable placed on a calendar image within the game. When I click the image on a specific date it sets a pre-written string (reminder) to a hashtable to call at a later date.

The part I need help with is the message i have displaying to players. It currently displays the message to all players and I need it to display to the triggering player (the person that clicks the trackable)

As I said in the title. I am a nub when it comes to jass so any help at all will be appreciated.

JASS:

function Day1 takes nothing returns nothing
    call DisplayTextToForce(GetPlayersAll(),( "The following message has been set for the 8th of summer: " + udg_Reminder[GetConvertedPlayerId(GetTriggerPlayer())] ) )
    call SaveStringBJ( udg_Reminder[GetConvertedPlayerId(GetTriggerPlayer())], 8, GetConvertedPlayerId(GetTriggerPlayer()), udg_CalHash )
endfunction

//=========================================================================== 

function InitTrig_Day1 takes nothing returns nothing 
local trigger t=CreateTrigger()
local trackable tr=CreateTrackable("war3mapImported\\1x1Trackable.mdl",14855.00,14650.00,0)
    call TriggerRegisterTrackableHitEvent(t,tr)
    call TriggerAddAction(t,function Day1)
endfunction
 

Azlier

Old World Ghost
Reaction score
461
[lJASS]GetTriggerPlayer[/lJASS] doesn't work with trackables. If you have access to vJass, you can use Trackable2.

Also: Switch to using natives and use [lJASS]DisplayTextToPlayer[/lJASS] instead.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top