• 0

    posted a message on question about variables as a switch
    I was trying to build a multi-stage script using variables as a switch. I do not understand what I am doing wrong, even what I am doing right either. I am a veteran of making simple scripts to do really complicated in SC1 editor but this SC2 editor has me completely confused on things. initiation of battle p1
       Events
           Unit - Caravan [242.37, 7.46] is attacked
       Local Variables
           Untitled Variable 001 = 0 <Integer>
       Conditions
           And
               Conditions
                  (Owner of (Triggering unit)) == 1
       Actions
           UI - Display "We have been attacked! " for (Player group((Triggering player))) to Subtitle area
           Variable - Set Untitled Variable 001 = 1
           Point - Move battle point p1 To (Position of (Triggering unit))
           Region - Move battle area gain to battle point p1
           Unit - Move (Triggering unit) instantly to (Position of (Unit attached to caravan wait)) (No Blend)
           Unit - Move (Attacking Unit) instantly to enemies warp entrence (No Blend)
    

    second part of battle p1
       Events
           Timer - Every 1.0 seconds of Game Time
       Local Variables
           Untitled Variable 001 = 1 <Integer>
       Conditions
           And
               Conditions
                   ((Triggering unit) is in battle area gain) == true
                   Or
                       Conditions
                           (Owner of (Triggering unit)) == 7
                           (Owner of (Triggering unit)) == 0
       Actions
           UI - Display "DEBUG battle part 2" for (Player group((Triggering player))) to Subtitle area
           Unit - Move (Triggering unit) instantly to enemies warp entrence (No Blend)
           Variable - Set Untitled Variable 001 = 2
    




    Posted in: Triggers
  • To post a comment, please or register a new account.