• 🏆 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] Please tell me why? this is wierd...

Status
Not open for further replies.


  • Mount
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Ability_Mount
    • Actions
      • Set Mui_Mount = (Mui_Mount + 1)
      • Set Unit_Rider_Mount[Mui_Mount] = (Casting unit)
      • Set Unit_Mounted_Mount[Mui_Mount] = (Target unit of ability being cast)
      • Set PlayerTeam_Mount[Mui_Mount] = (Owner of Unit_Rider_Mount[Mui_Mount])
      • Set Real_AttackRange_Mount[Mui_Mount] = (Current acquisition range of Unit_Rider_Mount[Mui_Mount])
      • Set TypeUnit_Rider_Mount[Mui_Mount] = (Unit-type of Unit_Rider_Mount[Mui_Mount])
      • Set Point_MountedPosition01 = (Position of Unit_Mounted_Mount[Mui_Mount])
      • Set Real_FlyingHigh_Mount[Mui_Mount] = (Current flying height of Unit_Mounted_Mount[Mui_Mount])
      • -------- .......... --------
      • Unit - Add LocustBook to Unit_Rider_Mount[Mui_Mount]
      • Unit - Add LocustBook to Unit_Mounted_Mount[Mui_Mount]
      • -------- .......... --------
      • Unit - Add Crow Form to Unit_Rider_Mount[Mui_Mount]
      • Unit - Remove Crow Form from Unit_Rider_Mount[Mui_Mount]
      • Animation - Change Unit_Rider_Mount[Mui_Mount] flying height to (Real_FlyingHigh_Mount[Mui_Mount] + MountHigh) at 0.00
      • -------- .......... --------
      • Unit - Create 1 TypeUnit_Rider_Mount[Mui_Mount] for PlayerTeam_Mount[Mui_Mount] at Point_MountedPosition01 facing Default building facing degrees
      • Set Unit_Controller_Mount[Mui_Mount] = (Last created unit)
      • Unit - Turn collision for Unit_Controller_Mount[Mui_Mount] Off
      • Animation - Change Unit_Controller_Mount[Mui_Mount]'s size to (0.00%, 0.00%, 0.00%) of its original size
      • Custom script: call RemoveLocation (udg_Point_MountedPosition01)
      • -------- .......... --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Mui_Mount Equal to 1
        • Then - Actions
          • Trigger - Turn on MountLoop <gen>
          • Trigger - Turn on Order <gen>
        • Else - Actions
  • MountLoop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer LoopIntergerA_Mount) from 1 to Mui_Mount, do (Actions)
        • Loop - Actions
          • Set Point_MountedPosition02 = (Position of Unit_Mounted_Mount[LoopIntergerA_Mount])
          • Unit - Move Unit_Controller_Mount[LoopIntergerA_Mount] instantly to Point_MountedPosition02
          • Custom script: call SetUnitX(udg_Unit_Rider_Mount[udg_LoopIntergerA_Mount], GetLocationX(udg_Point_MountedPosition02))
          • Custom script: call SetUnitY(udg_Unit_Rider_Mount[udg_LoopIntergerA_Mount], GetLocationY(udg_Point_MountedPosition02))
          • Custom script: call RemoveLocation (udg_Point_MountedPosition02)
  • Order Copy
    • 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
      • Or - Any (Conditions) are true
        • Conditions
          • (Issued order) Equal to (Order(smart))
          • (Issued order) Equal to (Order(move))
          • (Issued order) Equal to (Order(attack))
          • (Issued order) Equal to (Order(holdposition))
    • Actions
      • For each (Integer LoopIntergerB_Mount) from 1 to Mui_Mount, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Ordered unit) Equal to Unit_Controller_Mount[LoopIntergerB_Mount]
            • Then - Actions
              • Set Unit_TargertedUnit_Mount[LoopIntergerB_Mount] = (Target unit of issued order)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Issued order) Equal to (Order(attack))
                • Then - Actions
                  • Unit - Order Unit_Rider_Mount[LoopIntergerB_Mount] to Attack Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
                  • Set Point_OrderPosition01 = (Target point of issued order)
                  • Set Point_MountedPosition03 = (Position of Unit_Mounted_Mount[LoopIntergerB_Mount])
                  • Unit - Order Unit_Mounted_Mount[LoopIntergerB_Mount] to Move To Point_OrderPosition01
                  • Unit - Order Unit_Mounted_Mount[LoopIntergerB_Mount] to Follow Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
                  • Custom script: call RemoveLocation (udg_Point_OrderPosition01)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit_TargertedUnit_Mount[LoopIntergerB_Mount] is in (Units within Real_AttackRange_Mount[LoopIntergerB_Mount] of Point_MountedPosition03)) Equal to False
                    • Then - Actions
                      • Unit - Order Unit_Mounted_Mount[LoopIntergerB_Mount] to Move To Point_OrderPosition01
                      • Unit - Order Unit_Mounted_Mount[LoopIntergerB_Mount] to Follow Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
                      • Custom script: call RemoveLocation (udg_Point_OrderPosition01)
                      • Unit - Order Unit_Rider_Mount[LoopIntergerB_Mount] to Attack Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
                    • Else - Actions
                      • Unit - Order Unit_Rider_Mount[LoopIntergerB_Mount] to Attack Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Unit_TargertedUnit_Mount[LoopIntergerB_Mount] belongs to an ally of PlayerTeam_Mount[LoopIntergerB_Mount]) Equal to True
                • Then - Actions
                • Else - Actions
                  • Set Point_OrderPosition01 = (Target point of issued order)
                  • Set Point_MountedPosition03 = (Position of Unit_Mounted_Mount[LoopIntergerB_Mount])
                  • Unit - Order Unit_Rider_Mount[LoopIntergerB_Mount] to Attack Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit_TargertedUnit_Mount[LoopIntergerB_Mount] is in (Units within Real_AttackRange_Mount[LoopIntergerB_Mount] of Point_MountedPosition03)) Equal to False
                    • Then - Actions
                      • Unit - Order Unit_Mounted_Mount[LoopIntergerB_Mount] to Move To Point_OrderPosition01
                      • Unit - Order Unit_Mounted_Mount[LoopIntergerB_Mount] to Follow Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
                      • Custom script: call RemoveLocation (udg_Point_OrderPosition01)
                      • Unit - Order Unit_Rider_Mount[LoopIntergerB_Mount] to Attack Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
                    • Else - Actions
                      • Unit - Order Unit_Rider_Mount[LoopIntergerB_Mount] to Attack Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Issued order) Equal to (Order(holdposition))
                • Then - Actions
                  • Unit - Order Unit_Rider_Mount[LoopIntergerB_Mount] to Hold Position
                  • Unit - Order Unit_Mounted_Mount[LoopIntergerB_Mount] to Hold Position
                • Else - Actions
            • Else - Actions

