• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Charm and unit targeting

Status
Not open for further replies.
Level 6
Joined
Feb 15, 2005
Messages
183
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?
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
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
 
Level 6
Joined
Feb 15, 2005
Messages
183
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?
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
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
 
Level 6
Joined
Feb 15, 2005
Messages
183
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.
 
Level 6
Joined
Feb 15, 2005
Messages
183
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?
 
Status
Not open for further replies.
Top