• 🏆 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!

[Trigger] help making a trigger MUI

Status
Not open for further replies.
Level 31
Joined
Jul 7, 2008
Messages
4,185
  • autocast purge
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Purge (Autocast)
    • Actions
      • Set tempPointE = (Target point of ability being cast)
      • Unit - Create 1 Purge Dummy for (Owner of (Casting unit)) at tempPointE facing Default building facing degrees
      • Unit - Order (Last created unit) to Orc Shaman - Purge (Target unit of ability being cast)
      • Unit - Remove (Last created unit) from the game
      • Custom script: call RemoveLocation (udg_tempPointE)
i need help with making this spell trigger MUI. it's basically a autocast version of purge. i don't know if it needs to be MUI or not, but when using it at the same time sometimes it dosn't work, so i'm guessing so. i've never done this before so i have no idea what to do to make it MUI
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
It may not work because when u cast purge and then remove it it may not be giving it enough time.
It is MUI as it is since its an instant trigger.
change the unit remove action to unit - apply timed life and set the time to around .5
Also change casting unit to triggering unit.
u can store last created unit into a temp variable also. Normally the rule of thumb is anything u use twice or more store it into a variable.
 
Level 31
Joined
Jul 7, 2008
Messages
4,185
ok, i'm getting another problem.

the main autocast spell is based off abolish magic. when abolish magic is used, the trigger casts purge on the target it was using it on. when i manually do the spell, it works, however when used on autocast it only uses the abolish magic effect and the trigger dosn't cast purge.

the trigger is this

  • autocast purge
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Purgetest
    • Actions
      • Set tempPointE = (Target point of ability being cast)
      • Unit - Create 1 Purge Dummy for (Owner of (Triggering unit)) at tempPointE facing Default building facing degrees
      • Set PurgeDummy = (Last created unit)
      • Unit - Order PurgeDummy to Orc Shaman - Purge (Target unit of ability being cast)
      • Unit - Add a 0.50 second Generic expiration timer to PurgeDummy
      • Custom script: call RemoveLocation (udg_tempPointE)
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
if the message displays when autocasting it should create the unit and cast purge. im betting that target unit of ability being cast is turning up null.

umm this wont work but it will tell us if that is the case.
change target unit of ability being cast to a preplaced unit then try the autocast near that enemy and see if purge is casted.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
  • Detect Autocast
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(heal))
    • Actions
      • -------- ACTION --------
(Target unit of ability being cast) == (Target unit of issued order), it means that in this trigger, if you want to refer to Target, just use (Target unit of issue order).

So you're gonna need 2 trigger, 1 is for Unit Starts the effect of an ability and another one, is this.

Oh and also, don't use Begins casting an ability event, instead use this: Starts the effect of an ability

To debug what string order does the autocast has, use this;
  • Detect Autocast
    • Events
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (String((Issued order)))
For instance, I got "heal" string order by casting Heal ability, therefore you should use "heal" as the String Order comparison as in the first trigger.

My advice: For this, you'd better use Dummy Caster system, it's alot easier + more efficient rather than dynamically creates more and more dummy in the map.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Add condition;
  • Detect Autocast
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(autodispel))
      • (Level of Purge (Autocast) for (Triggering unit)) Greater than 0
    • Actions
      • -------- ACTION --------
This will differentiate between regular and Purge (Autocast).
 
Level 31
Joined
Jul 7, 2008
Messages
4,185
it's still not working for me
here are the triggers

  • Purge detect
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(autodispel))
      • (Level of Purge (Autocast) for (Triggering unit)) Greater than 0
    • Actions
      • Set tempPointE = (Target point of issued order)
      • Unit - Create 1 Purge Dummy for (Owner of (Triggering unit)) at tempPointE facing Default building facing degrees
      • Set PurgeDummy = (Last created unit)
      • Unit - Order PurgeDummy to Orc Shaman - Purge (Target unit of issued order)
      • Unit - Add a 0.50 second Generic expiration timer to PurgeDummy
      • Custom script: call RemoveLocation (udg_tempPointE)
  • Purge 2
    • Events
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (String((autodispel...
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
The problem:
  • Set tempPointE = (Target point of issued order)
Must get the position of the targeted object, not point ^ ^
Change it to:
  • Set tempPointE = Position of (Target unit of issued order)

sry about that takakenji i shouldve seen that earlier lol. The little things always get me haha. im glad to hear its finally fixed lol
 
Status
Not open for further replies.
Top