HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Unable to target units?

07-30-2007, 09:30 PM#1
PenguinEmperor
Damn, I post here alot.

Anyway, I have a trigget so thhat when one unit uses Patrol, another unit casts Drunken Haze at the posistion patrol targeted. But this dosen't work.

I have have a similar trigger that makes it so when the same unit uses move, the other unit cast Breath Of Fire at the move point. This works, but not when move targets a unit.

Any help?
07-30-2007, 09:38 PM#2
Ignitedstar
If it's trigger help you need, isn't this in the wrong area? Don't worry; I'm sure one of the moderaters can move it.

They might not work, because the unit that casts [Insert spell name here] is not within range to use the spell. Or they can't see them, etc.
07-30-2007, 09:45 PM#3
PenguinEmperor
No. It's an FPS. One unit is the control box. The other is the actual attacking unit you move around. He is clearly withing range. And black mask and FOW are disabled.

I got Breath of Fire to work. Drunken Haze dose not, though
07-31-2007, 01:23 AM#4
Panto
Drunken Haze is actually a unit-targeting spell, not a point target.

You may fool this challenge by placing a modeless enemy unit at the point of the patrol and ordering your caster to Drunken Haze that, instead.

For cleanliness, you ought to then destroy/remove the modeless unit or hide and reuse him the next time it happens.
07-31-2007, 01:26 AM#5
PenguinEmperor
I know. I have the events like this.

Trigger:
BladeArm Copy Copy
Collapse Events
Unit - Pandaren 0002 <gen> Is issued an order targeting an object
Unit - Pandaren 0002 <gen> Is issued an order targeting a point
Collapse Conditions
(Issued order) Equal to (Order(patrol))
Ales Greater than or equal to 1
Collapse Actions
Trigger - Turn off (This trigger)
Unit - Add Drunken Haze to (Ordered unit)
Unit - Order Pandaren 0001 <gen> to Neutral Pandaren Brewmaster - Drunken Haze (Target unit of issued order)
Trigger - Run Shells <gen> (checking conditions)
Unit - Remove Drunken Haze from (Ordered unit)
Wait 5.00 seconds
Trigger - Turn on (This trigger)

I used give and remove to prevent him from using it without him beong told to.
07-31-2007, 01:32 AM#6
Panto
Try moving the Remove Ability action after the Wait. Your caster may be in the process of pivoting or aligning still when the ability is removed.

Also, include several debug "Game Message" actions that output what all your variables are at each stage, so you can see where they might be going wrong.

Lastly, if your caster isn't in range when he is ordered, this trigger won't work at all, since it will add and remove the ability before he gets in range. You may wish to have a range-checker built into the trigger, perhaps with another trigger that detects when he gets in range and checks to see what his order is.
07-31-2007, 01:45 AM#7
PenguinEmperor
Hmm. Good thoughts. Can I see a debug trigger please?
07-31-2007, 02:40 AM#8
Pyrogasm
You haven't moved this yet Panto?

What he means by "Debug Messages" is stuff like this:
Trigger:
----- Some Actions -----
Game - Display to (All Players) the text ("Loop Started")
Collapse Unit Group - Pick every unit in Some_Group and do (Actions)
Collapse Loop - Actions
----- Some Actions -----
Game - Display to (All Players) the text ("Loop Ended")
In the above example, you can be sure that the loop both starts and ends if both messages are displayed.
07-31-2007, 05:36 PM#9
PenguinEmperor
I tried the above trigger, and both messages appear instantly when I order Unit 1 to use patrol somewhere on the map. However, Unit 2 does not cast Drunken Haze.
08-01-2007, 01:10 AM#10
Panto
Rather than simply have an action that blurts out a message, as Pyrogasm's, it's more useful to have a message inside the loop that blurts out the name of every unit picked and a message at the beginning telling what point or unit was targeted and pinging the map there.

Debug information is valuable in the details.
08-01-2007, 01:15 AM#11
PenguinEmperor
I'll try that. This seems hopeless.

Did the ping thing. I made it so that it pings at posistion of target unit of issued order, but it always pings the center unless I target myself with patrol.
08-01-2007, 05:12 AM#12
Panto
Then it's not getting that unit properly.

With that knowledge in hand, it looks like you have no event for "unit issued an order targeting a unit", just for "object". Is there a more specific or appropriate event for that?

By checking the various points where the targeted unit is defined and used, you can sort out why it's not returning the proper position.

FYI, it's pinging the center because returning the position of a null unit gives you 0,0.
08-01-2007, 05:14 AM#13
PenguinEmperor
Object is as close to unit as you can get.

I tried that dummy unit thing, and it fails just as much as all of the other things.


D'OH! I make stupid mistake. Thanks Panto! Dummy works fine, because Haze has AOE biff.

I accidentally made the dummy a friendly unit.