• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Simple Trigger Problem

Status
Not open for further replies.
Level 1
Joined
Oct 5, 2009
Messages
1
It's probably one of the most simple triggers I have ever done, but I can't get it to work.

All it is--

Events - A unit begins casting an ability.
Conditions - (Ability being cast) Equal to Defend
Actions - Order Footman 0001 <gen> to Human Footman - Defend

It doesn't work, and it's so simple that its really frustrating. I've tried "begins the effect of an ability" and everything else that could possibly be related to casting defend. It works when I replace the initial casting ability (defend) with something else, like chain lightning or something.
I don't know if it's something I need to do in the object editor with the defend ability itself, but I can't figure it out.

If it helps put it in context, i'm just trying to make a squad of people defend at the same time, and i'm using the "commander" to initiate the defend of the other units in the squad.

Can anyone help?
 
Level 4
Joined
Jul 24, 2009
Messages
59
Events - A unit begins casting an ability.
Conditions - (Ability being cast) Equal to Defend
Actions - Order Footman 0001 <gen> to Human Footman - Defend

You have it set to a specific pre made unit, example, "Footman 0001", which means it will only work for the unit you selected. You have to make the action set to unit type, not specific unit.
 
Level 8
Joined
Feb 15, 2009
Messages
463
It's probably one of the most simple triggers I have ever done, but I can't get it to work.

All it is--

Events - A unit begins casting an ability.
Conditions - (Ability being cast) Equal to Defend
Actions - Order Footman 0001 <gen> to Human Footman - Defend

?

1st of all always use spell effect as event for castings

and it doesnt work because you detect if he casts defend and want to use defend again

look this

footman uses defend -> footman is in defend -> you issue again defend -> he is still in defend if you use e.g. defend-off then it will work =D
 
Level 6
Joined
Mar 22, 2009
Messages
276
2 things to ask:
does the Footman gen<0001> have the defend ability?
have you removed the techtree - requirement?

2 things to say:
the best thing to use is unit - starts the effect of an ability.
Footman gen<0001> is only referring to a single unit.

1 more thing for ideas:
  • defend
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • ((Unit-type of (Triggering unit)) Equal to COMMANDER) and ((Ability being cast) Equal to CommanderDefend)
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units of type Footman) and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Human Footman - Defend
 
Status
Not open for further replies.
Top