• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Why isn't this working?

Status
Not open for further replies.
Level 10
Joined
Feb 19, 2006
Messages
237
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Climb Tree
    • Actions
      • Unit - Create 1 Dummy Unit for (Owner of (Casting unit)) at (Position of (Target destructible of ability being cast)) facing Default building facing degrees
      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Disenchant to (Last created unit)
      • Custom script: call IssueTargetDestructableOrder(bj_lastCreatedUnit, "disenchant", GetSpellTargetDestructable())
that stupid owl caused by this ability is still there when it should be taken out by disenchant...
 
You have to understand few things. Disenchanct is point type spell meaning that you can't order unit to cast it on destructible but first set position of target tree and then call function that orders dummy to disenchant that location.

You are forced to use abilities that target trees by default (there are few exceptions surely) because channel can't target tree ;/
It's great that you use Naish Sentinel spell - because it works properly for this kind of actions.

Additionaly:
- your triggers leaks
- the string order is 'dispel' not 'disenchant'
- you have to consider speed of missle, if it's instant that you can run actions instantly, but if it has some speed (thus there is delay before owl will actually sit on tree) TriggerSleepAction or other 'delay' stuff should be introducted to your trigger.

Next time please add stuff required to test the trigger (trees) and create proper dummy unit =)
 

Attachments

  • TreeClimbTest.w3x
    9.1 KB · Views: 51
Status
Not open for further replies.
Top