Im making a map and i have a problem:
Firstly, i want it to be that when i enter a maze/dungeon then a trigger will spawn the mosnters... and if i exit it will make all the left over monsters disappear
i have these trigs so far:
This one works:
which is:

And also, is there a way to make the units stay at one spot? because they can see through the trees... (WHY?) without Camping?
Anyone know why they dont work? (if you want map then i will upload it)
Firstly, i want it to be that when i enter a maze/dungeon then a trigger will spawn the mosnters... and if i exit it will make all the left over monsters disappear
This one works:
-
SpawnWolves
-
Events
-
Time - Every 2.00 seconds of game time
-
-
Conditions
-
Actions
-
Set CreepNumber2 = (CreepNumber2 + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CreepNumber2 Equal to 1
-
-
Then - Actions
-
Unit - Create 3 Snow Wolf for Player 11 (Dark Green) at (Random point in Dung2ComOut <gen>) facing Default building facing degrees
-
Unit - Create 1 Boss Wolfe for Player 11 (Dark Green) at (Random point in Dung2Out <gen>) facing Default building facing degrees
-
Unit - Create 4 Snow Wolf for Player 11 (Dark Green) at (Random point in Dung2ComOut <gen>) facing Default building facing degrees
-
Unit - Create 3 Snow Wolf for Player 11 (Dark Green) at (Random point in Dung2ComOut <gen>) facing Default building facing degrees
-
Unit - Create 4 Snow Wolf for Player 11 (Dark Green) at (Random point in Dung2ComOut <gen>) facing Default building facing degrees
-
-
Else - Actions
-
Do nothing
-
-
-
-
-
Kill Wolves
-
Events
-
Unit - A unit leaves Dung2ComOut <gen>
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Triggering unit)) Equal to Dungeoneer
-
(Number of units in (Units in Dung2ComOut <gen> owned by Player 1 (Red))) Equal to 0
-
(Number of units in (Units in Dung2ComOut <gen> owned by Player 2 (Blue))) Equal to 0
-
(Number of units in (Units in Dung2ComOut <gen> owned by Player 3 (Teal))) Equal to 0
-
(Number of units in (Units in Dung2ComOut <gen> owned by Player 4 (Purple))) Equal to 0
-
(Number of units in (Units in Dung2ComOut <gen> owned by Player 5 (Yellow))) Equal to 0
-
(Number of units in (Units in Dung2ComOut <gen> owned by Player 6 (Orange))) Equal to 0
-
(Number of units in (Units in Dung2ComOut <gen> owned by Player 7 (Green))) Equal to 0
-
(Number of units in (Units in Dung2ComOut <gen> owned by Player 8 (Pink))) Equal to 0
-
(Number of units in (Units in Dung2ComOut <gen> owned by Player 9 (Gray))) Equal to 0
-
-
Then - Actions
-
Unit Group - Pick every unit in (Units in Dung2ComOut <gen>) and do (Actions)
-
Loop - Actions
-
Unit - Remove (Picked unit) from the game
-
-
-
-
Else - Actions
-
Do nothing
-
-
-
-
which is:
-
INIT Store Creeps
-
Events
-
Map initialization
-
Time - Elapsed game time is 2.00 seconds
-
-
Conditions
-
Actions
-
Set Loop = 0
-
Unit Group - Pick every unit in (Units owned by Neutral Hostile) and do (Actions)
-
Loop - Actions
-
Set Creep_Type[Loop] = (Unit-type of (Picked unit))
-
Set Creep_Position[Loop] = (Position of (Picked unit))
-
Unit - Set the custom value of (Picked unit) to Loop
-
Set Loop = (Loop + 1)
-
-
-
Destructible - Pick every destructible in (Playable map area) and do (Actions)
-
Loop - Actions
-
Destructible - Open All walls of (Picked destructible)
-
-
-
-
JASS:
function Trig_Revive_Creeps_Actions takes nothing returns nothing
local integer CUSTOM
set CUSTOM = GetUnitUserData(GetDyingUnit())
call TriggerSleepAction( 10.00 )
call CreateNUnitsAtLoc( 1, udg_Creep_Type[CUSTOM], Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_Creep_Position[CUSTOM], bj_UNIT_FACING )
call SetUnitUserData( GetLastCreatedUnit(), CUSTOM )
endfunction
//===========================================================================
function InitTrig_Revive_Creeps takes nothing returns nothing
set gg_trg_Revive_Creeps = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Revive_Creeps, Player(PLAYER_NEUTRAL_AGGRESSIVE), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Revive_Creeps, function Trig_Revive_Creeps_Actions )
endfunction
And also, is there a way to make the units stay at one spot? because they can see through the trees... (WHY?) without Camping?
Anyone know why they dont work? (if you want map then i will upload it)