at down there the hold position part,
Unit - Order Unit_Rider_Mount[LoopIntergerB_Mount] to Hold Position
but
Unit - Order Unit_Mounted_Mount[LoopIntergerB_Mount] to Hold Position
does not..
 
Level 19
Joined
Jul 14, 2011
Messages
875
First of all,
this:
  • If - Conditions
    • Or - Any (Conditions) are true
      • Conditions
        • (Issued order) Equal to (Order(attack))
  • Then - Actions
    • Unit - Order Unit_Rider_Mount[LoopIntergerB_Mount] to Attack Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
    • Set Point_OrderPosition01 = (Target point of issued order)
    • Set Point_MountedPosition03 = (Position of Unit_Mounted_Mount[LoopIntergerB_Mount])
    • Unit - Order Unit_Mounted_Mount[LoopIntergerB_Mount] to Move To Point_OrderPosition01
    • Unit - Order Unit_Mounted_Mount[LoopIntergerB_Mount] to Follow Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
    • Custom script: call RemoveLocation (udg_Point_OrderPosition01)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Unit_TargertedUnit_Mount[LoopIntergerB_Mount] is in (Units within Real_AttackRange_Mount[LoopIntergerB_Mount] of Point_MountedPosition03)) Equal to False
      • Then - Actions
        • Unit - Order Unit_Mounted_Mount[LoopIntergerB_Mount] to Move To Point_OrderPosition01
        • Unit - Order Unit_Mounted_Mount[LoopIntergerB_Mount] to Follow Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
        • Custom script: call RemoveLocation (udg_Point_OrderPosition01)
        • Unit - Order Unit_Rider_Mount[LoopIntergerB_Mount] to Attack Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
      • Else - Actions
        • Unit - Order Unit_Rider_Mount[LoopIntergerB_Mount] to Attack Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
