• 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.

Ping Minimap and Message problem

Status
Not open for further replies.
Level 3
Joined
Nov 7, 2006
Messages
36
I have a problem with a trigger (or whatever you call them). Its supposed to create a unit at a random point in a region (this far it works as intended) and ping the mini map at the spawn location. Its also supposed to send a message to all players, but it does none of the later two. Here's the code
JASS:
function Trig_greg_enter_Actions takes nothing returns nothing
    local integer number
    local real pingx
    local real pingy
    local location spawngreg = Location(GetRandomReal(-3008.00, -2240.00), GetRandomReal(-1632.00, 288.00))
    call CreateUnitAtLoc(Player(12), 'h004', spawngreg, GetRandomReal(0.00, 360.00))    
    loop
        call DisplayTimedTextFromPlayer(Player(number), 0, 0, 6.00, "Greg has spawned in the dining area")
        set number = number + 1
        exitwhen number == 12
    endloop
    set pingx = GetLocationX(spawngreg)
    set pingy = GetLocationY(spawngreg)
    call PingMinimapEx(pingx, pingy, 5.00, 255, 255, 255, true)
    set spawngreg = null    
endfunction

//===========================================================================
function InitTrig_greg_enter takes nothing returns nothing
    set gg_trg_greg_enter = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_greg_enter, 10.00 )
    call TriggerAddAction( gg_trg_greg_enter, function Trig_greg_enter_Actions )
endfunction
I guess its just some simple noob mistake, but I would be glad if someone could tell me what's wrong.
 
Status
Not open for further replies.
Top