• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Timed Attacks

Status
Not open for further replies.
Level 8
Joined
Jul 3, 2004
Messages
334
I am wondering how you time units like mortar teams to attack a point... I have experimented, but am having major problems. Maybe I'm just not looking hard enough, but I can't figure it out. Like on some escape maps when mortar teams\meat wagons attack grong and try to kill your runner. Any clue people? Thanks in advance.
 
Level 6
Joined
Mar 25, 2005
Messages
304
You could always create a region, then set the mortal team movement to 0 so it doesnt move and make this sort of trigger.

Event: Map Initialization
Condition: None
Action: Order Unit Mortal Team (Or whatever the unit is) to attack ground in the middle of region (The region you want to fire at)

That should work. GOod luck
-Blue
 
Level 2
Joined
May 6, 2005
Messages
15
Try going into the unit settings for the mortar team and increasing the AoE damage splash range and damage factor? (Factor 0.0 = no splash damage dealt in splash radius. Factor 1.0 = 100% splash damage dealt in splash radius. Factor 0.5 = 50%, etc.)
 
Level 6
Joined
Mar 25, 2005
Messages
304
yea its probably because the splash damage isnt set high enough or wide enough. Mess around with that in the object editor. Good luck
-Blue
 
Level 4
Joined
Jan 9, 2005
Messages
106
as far as timing them you can set a trigger to tell it to attack region after a certain time, kind of like:

event
(i leave blank and use another trigger, normally start of this area, to trigger this timer)
condition
(no condition... just doesnt make sense to me)
action
order unit in region1(//or unit variable if you have that set) to attack region1
wait 1 second
order unit in region2 to attack region2

like that... i hope i explained it right :? lol

but as far as damage yes that probably is the splash radius and splash dmg
 
Level 6
Joined
Mar 25, 2005
Messages
304
minkork there is a problem with that trigger. Its unecessary. The cooldown time of the unit itself can be changed to make the cool down. Your process will just add extra triggers.
-Blue
 
Level 4
Joined
Jan 9, 2005
Messages
106
then blue how would u trigger it?
i see that as the easiest way to get it to work, and if you have multiple units of the same type firing at one or more areas at once... the cooldown wont work.
i think you misunderstood the idea of my post.
cooldown from firing tis the space between shots correct? then how would you cause 2 seperate units to fire one 2 different areas at different times?
I've done it like that with no issues. if you have a better example please post it :) we could all learn a lil something :)
(one fires, then a second fires, then cooldown causes first to fire again...)
 
Level 6
Joined
Mar 25, 2005
Messages
304
right nvm. I thought u had the event as periodic event and telling the unit to attack every 1 sec. But I guess i misread it. Sry lol
-Blue
 
Level 4
Joined
Jan 3, 2005
Messages
91
hmm I understand problem behind the problem you have, but I think you failed at another point. First your trigger:

make a variable ("MortarCounter") which serves as a counter that repeatedly counts from .. well for example 0 to 7 and as soon as it reaches 8, it must be set to 0.

do this by making a trigger with a periodic event (i.e. 0.50 seconds), the first action something like "Set MortarCounter = Mortarcounter + 1" and then "IF Mortarcounter >= 8 THEN Set Mortarcounter = 0 ELSE Do Nothing".

this trigger will execute every 0.5 seconds, and theres this weird counter running in it. Why? Next line in the trigger:

IF MortarCounter = 0 THEN Order Mortar1 to "_Attack Once_" Center of(MortarTargetRegion1)
IF MortarCounter = 1 THEN Order Mortar2 to "_Attack Once_" Center of(MortarTargetRegion2)
IF MortarCounter = 3 THEN Order Mortar3 to "_Attack Once_" Center of(MortarTargetRegion3)

Get it? If the counter is 0, mortar1 will attack, 0.5 sec later, the counter is 1 and morter 2 will attack. 0.5 seconds later, the counter is 2, nothing will happen, 0.5 seconds later, the counter is 3 and the third mortar will attack! This would be a great solution, BUT:

"Attack Once" doesnt exist for targeting a point. Doh. And if we attack an area, the mortars will keep attacking the point neglecting the order you gave them.

Suggested solution: Make a spell, that looks like the mortar missile and which deals damage, (i.e. "Cluster Rockets" from the tinker, set cooldown for that spell to 0.10 and mana cost to 0 and replace the missile gfx). Now you can "Order MortarN to [Goblin-Tinker Cluster Rockets] [Center of Mortar1Region]".

I hope you got it, pm me on finishing the map, good luck,

klovadis
 
Level 4
Joined
Jan 3, 2005
Messages
91
well my solution is absolute precise and allows perfectly timed attacks ;) but if it seems to work with a simpler solution thats fine, too.

note: it doesn't make ANY difference which unit you use, as long as it has splash damage and the damage area is properly calculated.

klovadis
 
Level 7
Joined
Feb 15, 2005
Messages
183
you know, they have a built-in function called "for each integer A do multiple functions"

set your regions into an array. make the trigger say from "1 to 7" and set the index to "intergerA" when you call the region. here is an exampl trigger:

Event - //What ever you want
Condition - //What ever you want
Action - For each (Integer A) from 1 to 7, do (Actions)
--Loop - Actions
----Unit - Order Mortar Team to Attack Ground (Center of YourRegions[(Integer A)]
----Wait 1.00 seconds //set this to however long between changing attacks you want


All you have to do, is assign your regions to a number from 1 to 7 in an array durring map initialization. then this trigger will call that region in a sequence, form 1 to 7. hopethis helps = )
 
Status
Not open for further replies.
Top