HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Mortar team attacking at one region, and not AUTO attacking my players.

05-14-2006, 11:28 AM#1
Opxono
I'm currently abandoning my TD for awhile. Working on a new maze now (think its much easier). The death regions where a unit walks onto it and gets killed immediately, i've done that. Now i need help with this mortar team thing.


(M)
(L)(AP)
(Space, death region)
(L)


M -> Mortar team
L -> Lane, where my players will walk and eventually complete the maze.
AP -> Where the mortar team will attack ground there. They should keep on attacking the ground and SHOULD NOT attack my players when they walk pass them (or when my players are near them)

Trigger:
MortarDG
Collapse Events
Time - Every 2.50 seconds of game time
Collapse Conditions
(Unit-type of (Picked unit)) Equal to Mortar Team
(Owner of (Picked unit)) Equal to Player 11 (Dark Green)
Collapse Actions
Unit - Order (Picked unit) to Attack Ground (Center of MortarDG1 <gen>)
Unit - Order (Picked unit) to Hold Position

Somehow it cant work. MortarDG1 is my region (Mortar Dark Green 1) where they will attack that region.
Someone please help =D
05-14-2006, 11:46 AM#2
Jacek
If you give them Worker classification, they won't auto-acquire targets.
05-14-2006, 12:08 PM#3
The)TideHunter(
Trigger:
MortarDG
Collapse Events
Time - Every 2.50 seconds of game time
Collapse Conditions
(Unit-type of (Picked unit)) Equal to Mortar Team
(Owner of (Picked unit)) Equal to Player 11 (Dark Green)
Collapse Actions
Unit - Order (Picked unit) to Attack Ground (Center of MortarDG1 <gen>)
Unit - Order (Picked unit) to Hold Position
What? you havent picked any units, so you cant refer to the function Picked Unit

EDIT: this is something like what you want:

Trigger:
MortarDG
Collapse Events
Time - Every 2.50 seconds of game time
Conditions
Collapse Actions
Set TempGroup = (Units owned by Player 11 (Dark Green) of type Mortar Team)
Collapse Unit Group - Pick every unit in TempGroup and do (Actions)
Collapse Loop - Actions
Unit - Order (Picked unit) to Attack Ground (Center of YourRegion)
05-14-2006, 05:07 PM#4
TaintedReality
If you care, that leaks a location and a group (and every 2.5 seconds, so it could get bad).
05-14-2006, 08:33 PM#5
iNfraNe
Quote:
Originally Posted by Jacek
If you give them Worker classification, they won't auto-acquire targets.
That is correct, if you give them the worker class in the object editor they will leave a "worker doing nothing" icon in the lower left corner of the screen. This can be fixed by adding the class by triggers.
05-15-2006, 04:05 AM#6
Opxono
Thanks you guys are helpful ^_^
05-15-2006, 12:37 PM#7
Opxono
Anyway, how do i finish the game by having it such that when 1 unit enters this specific region, a floating text will appear, saying: (Player which reached the region first) has won the maze!

Then this "Your defeated" thing will come up, and you will have to press "Quit Campaign" to finish the game.
05-15-2006, 02:18 PM#8
The)TideHunter(
Quite simple, here it is:

Trigger:
End Game
Collapse Events
Unit - A unit enters Your Region <gen>
Conditions
Collapse Actions
Floating Text - Create floating text that reads (Player + ((Name of (Owner of (Entering unit))) + reached the region first)) at (Center of Your Region <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Set TempPlayerGroup = (All players)
Player Group - Remove (Owner of (Entering unit)) from TempPlayerGroup
Player Group - Pick every player in TempPlayerGroup and do (Game - Defeat (Picked player) with the message: Defeat!)
05-16-2006, 07:27 AM#9
Opxono
Thanks .. i guess that solves everything .. and my map should be done in about 1 day (copying all regions + triggers). NEXT: TOWER DEFENSE =D
05-16-2006, 09:10 AM#10
Freakazoid
M -> Mortar team
L -> Lane, where my players will walk and eventually complete the maze.
AP -> Where the mortar team will attack ground there. They should keep on attacking the ground and SHOULD NOT attack my players when they walk pass them (or when my players are near them)

Trigger:
MortarDG
Collapse Events
Time - Every 2.50 seconds of game time
Collapse Conditions
(Unit-type of (Picked unit)) Equal to Mortar Team
(Owner of (Picked unit)) Equal to Player 11 (Dark Green)
Collapse Actions
Unit - Order (Picked unit) to Attack Ground (Center of MortarDG1 <gen>)
Unit - Order (Picked unit) to Hold Position


Change the attack ground, to attack-move.
05-16-2006, 03:30 PM#11
oNdizZ
actually, you dont need that periodic timer.
Unit - Order (Picked unit) to Attack Ground (Center of MortarDG1 <gen>)
will make the mortars attack the ground all the time. you should just change the Cooldown to.. in this case 2.5

Unit - Order (Picked unit) to Hold Position
will make them stand still and shoot at enemies who are currently in range (and seen, of course).