Summon Spell Problems...

Charapanga

New Member
Reaction score
46
Hi, i made my own custom summon spell based off Channel, and added a trigger to it, what happens is...they appear and move nowhere...but i want them to move towards the caster...

Trigger:
  • Reinforcements
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Reinforcements
    • Actions
      • Set ReinCaster = (Triggering unit)
      • Set ReinCasterPos = (Position of ReinCaster)
      • Set ReinMovePoint = (ReinCasterPos offset by 1000.00 towards ((Facing of ReinCaster) - 180.00) degrees)
      • Set ReinUnitGroup = (Units within 200.00 of ReinCasterPos)
      • Player - Set the current research level of Shaman Adept Training to 3 for (Owner of ReinCaster)
      • Player - Set the current research level of Ensnare to 1 for (Owner of ReinCaster)
      • Player - Set the current research level of Berserker Strength to 1 for (Owner of ReinCaster)
      • Player - Set the current research level of Steel Melee Weapons to 3 for (Owner of ReinCaster)
      • Player - Set the current research level of Steel Armor to 3 for (Owner of ReinCaster)
        • Do Multiple ActionsFor each (Integer A) from 1 to 2, do (Actions)
          • Loop - Actions
            • Unit - Create 2 Orc Shaman for (Owner of ReinCaster) at ReinMovePoint facing Default building facing (270.0) degrees
            • Set ReinLastCreated[(Integer A)] = (Last created unit)
            • Unit - Pause ReinLastCreated[(Integer A)]
            • Unit - Turn collision for ReinLastCreated[(Integer A)] Off
            • Unit - Order ReinLastCreated[(Integer A)] to Move To ReinCasterPos
        • Do Multiple ActionsFor each (Integer A) from 3 to 4, do (Actions)
          • Loop - Actions
            • Unit - Create 2 Orc Raider for (Owner of ReinCaster) at ReinMovePoint facing Default building facing (270.0) degrees
            • Set ReinLastCreated[(Integer A)] = (Last created unit)
            • Unit - Pause ReinLastCreated[(Integer A)]
            • Unit - Turn collision for ReinLastCreated[(Integer A)] Off
            • Unit - Order ReinLastCreated[(Integer A)] to Move To ReinCasterPos
      • Unit - Create 1 Orc Grunt for (Owner of ReinCaster) at ReinMovePoint facing Default building facing (270.0) degrees
      • Set ReinLastCreated[5] = (Last created unit)
      • Unit - Turn collision for ReinLastCreated[5] Off
      • Unit - Pause ReinLastCreated[5]
      • Unit - Order ReinLastCreated[5] to Move To ReinCasterPos
      • Set ReinCasterPos = (Position of ReinCaster)
      • Set ReinUnitGroup = (Units within 200.00 of ReinCasterPos)
      • Wait until ((ReinLastCreated[1] is in ReinUnitGroup) Equal to (==) True), checking every 0.10 seconds
      • Wait until ((ReinLastCreated[2] is in ReinUnitGroup) Equal to (==) True), checking every 0.10 seconds
      • Wait until ((ReinLastCreated[3] is in ReinUnitGroup) Equal to (==) True), checking every 0.10 seconds
      • Wait until ((ReinLastCreated[4] is in ReinUnitGroup) Equal to (==) True), checking every 0.10 seconds
      • Wait until ((ReinLastCreated[5] is in ReinUnitGroup) Equal to (==) True), checking every 0.10 seconds
        • Do Multiple ActionsFor each (Integer A) from 1 to 5, do (Actions)
          • Loop - Actions
            • Unit - Unpause ReinLastCreated[(Integer A)]
            • Unit - Turn collision for ReinLastCreated[(Integer A)] On
            • Unit - Order ReinLastCreated[(Integer A)] to Stop
            • Unit - Add a 60.00 second Generic expiration timer to ReinLastCreated[(Integer A)]
      • Custom script: call RemoveLocation(udg_ReinCasterPos)
      • Custom script: call RemoveLocation(udg_ReinMovePoint)
      • Custom script: call DestroyGroup(udg_ReinUnitGroup)
 

Azlier

Old World Ghost
Reaction score
461
First of all, when you spawn more than one unit at a time, the last created unit will only get the one created last, of course. Second, you can't move paused units...
 

Curo

Why am I still playing this game...?
Reaction score
109
Right away I see that you are creating 2 orc shamans but only assigning a variable to the last created one; so one of them will be unaffected by your triggering. And as azlier said, you can't order a paused unit to do anything (other than stop) and expect something.

Also, your whole group thing it messed up. First off, [del]I don't know why you are using the group, but[/del] unless you have a periodic trigger adding units to this group, the Wait until unit is in group waiting every 0.10 seconds will just pause your trigger.

Edit: Ok I realize that you are trying to move your units to a position then order them to stop, but there is nothing adding them to the group after this line: Set ReinUnitGroup = (Units within 200.00 of ReinCasterPos). You need a periodic trigger that resets the group, otherwise your "wait until" functions will just pause your trigger.
 

Charapanga

New Member
Reaction score
46
That wasn't the problem, the units didn't move...I did have a periodic trigger every 0.1 seconds creating and destroying the group and the point
 

Curo

Why am I still playing this game...?
Reaction score
109
That wasn't the problem, the units didn't move...I did have a periodic trigger every 0.1 seconds creating and destroying the group and the point

Well you should have mentioned that to save me some work. Glad your problem was fixed though.
 

Curo

Why am I still playing this game...?
Reaction score
109
Didn't think it was relevant with the whole 'move' thing

I suppose it wasn't immediately, but your next question would have been "why don't my units stop moving once they reach my point?" I try to think ahead :p
 

Curo

Why am I still playing this game...?
Reaction score
109
But it wasnt :D
I'm not as stupid as i look :p
Thanx anyway :)

Haha I don't know you personally, so I just assume. :p
It was a problem that I found without an evident solution, so I pointed it out as any helpful person would.
 
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