Spawn Creep Jass, help explain how to pause the trigger?

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Spawn Creep Jass, help explain how to pause the trigger?

Post by Arabidnun »

This trigger is to spawn some Creeps on one side of the map:

function Trig_Red_Army_1_Func002001002 takes nothing returns boolean
return(GetOwningPlayer(GetEnumUnit())==Player(10))
endfunction

function Trig_Red_Army_1_Func002002 takes nothing returns nothing
call IssueImmediateOrderBJ(GetEnumUnit(),"holdposition")
endfunction

function Trig_Red_Army_1_Func004002 takes nothing returns nothing
call IssuePointOrderLocBJ(GetEnumUnit(),"attack",GetRectCenter(gg_rct_Red_Army_1a))
endfunction

function Trig_Red_Army_1_Actions takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h00Q',Player(10),GetRectCenter(gg_rct_Red_Army_1),bj_UNIT_FACING)
call ForGroupBJ(GetUnitsInRectMatching(gg_rct_Red_Army_1,Condition(function Trig_Red_Army_1_Func002001002)),function Trig_Red_Army_1_Func002002)
call TriggerSleepAction(0.50)
call ForGroupBJ(GetUnitsInRectAll(gg_rct_Red_Army_1),function Trig_Red_Army_1_Func004002)
call TriggerSleepAction(1.00)
call DisableTrigger(GetTriggeringTrigger())
call TriggerSleepAction(1.00)
call EnableTrigger(GetTriggeringTrigger())
endfunction

function InitTrig_Red_Army_1 takes nothing returns nothing
set gg_trg_Red_Army_1=CreateTrigger()
call DisableTrigger(gg_trg_Red_Army_1)
call TriggerRegisterTimerEventPeriodic(gg_trg_Red_Army_1,40.00)
call TriggerAddAction(gg_trg_Red_Army_1,function Trig_Red_Army_1_Actions)
endfunction

I believe it says summon the unit creep red army1 unit at givin region every 40 seconds....

However, how do i disable this trigger by pausing it, and tell me how to re-enable it?
User avatar
weirdone2
Forum Staff
Posts: 926
Joined: June 3rd, 2007, 8:03 pm

Re: Spawn Creep Jass, help explain how to pause the trigger?

Post by weirdone2 »

Pause = call DisableTrigger(gg_trg_Red_Army_1)
UnPause = call EnableTrigger(gg_trg_Red_Army_1)
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Spawn Creep Jass, help explain how to pause the trigger?

Post by Arabidnun »

Can anyone help me do this??

My Problem is:

1)Randomly Choose a hero from players 1-5
2)Randomly choose a hero from players 6-10

3)Choose the hero from 1-5, and 6-10 and move to specific spots

the rest i can basically get myself, its the problem of randomly choosing the hero from the sides and moving it to the duel...

Can anyone help me?
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 4445
Joined: November 19th, 2007, 5:05 am
Been thanked: 2 times

Re: Spawn Creep Jass, help explain how to pause the trigger?

Post by Bartimaeus »

Arabidnun wrote:Can anyone help me do this??

My Problem is:

1)Randomly Choose a hero from players 1-5
2)Randomly choose a hero from players 6-10

3)Choose the hero from 1-5, and 6-10 and move to specific spots

the rest i can basically get myself, its the problem of randomly choosing the hero from the sides and moving it to the duel...

Can anyone help me?
I've told you the answer plenty of times, you need to create a variable for each hero.
User avatar
Xantan
Honorary wc3edit.net Traitor
Posts: 2507
Joined: February 1st, 2007, 4:11 pm
Location: NEVADA

Re: Spawn Creep Jass, help explain how to pause the trigger?

Post by Xantan »

create a unit array variable and manually put each persons hero as their player number, that simplifies things.