| 01-17-2009, 09:20 PM | #1 |
Is there a way to make an unit unselectable but still allow the players to make a right click on it , and targetable in general ? Any ideas ? EDIT : And don't talk about to detect the unit selection and then deselect it, it's too slow. |
| 01-17-2009, 09:48 PM | #2 |
Yes. Create the unit –> add 'aloc' –> chaos morph the unit into itself By "into itself" I mean that the Data - Morphed unit type of the Chaos ability is the same as the unit-type of the unit you are morphing from. |
| 01-17-2009, 09:53 PM | #3 | |
Quote:
No you can't target it in game with a right/left click, but i guess what i want is simply impossible. |
| 01-17-2009, 10:09 PM | #4 |
Right-clicking should work. At the very least you can target it with abilities, I know that. |
| 01-17-2009, 10:42 PM | #5 |
You cant chaos morph to same unit, you must have different units. Also your locust ability shoud be permanent (give it initially or use native) |
| 01-17-2009, 11:08 PM | #6 | ||
Quote:
Here is a test map, uncomment the lines to check that the unit is targetable with a trigger, but the unit is not targetable with the mouse. A condition was false in the required technology morph ability ... Quote:
|
| 01-17-2009, 11:47 PM | #7 |
^Wait, so to clarify, it works if you Chaos morph the unit into a different unit-type? Because I was having so many problems with this a few months ago... |
| 01-17-2009, 11:47 PM | #8 |
I think the trick was to add the locust ability after you chaos-morph the unit... I don't remember very well, I know I had this figured out in one of my spell olympics abilities, basically I did what the Warcraft III ability guide said should be done. |
| 01-18-2009, 12:01 AM | #9 | |
No, no. You add it before you morph. The reason for this is that the locust ability goes really wonky if you remove it from a unit, and chaos morphing the unit effectively does that, with a few extra tricks. You could morph it into another unit if you wanted to; the point is that the unit you are morphing into doesn't have locust. Quote:
If you don't believe me, check out the attached testmap. It's for a spell for a spell competition on TheHelper I did a while ago; the spell summons yourself from the future, and I used this very bug in that spell to make the summoned unit targetable by the player's spells. Try it out: |
| 01-18-2009, 12:22 AM | #10 |
I did more tests, and it facts it doesn't the same if the chaos morph ability unit id is the same as the unit or not. If they are the same, even if the ability 'Aloc' is not permanent (added in the object editor for the unit id or set to permanent with the function UnitMakeAbilityPermanent), you must add 'Aloc' (unneeded if the unit has already it but it doesn't matter) + morph + remove 'Aloc'. And you will get an unit totally unselectable and untargetable with the mouse but targetable with a trigger action or by an automatic attack (an ennemy detect it), or automatic spell ofc. If you don't remove 'Aloc' the unit won't be targetable at all. If they are not the same it works like Pyrogasm said. @Pyrogasm : In your map it's the same unit type, but not the same rawcode, that's what Diod wanted to said. But 'Aloc' doesn't need to be permanent, you're right. |
| 01-18-2009, 12:51 AM | #11 |
It should be the same rawcode...? |
| 01-18-2009, 01:06 AM | #12 | |
Quote:
It depends what you want. |
| 01-18-2009, 04:54 AM | #13 |
What I meant was that I thought I was using the the same rawcode in my testmap. |
| 01-18-2009, 08:57 AM | #14 | |
Quote:
I think you've seen it yourself, but it's just to be more clear ^^ |
| 01-18-2009, 01:38 PM | #15 | |
Quote:
Edit: Like I already said in my previous post, that's exactly how the Warcraft III ability guide said it could be done, reading that would have saved you guys some testing... |
