Need help to fix this spell

unknown666

New Member
Reaction score
5
Hey guys

I finally completed my main spell and it works fully for player 1

now when player 2 is casting the spell the first 2 triggers are working fine.

but now my loop doesn't pause the unit of player 2 blue.

It doesn't mess it up with the unit of player 1 because when player 1 unit is unpaused, and player 2 stops casting the spell player 1 keeps unpaused.

If needed I'll add my map

Triggers:

Trigger:
  • Events
    • Unit - A unit enters BearSelect <gen>


^--- spawn trigger
______________
| Spell triggers |

Trigger:
  • Casting
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Control Puppets
    • Actions
      • Set UnitCaster = (Triggering unit)
      • Unit - Order UnitCaster to Night Elf Demon Hunter - Mana Burn SummonedUnit[(Player number of (Owner of UnitCaster))]
      • Set TempUnit = SummonedUnit[(Player number of (Owner of UnitCaster))]
      • Unit - Unpause TempUnit
      • Item - Create Control ON at (Position of TempUnit)
      • Item - Make (Last created item) Undroppable
      • Hero - Give (Last created item) to TempUnit


Trigger:
  • Casting Copy
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Pet Link
    • Actions
      • Set TempUnit = SummonedUnit[(Player number of (Owner of (Triggering unit)))]
      • Unit - Unpause TempUnit
      • Item - Remove (Item carried by TempUnit of type Control ON)


Trigger:
  • LoopCheckPause
    • Events
      • Time - Every 0.15 seconds of game time
    • Conditions
    • Actions
      • Set TempGroup = (Units in (Playable map area) owned by (Owner of SummonedUnit[(Player number of (Owner of (Picked unit)))]))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Set TempUnit = SummonedUnit[(Player number of (Owner of (Picked unit)))]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by TempUnit in slot 1)) Equal to Control ON
            • Then - Actions
              • Unit - Unpause TempUnit
              • Custom script: call DestroyGroup (udg_TempGroup)
            • Else - Actions
              • Unit - Pause TempUnit
              • Custom script: call DestroyGroup (udg_TempGroup)
      • Set TempUnit = SummonedUnit[(Player number of (Owner of (Picked unit)))]
      • Set TempGroup = (Units in (Playable map area) owned by (Owner of SummonedUnit[(Player number of (Owner of (Picked unit)))]))
 
Well, there is now no (Owner of (Picked Unit)) still, so can't believe that it's even working for player 1 ! and why make a new thread for the exact same spell as before !!!???
 
Dude, that was a MUI check.
This is based on fixing a spell

Also the picked unit works perfectly I guess since player 1 works fine.

And where to would I need to change it to than?
 
You maybe should move these:
Trigger:
  • Set TempUnit = SummonedUnit[(Player number of (Owner of (Picked unit)))]

Trigger:
  • Set TempGroup = (Units in (Playable map area) owned by (Owner of SummonedUnit[(Player number of (Owner of (Picked unit)))]))

They shall be under the Loop - Actions.
 
Fixed it by doing this Oo....

Trigger:
  • LoopCheckPause
    • Events
      • Time - Every 0.15 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by TempUnit in slot 1)) Equal to Control ON
            • Then - Actions
              • Unit - Unpause TempUnit
              • Custom script: call DestroyGroup (udg_TempGroup)
            • Else - Actions
              • Unit - Pause TempUnit
              • Custom script: call DestroyGroup (udg_TempGroup)
      • Set TempUnit = SummonedUnit[(Player number of (Owner of (Picked unit)))]
      • Set TempGroup = (Units in (Playable map area) owned by (Owner of SummonedUnit[(Player number of (Owner of (Picked unit)))]))
 
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