HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Calling a function from the GUI

04-28-2004, 02:06 PM#1
Traeon-
Code:
function Trig_IgnoreAi takes real r, unit whichUnit returns nothing
    local real IgnoreTime = r
    local unit IgnoreUnit = whichUnit
    set udg_AI_Ignore_Orders[GetConvertedPlayerId(GetOwningPlayer(IgnoreUnit))] = true
    call TriggerSleepAction( IgnoreTime )
    set udg_AI_Ignore_Orders[GetConvertedPlayerId(GetOwningPlayer(IgnoreUnit))] = false
endfunction

//===========================================================================
function InitTrig_IgnoreAi takes nothing returns nothing
    set gg_trg_IgnoreAi = CreateTrigger(  )
    call TriggerAddAction( gg_trg_IgnoreAi, function Trig_IgnoreAi )
endfunction

I want to call this function from the GUI, but..

Code:
call Trig_IgnoreAi( 5.00, udg_TempUnit )

..did not work however.
04-28-2004, 06:08 PM#2
ThyFlame
Quote:
Originally Posted by Traeon-
Code:
function InitTrig_IgnoreAi takes nothing returns nothing


Code:
call Trig_IgnoreAi( 5.00, udg_TempUnit )

..did not work however.

I don't know JASS... but aren't you giving 2 values when its takes nothing and returns nothing?
04-28-2004, 06:39 PM#3
Wyll
There are two functions, he's calling the first.

I don't know what that fuction is trying to do either so I don't know what could be happening.