Warcraft III resources & community, 2003–2006 · archived

Charm and unit targeting

11 posts
#1

Charm and unit targeting

I am trying to make a "convert" ability for a map i have been working on for awhile called Religious Warfare. The problem is, I can't get the targeting to work the way i want it to. I want it to be able ot convert high level units as the ability levels up for example:

Level 1 - low unit
level 2 - low unit cheap cost
level 3 - low and mid unit
level 4 - low and mid unit cheap cost
level 5 - Low, mid, and high unit


The problem is, When i set the "maximum creep level" to the charm spell, it seems to totaly disregaurd the level of the units that are being converted. Any suggestions?
#2
Well... I didn't really get what you mean but from what I do, I suspect that your problem is that Charm doesn't really respect its fields for checking unit level at higher level. Well, we can simulate that of course. You will need the following trigger:

Event - An Unit Begins Casting an Ability
Conditions - Ability Being Cast equal to YourAbility
- OR (Any Conditions are true)
-> (Level of YourAbility for (Triggering Unit) is less than or equal to 2) AND (Level of (Target Unit of Ability Being Cast) greater than x))
-> (((Level of YourAbility is greater than 2) AND (Level of YourAbility is less than or equal to 5)) AND (Level of (Target Unit of Aiblity Being Cast) greater than y))
-> (((Level of YourAbility is greater than 4 AND (Level of (Target Unit of Aiblity Being Cast) greater than x))
Actions - Order (Triggering Unit) to Stop
- Game - Text Message - //blabla, the text you want

Hopefully this has helped you...

~Daelin
#3
Thx daelin, I was hoping to find a solution in the object editor, you were correct about the problem, the fields in the object editor weren't reflecting the actual targeting of the unit's level. Perhaps charm only works on neutral hostile creeps when considering creature level? Since i am targeting neutral passive, maybe it doesn't even make the level check. I just like the inerface message when trying to target something and it fails, like "cannot target heroes" or "cannot target organic unit" or "creature too powerful". I guess i can just do a text message, but that seems kinda sloppy. What I would really like to do, is just use the object editor to mess with targeting.

Do you think there is a way i could use the creature type as an indicator as to what can and cannot be targeted? for example. I can make the low level creep, suicidal, the mid level, mechanical, and the high level, ancients. And as the ability progresses, I will add each type to the allowed targets field? I have tried doing this, but It tends to screw up when there is more than one type of allowed target in the field. Maybe I am not understanding correctly how those fields work?
#4
Actually, the method would screw things up. NO, don't do that, it would be too much editing. And no, I don't think its your problem. Some fields and abilities are just buggy. And believe me, my method will not only show up the error message but it will stop the caster from casting the ability.

Non-buggy at all. There are some stubborn people like you who believe that they can just do everything through Object Editing. NO, sometimes you have no other solution but to get involved in triggers. And this is the time to do it.

~Daelin
#5
lol I am not totaly against making triggers for it. Its just the message wont show up in gold letters at the bottom middle of the screen. Which will be O.K. I suppose. I wasn't sure if the fields were buggy for sure or what. Thx for the responses Daelin. And its not that i am stubborn about making triggers. The map i have has 88 triggers in it already, so I really don't mind triggering at all.
#6
Lol, color stuff is not a problem. Here is the solution. The message should look like this:

|cffffcc00MESSAGE|r

In place of MESSAGE write your message. Keep in mind to leave no spaces. If you want more information about colors in warcraft 3 go here: http://www.wc3sear.ch/viewtopic.php?t=6259

~Daelin
#7
Sorry, I am probably making this more confusing than it really is. I am going to make a trigger to fix the spell, but the reason I was asking for a solution within the object editor was to get an official "can't target" message at the bottom middle of the screen. The messages come up when you initiate a targeted ability and is in a location that would not be possible to get at with triggers (as far as I know). You know when you click on a targeted ability and it has a note that says "target object" and then if you click on the ground or somehting it will make a little error noise and then give you a message of why you can't target that spot or unit, or whatever. I'm not sure if I can replicate that message system using triggers. Are you saying I can replicate what I described using your method?
#8
Well, techincally yes. The only problem is with the sound. As far as I know, there is no way you can make an error sound play, unless it plays for ALL the players. So except the error sound, yeah, it is possible.

~Daelin
#9
interesting, how do you get the text to show up at the bottom rather than in the chat area?
#10
Umm, I don't get what you mean. Just use the Game Text action and it should work. I never tried it in multiplayer. Does it appear in chat? If it does... damn! But as far as I know, it shouldn't.

~Daelin
#11
it does :cry:. Oh well, its not that big of a deal, I just like everything to be clean and uniform. Its mostly just for looks. Thanks for all your help, the trigger you suggested works just fine. :)