HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Unit roaming problem

08-10-2008, 12:19 PM#1
rizla
Sup everyone, i have a problem involving a unit roaming system i created that i need help with. I can't post my actual trigger because i'm nowhere near my world editor so please bear with me while i describe it.

After the unit spawns its ordered to attack move to a designated region. When enterring this area the following trigger runs...

Below is the trigger that spawns the unit and orders it to move to the first region.
Trigger:
Fur Forest Time Spawn 01 Copy
Collapse Events
Time - Every 15.00 seconds of game time
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Creepspawn_FurforestcapGNOLL Less than 10.00
Collapse Then - Actions
Unit - Create 1 Gnoll for Player 12 (Brown) at (Center of Creep Spawn Fur Forest Point 03 <gen>) facing Default building facing (270.0) degrees
Set Creepspawn_FurforestcapGNOLL = (Creepspawn_FurforestcapGNOLL + 1.00)
Special Effect - Create a special effect at (Center of Creep Spawn Fur Forest Point 03 <gen>) using Objects\Spawnmodels\Undead\UCancelDeath\UCancelDeath.mdl
Unit - Order (Last created unit) to Patrol To (Center of Creep Spawn Fur Forest waypoint 04 <gen>)
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Creepspawn_FurforestcapGWARRIO Less than 4.00
Collapse Then - Actions
Unit - Create 1 Gnoll Fighter for Player 12 (Brown) at (Center of Creep Spawn Fur Forest Point 11 <gen>) facing Default building facing (270.0) degrees
Set Creepspawn_FurforestcapGWARRIO = (Creepspawn_FurforestcapGNOLL + 1.00)
Special Effect - Create a special effect at (Center of Creep Spawn Fur Forest Point 11 <gen>) using Objects\Spawnmodels\Undead\UCancelDeath\UCancelDeath.mdl
Unit - Order (Last created unit) to Patrol To (Center of Creep Spawn Fur Forest waypoint 03 <gen>)
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Creepspawn_FurforestcapGARCHER Less than 5.00
Collapse Then - Actions
Unit - Create 1 Gnoll Archer for Player 12 (Brown) at (Center of Creep Spawn Fur Forest Point 10 <gen>) facing Default building facing (270.0) degrees
Set Creepspawn_FurforestcapGARCHER = (Creepspawn_FurforestcapGNOLL + 1.00)
Special Effect - Create a special effect at (Center of Creep Spawn Fur Forest Point 10 <gen>) using Objects\Spawnmodels\Undead\UCancelDeath\UCancelDeath.mdl
Unit - Order (Last created unit) to Patrol To (Center of Creep Spawn Fur Forest waypoint 03 <gen>)
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Creepspawn_FurforestcapGCROSSB Less than 3.00
Collapse Then - Actions
Unit - Create 1 Gnoll Bowman for Player 12 (Brown) at (Center of Creep Spawn Fur Forest Point 08 <gen>) facing Default building facing (270.0) degrees
Set Creepspawn_FurforestcapGCROSSB = (Creepspawn_FurforestcapGNOLL + 1.00)
Special Effect - Create a special effect at (Center of Creep Spawn Fur Forest Point 08 <gen>) using Objects\Spawnmodels\Undead\UCancelDeath\UCancelDeath.mdl
Unit - Order (Last created unit) to Patrol To (Center of Creep Spawn Fur Forest waypoint 02 <gen>)
Collapse Else - Actions
Do nothing

Below is the trigger that runs when the unit enters the first region.
Trigger:
Collapse Events
Unit - A unit enters Creep Spawn Fur Forest waypoint 01 <gen>
Collapse Conditions
((Triggering unit) is owned by Player 12 (Brown)) Equal to True
Collapse Actions
Unit - Order (Triggering unit) to Attack-Move To (Center of Creep Spawn Fur Forest waypoint 02 <gen>)
I have no idea why this doesn't work. The unit runs to the centre of the region and just simply stops there instead of moving onto the next.

I've tried various things to sort out this problem. Including changing the conditions, actions, triggering unit to entering unit etc. If you need me to post my trigger I'll try do it later tonight or early tomorrow.
08-10-2008, 01:31 PM#2
Tide-Arc Ephemera
So like, what's wrong?
08-10-2008, 02:03 PM#3
rizla
My bad, that was a noob thing to do, I forgot to say that when the unit reaches the first region it stops there for no apparent reason.
08-10-2008, 02:12 PM#4
Vestras
Dude, how simple does it need to be?
If this is everything you got in your code, there's definitely something wrong!

Post your whole code.
08-10-2008, 03:06 PM#5
rizla
Its simple in the example i gave, with one unit going to one region. Maybe simpler isn't the right word for it. I should rather say more efficient. Anyway, back to the issue at hand... I'll post the trigger tonight.
08-12-2008, 02:01 PM#6
rizla
okay well i've finally managed to get to my PC (thank god) so i've updated my post with the trigger.
08-13-2008, 07:01 AM#7
Pyrogasm
Perhaps try ordering the units to initially attack-move instead of patrol to their first destination?
08-13-2008, 08:16 AM#8
rizla
Just tried to order the units to instantly attack move to the location but they still stop at the first region. Its a very strange problem.