should be like this:
  • If - Conditions
    • Or - Any (Conditions) are true
      • Conditions
        • (Issued order) Equal to (Order(attack))
  • Then - Actions
    • Unit - Order Unit_Rider_Mount[LoopIntergerB_Mount] to Attack Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
    • Set Point_OrderPosition01 = (Target point of issued order)
    • Set Point_MountedPosition03 = (Position of Unit_Mounted_Mount[LoopIntergerB_Mount])
    • Unit - Order Unit_Mounted_Mount[LoopIntergerB_Mount] to Move To Point_OrderPosition01
    • Unit - Order Unit_Mounted_Mount[LoopIntergerB_Mount] to Follow Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Unit_TargertedUnit_Mount[LoopIntergerB_Mount] is in (Units within Real_AttackRange_Mount[LoopIntergerB_Mount] of Point_MountedPosition03)) Equal to False
      • Then - Actions
        • Unit - Order Unit_Mounted_Mount[LoopIntergerB_Mount] to Move To Point_OrderPosition01
        • Unit - Order Unit_Mounted_Mount[LoopIntergerB_Mount] to Follow Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
        • Unit - Order Unit_Rider_Mount[LoopIntergerB_Mount] to Attack Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
      • Else - Actions
        • Unit - Order Unit_Rider_Mount[LoopIntergerB_Mount] to Attack Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
    • Custom script: call RemoveLocation (udg_Point_OrderPosition01)
and this:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit_TargertedUnit_Mount[LoopIntergerB_Mount] belongs to an ally of PlayerTeam_Mount[LoopIntergerB_Mount]) Equal to True
    • Then - Actions
    • Else - Actions
      • Set Point_OrderPosition01 = (Target point of issued order)
      • Set Point_MountedPosition03 = (Position of Unit_Mounted_Mount[LoopIntergerB_Mount])
      • Unit - Order Unit_Rider_Mount[LoopIntergerB_Mount] to Attack Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit_TargertedUnit_Mount[LoopIntergerB_Mount] is in (Units within Real_AttackRange_Mount[LoopIntergerB_Mount] of Point_MountedPosition03)) Equal to False
        • Then - Actions
          • Unit - Order Unit_Mounted_Mount[LoopIntergerB_Mount] to Move To Point_OrderPosition01
          • Unit - Order Unit_Mounted_Mount[LoopIntergerB_Mount] to Follow Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
          • Custom script: call RemoveLocation (udg_Point_OrderPosition01)
          • Unit - Order Unit_Rider_Mount[LoopIntergerB_Mount] to Attack Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
        • Else - Actions
          • Unit - Order Unit_Rider_Mount[LoopIntergerB_Mount] to Attack Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
should be like this:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit_TargertedUnit_Mount[LoopIntergerB_Mount] belongs to an ally of PlayerTeam_Mount[LoopIntergerB_Mount]) Equal to True
    • Then - Actions
    • Else - Actions
      • Set Point_MountedPosition03 = (Position of Unit_Mounted_Mount[LoopIntergerB_Mount])
      • Unit - Order Unit_Rider_Mount[LoopIntergerB_Mount] to Attack Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit_TargertedUnit_Mount[LoopIntergerB_Mount] is in (Units within Real_AttackRange_Mount[LoopIntergerB_Mount] of Point_MountedPosition03)) Equal to False
        • Then - Actions
          • Set Point_OrderPosition01 = (Target point of issued order)
          • Unit - Order Unit_Mounted_Mount[LoopIntergerB_Mount] to Move To Point_OrderPosition01
          • Custom script: call RemoveLocation (udg_Point_OrderPosition01)
          • Unit - Order Unit_Mounted_Mount[LoopIntergerB_Mount] to Follow Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
          • Unit - Order Unit_Rider_Mount[LoopIntergerB_Mount] to Attack Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
        • Else - Actions
          • Unit - Order Unit_Rider_Mount[LoopIntergerB_Mount] to Attack Unit_TargertedUnit_Mount[LoopIntergerB_Mount]
      • Custom script: call RemoveLocation (udg_Point_MountedPosition03)
Also:
  • Custom script: call SetUnitX(udg_Unit_Rider_Mount[udg_LoopIntergerA_Mount], GetLocationX(udg_Point_MountedPosition02))
  • Custom script: call SetUnitY(udg_Unit_Rider_Mount[udg_LoopIntergerA_Mount], GetLocationY(udg_Point_MountedPosition02))
You are moving a unit to itself? Why?

As for the "Hold Position" problem, are you sure the ability can target an abillity? I cant see why it wouldnt otherwise.
I didnt "inspect" it thoroughly, but I didnt see any major bugs, and the ones I pointed were mainly positioning problems.
 
Status
Not open for further replies.
Top