How do I make this trigger MUI

CixxyZ

Active Member
Reaction score
7
Trigger:
  • Gaia
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Gaia Esper
    • Actions
      • Wait 1.00 game-time seconds
      • Set TempPoint = (Position of (Attacked unit))
      • Unit - Create 1 gaia-missile for (Owner of (Attacking unit)) at TempPoint facing Default building facing degrees
      • Unit - Order (Last created unit) to Neutral - Slam
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_TempPoint)


My friend mentioned the wait in the trigger makes it not MUI. I tried using 2 local unit variable codes - one for the attacked unit and one for attacking, but it won';t work. The 2nd Local variable overrides the first one.
 

vypur85

Hibernate
Reaction score
803
Code:
    Events
        Unit - A unit Is attacked
    Conditions
        (Unit-type of (Attacking unit)) Equal to Gaia Esper
    Actions
        Custom script: local unit udg_u
        Wait 1.00 game-time seconds
        Set u = (Attacking unit)
        Set TempPoint = (Position of ([B]Triggering[/B] unit))
        Unit - Create 1 gaia-missile for (Owner of [B]u[/B]) at TempPoint facing Default building facing degrees
        Unit - Order (Last created unit) to Neutral - Slam
        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        Custom script:   call RemoveLocation (udg_TempPoint)
        Custom script: set udg_u = null

This should be MUI. Though, Attacking unit can be MUI sometimes after waits. Not too sure though. Localise it just to be sure. 'u' is a unit variable. Triggering unit is MUI naturally.
 

simonake

New Member
Reaction score
72
Easier.
Change Attacked for triggering unit and it should but with no problems, considering (Attacking unit) as a local.
 

SwedishChef

New Member
Reaction score
32
You maby dont know why you can use triggering unit and not attacking so i will try to explain. When using waits the editor tends to "forget" most other units than triggering unit, so its always better to use triggering unit.

If you dont can use triggering unit in one trigger i suggest you read this mui guide and look at the demo map, you will learn alot. http://www.thehelper.net/forums/showthread.php?t=111694
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top