HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Pre-Orders

08-17-2006, 05:37 AM#1
Waynebebay
Vague title? Lemme explain

I am composing an intricate AoS and would like to know a few things.

1. I have an triggered AI set up that works like this:
Trigger:
Collapse EVENT
Unit is attacked
Collapse CONDITIONS
Unit life is less than or equal to 100
Collapse ACTIONS
If - Integer 1 to 100 less than or equal to 7
Collapse Then - Pick every units within 275 of (triggering unit) matching (enemy of (triggering unit))
Order picked unit to attack (triggering unit)
Else - Do nothing
(referenced from mind, dont have the trigger in front of me right now)

That trigger works perfectly giving a 7% chance for enemy units to focus their attacks on the weakling.

My problem is since AoS maps consist of spawning units and sending them to the opposing base that if I give them an order to attack the weakest unit they discard the main order of attack-move to opposing base thus sending them back to the spawn point.

I would like to know if there is a way for them to keep the original orders after they are issued a temporary order.
08-17-2006, 06:13 AM#2
st33m
This probably needs JASS, but set the unit to a local variable, and make a trigger when that unit dies order them to attack to where you want them to end up.
08-17-2006, 07:42 AM#3
Waynebebay
Quote:
Originally Posted by st33m
This probably needs JASS, but set the unit to a local variable, and make a trigger when that unit dies order them to attack to where you want them to end up.

Sounds good but it wouldnt work with the complicated triggers I have, get this, I failed to explain the process:

Globally I wanted an easy approach on spawning yet visual, I wanted to show the barracks training the units so I have dummy units set to build which are removed on completion (thus giving the look that the barracks are actually training units) ALTHOUGH the melee and ranged units are the same, I have 6 custom melee units and 5 custom ranged, same stats just used for different spawns... let me explain:

Trigger:
Collapse Event-
Unit is trained
Collapse Conditions-
Unit = to Dummy1
Collapse Action-
Create 4 Footman1 at Spawn1

Trigger:
Collapse Event-
Unit enters Spawn1
Collapse Conditions-
Unit = Footman1
Collapse Actions-
Pick all units in (Spawn1) then do;
Issue order (picked unit) attack-move to Point1

What I am trying to get at is that there are SPECIFIC spawns and points for SPECIFIC units:

Spawn1 will ONLY react to Footman1
Spawn2 will ONLY react to Footman2
Spawn3 - Footman3
so on and so forth

So when you say:

Quote:
make a trigger when that unit dies order them to attack to where you want them to end up

Its much more difficult than that because I need to know which Footman/Grunt or Rifleman/Troll was attacking (whether it was Footman1,2,3,4,5,6) and which Point(reg) they were running to PREVIOUS to the interruption.

Maybe I am complicating something that is so little or thinking of all the possible bugs, let me know pls.

Thanks!
08-17-2006, 07:52 AM#4
st33m
Oh. You could check if a unit is issued the order Stop, and then order them to do something. That MIGHT work. You could check unit type and anything else you might need.

But it sounds cool.

Also for the second trigger, make sure to not order everything in it, just the footman. As you posted it, if there is a hero standing in it, it will order him to attack move also.
08-30-2006, 10:23 AM#5
Waynebebay
Oh ya right, I did that